diff options
Diffstat (limited to 'MdeModulePkg')
4 files changed, 413 insertions, 371 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index b61f7bd..cb993d7 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -410,7 +410,7 @@ ConSplitterDriverEntry( ASSERT_EFI_ERROR (Status);
//
- // One of Either Graphics Output protocol and UGA Draw protocol must be supported.
+ // Either Graphics Output protocol or UGA Draw protocol must be supported.
//
ASSERT (FeaturePcdGet (PcdConOutGopSupport) ||
FeaturePcdGet (PcdConOutUgaSupport));
@@ -1269,10 +1269,12 @@ ConSplitterConOutDriverBindingStart ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- EFI_STATUS Status;
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
- EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- EFI_UGA_DRAW_PROTOCOL *UgaDraw;
+ EFI_STATUS Status;
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
+ EFI_UGA_DRAW_PROTOCOL *UgaDraw;
+ UINTN SizeOfInfo;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
//
// Start ConSplitter on ControllerHandle, and create the virtual
@@ -1308,14 +1310,14 @@ ConSplitterConOutDriverBindingStart ( //
// Open UGA DRAW protocol
//
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiUgaDrawProtocolGuid,
- (VOID **) &UgaDraw,
- This->DriverBindingHandle,
- mConOut.VirtualHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
+ gBS->OpenProtocol (
+ ControllerHandle,
+ &gEfiUgaDrawProtocolGuid,
+ (VOID **) &UgaDraw,
+ This->DriverBindingHandle,
+ mConOut.VirtualHandle,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
}
//
@@ -1331,12 +1333,26 @@ ConSplitterConOutDriverBindingStart ( Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
- if (FeaturePcdGet (PcdConOutUgaSupport) && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ if (FeaturePcdGet (PcdConOutUgaSupport)) {
//
- // Match the UGA mode data of ConOut with the current mode
+ // Get the UGA mode data of ConOut from the current mode
//
- if (UgaDraw != NULL) {
- UgaDraw->GetMode (
+ if (GraphicsOutput != NULL) {
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+
+ mConOut.UgaHorizontalResolution = Info->HorizontalResolution;
+ mConOut.UgaVerticalResolution = Info->VerticalResolution;
+ mConOut.UgaColorDepth = 32;
+ mConOut.UgaRefreshRate = 60;
+
+ FreePool (Info);
+
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ Status = UgaDraw->GetMode (
UgaDraw,
&mConOut.UgaHorizontalResolution,
&mConOut.UgaVerticalResolution,
@@ -1345,6 +1361,7 @@ ConSplitterConOutDriverBindingStart ( );
}
}
+
return Status;
}
@@ -2366,7 +2383,7 @@ ConSplitterGetIntersection ( }
/**
- Add the device's output mode to console splitter's mode list.
+ Sync the device's output mode to console splitter's mode list.
@param Private Text Out Splitter pointer.
@param TextOut Simple Text Output protocol pointer.
@@ -2614,7 +2631,7 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr ( /**
- Add display (GOP or UGA) output modes into Consplitter Text Out list.
+ Add Grahpics Output modes into Consplitter Text Out list.
@param Private Text Out Splitter pointer.
@param GraphicsOutput Graphics Output protocol pointer.
@@ -2625,7 +2642,7 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr ( **/
EFI_STATUS
-ConSplitterAddDisplayOutputMode (
+ConSplitterAddGraphicsOutputMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
@@ -2648,9 +2665,7 @@ ConSplitterAddDisplayOutputMode ( UINT32 UgaColorDepth;
UINT32 UgaRefreshRate;
- if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
- return EFI_UNSUPPORTED;
- }
+ ASSERT (GraphicsOutput != NULL || UgaDraw != NULL);
CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;
@@ -2671,12 +2686,8 @@ ConSplitterAddDisplayOutputMode ( //
// This is the first Graphics Output device added
//
- CurrentGraphicsOutputMode->MaxMode = GraphicsOutput->Mode->MaxMode;
- CurrentGraphicsOutputMode->Mode = GraphicsOutput->Mode->Mode;
+ CopyMem (CurrentGraphicsOutputMode, GraphicsOutput->Mode, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE));
CopyMem (CurrentGraphicsOutputMode->Info, GraphicsOutput->Mode->Info, GraphicsOutput->Mode->SizeOfInfo);
- CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;
- CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;
- CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;
//
// Allocate resource for the private mode buffer
@@ -2811,8 +2822,7 @@ ConSplitterAddDisplayOutputMode ( }
}
}
- }
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
//
// Graphics console driver can ensure the same mode for all GOP devices
// so we can get the current mode from this video device
@@ -2828,11 +2838,11 @@ ConSplitterAddDisplayOutputMode ( CurrentGraphicsOutputMode->MaxMode = 1;
Info = CurrentGraphicsOutputMode->Info;
Info->Version = 0;
- Info->HorizontalResolution = UgaHorizontalResolution;
- Info->VerticalResolution = UgaVerticalResolution;
- Info->PixelFormat = PixelBltOnly;
- Info->PixelsPerScanLine = UgaHorizontalResolution;
- CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
+ Info->HorizontalResolution = UgaHorizontalResolution;
+ Info->VerticalResolution = UgaVerticalResolution;
+ Info->PixelFormat = PixelBltOnly;
+ Info->PixelsPerScanLine = UgaHorizontalResolution;
+ CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;
CurrentGraphicsOutputMode->FrameBufferSize = 0;
@@ -2881,8 +2891,9 @@ Done: return Status;
}
-
/**
+ Set the current console out mode.
+
This routine will get the current console mode information (column, row)
from ConsoleOutMode variable and set it; if the variable does not exist,
set to user defined console mode.
@@ -2895,54 +2906,55 @@ ConsplitterSetConsoleOutMode ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
)
{
- UINTN Col;
- UINTN Row;
- UINTN Mode;
- UINTN PreferMode;
- UINTN BaseMode;
- UINTN ModeInfoSize;
- UINTN MaxMode;
- EFI_STATUS Status;
- CONSOLE_OUT_MODE *ModeInfo;
+ UINTN Col;
+ UINTN Row;
+ UINTN Mode;
+ UINTN PreferMode;
+ UINTN BaseMode;
+ UINTN MaxMode;
+ EFI_STATUS Status;
+ CONSOLE_OUT_MODE ModeInfo;
+ UINTN ModeInfoSize;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
PreferMode = 0xFF;
BaseMode = 0xFF;
TextOut = &Private->TextOut;
MaxMode = (UINTN) (TextOut->Mode->MaxMode);
- ModeInfoSize = sizeof (CONSOLE_OUT_MODE);
-
- ModeInfo = AllocateZeroPool (sizeof(CONSOLE_OUT_MODE));
- ASSERT(ModeInfo != NULL);
+ ModeInfoSize = sizeof (CONSOLE_OUT_MODE);
Status = gRT->GetVariable (
VARCONOUTMODE,
&gEfiGenericPlatformVariableGuid,
NULL,
&ModeInfoSize,
- ModeInfo
+ &ModeInfo
);
- //
- // Set to the default mode 80 x 25 required by EFI/UEFI spec;
- // user can also define other valid default console mode here.
- //
if (EFI_ERROR(Status)) {
- ModeInfo->Column = 80;
- ModeInfo->Row = 25;
- Status = gRT->SetVariable (
- VARCONOUTMODE,
- &gEfiGenericPlatformVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (CONSOLE_OUT_MODE),
- ModeInfo
- );
+ //
+ // If fail to get variable, set variable to the default mode 80 x 25
+ // required by UEFI spec;
+ //
+ ModeInfo.Column = 80;
+ ModeInfo.Row = 25;
+
+ gRT->SetVariable (
+ VARCONOUTMODE,
+ &gEfiGenericPlatformVariableGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ sizeof (CONSOLE_OUT_MODE),
+ &ModeInfo
+ );
}
+ //
+ // To find the prefer mode and basic mode from Text Out mode list
+ //
for (Mode = 0; Mode < MaxMode; Mode++) {
Status = TextOut->QueryMode (TextOut, Mode, &Col, &Row);
if (!EFI_ERROR(Status)) {
- if (Col == ModeInfo->Column && Row == ModeInfo->Row) {
+ if (Col == ModeInfo.Column && Row == ModeInfo.Row) {
PreferMode = Mode;
}
if (Col == 80 && Row == 25) {
@@ -2951,31 +2963,33 @@ ConsplitterSetConsoleOutMode ( }
}
- Status = TextOut->SetMode (TextOut, PreferMode);
-
//
- // if current mode setting is failed, default 80x25 mode will be set.
+ // Set perfer mode to Text Out devices.
//
+ Status = TextOut->SetMode (TextOut, PreferMode);
if (EFI_ERROR(Status)) {
+ //
+ // if current mode setting is failed, default 80x25 mode will be set.
+ //
Status = TextOut->SetMode (TextOut, BaseMode);
ASSERT(!EFI_ERROR(Status));
- ModeInfo->Column = 80;
- ModeInfo->Row = 25;
+ ModeInfo.Column = 80;
+ ModeInfo.Row = 25;
//
// Update ConOutMode variable
//
- Status = gRT->SetVariable (
- VARCONOUTMODE,
- &gEfiGenericPlatformVariableGuid,
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
- sizeof (CONSOLE_OUT_MODE),
- ModeInfo
- );
+ gRT->SetVariable (
+ VARCONOUTMODE,
+ &gEfiGenericPlatformVariableGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+ sizeof (CONSOLE_OUT_MODE),
+ &ModeInfo
+ );
}
- gBS->FreePool (ModeInfo);
+ return ;
}
@@ -2999,15 +3013,17 @@ ConSplitterTextOutAddDevice ( IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
)
{
- EFI_STATUS Status;
- UINTN CurrentNumOfConsoles;
- INT32 CurrentMode;
- INT32 MaxMode;
- UINT32 UgaHorizontalResolution;
- UINT32 UgaVerticalResolution;
- UINT32 UgaColorDepth;
- UINT32 UgaRefreshRate;
- TEXT_OUT_AND_GOP_DATA *TextAndGop;
+ EFI_STATUS Status;
+ UINTN CurrentNumOfConsoles;
+ INT32 CurrentMode;
+ INT32 MaxMode;
+ UINT32 UgaHorizontalResolution;
+ UINT32 UgaVerticalResolution;
+ UINT32 UgaColorDepth;
+ UINT32 UgaRefreshRate;
+ TEXT_OUT_AND_GOP_DATA *TextAndGop;
+ UINTN SizeOfInfo;
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
Status = EFI_SUCCESS;
CurrentNumOfConsoles = Private->CurrentNumberOfConsoles;
@@ -3035,9 +3051,9 @@ ConSplitterTextOutAddDevice ( TextAndGop = &Private->TextOutList[CurrentNumOfConsoles];
- TextAndGop->TextOut = TextOut;
+ TextAndGop->TextOut = TextOut;
TextAndGop->GraphicsOutput = GraphicsOutput;
- TextAndGop->UgaDraw = UgaDraw;
+ TextAndGop->UgaDraw = UgaDraw;
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
//
@@ -3073,16 +3089,38 @@ ConSplitterTextOutAddDevice ( MaxMode = Private->TextOutMode.MaxMode;
ASSERT (MaxMode >= 1);
- //
- // Update DevNull mode according to current video device
- //
if (FeaturePcdGet (PcdConOutGopSupport)) {
- if ((GraphicsOutput != NULL) || (UgaDraw != NULL)) {
- ConSplitterAddDisplayOutputMode (Private, GraphicsOutput, UgaDraw);
+ //
+ // If GOP is produced by Consplitter, this device display mode will be added into Graphics Ouput modes.
+ //
+ if ((GraphicsOutput != NULL) || (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport))) {
+ ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
}
}
+
if (FeaturePcdGet (PcdConOutUgaSupport)) {
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ UgaHorizontalResolution = 800;
+ UgaVerticalResolution = 600;
+ UgaColorDepth = 32;
+ UgaRefreshRate = 60;
+
+ Status = EFI_DEVICE_ERROR;
+ //
+ // If UGA is produced by Consplitter
+ //
+ if (GraphicsOutput != NULL) {
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
+
+ UgaHorizontalResolution = Info->HorizontalResolution;
+ UgaVerticalResolution = Info->VerticalResolution;
+
+ FreePool (Info);
+
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
Status = UgaDraw->GetMode (
UgaDraw,
&UgaHorizontalResolution,
@@ -3090,28 +3128,19 @@ ConSplitterTextOutAddDevice ( &UgaColorDepth,
&UgaRefreshRate
);
- if (!EFI_ERROR (Status)) {
- Status = ConSpliterUgaDrawSetMode (
- &Private->UgaDraw,
- UgaHorizontalResolution,
- UgaVerticalResolution,
- UgaColorDepth,
- UgaRefreshRate
- );
- }
- //
- // If GetMode/SetMode is failed, set to 800x600 mode
- //
- if(EFI_ERROR (Status)) {
- Status = ConSpliterUgaDrawSetMode (
- &Private->UgaDraw,
- 800,
- 600,
- 32,
- 60
- );
- }
}
+
+ //
+ // Set UGA Draw mode,
+ // if GetMode is failed, set to 800x600 mode
+ //
+ Status = ConSpliterUgaDrawSetMode (
+ &Private->UgaDraw,
+ UgaHorizontalResolution,
+ UgaVerticalResolution,
+ UgaColorDepth,
+ UgaRefreshRate
+ );
}
if (Private->ConsoleOutputMode == EfiConsoleControlScreenGraphics && GraphicsOutput != NULL) {
@@ -3119,8 +3148,14 @@ ConSplitterTextOutAddDevice ( // We just added a new GOP or UGA device in graphics mode
//
if (FeaturePcdGet (PcdConOutGopSupport)) {
+ //
+ // Sync display output on new device based on GOP settings.
+ //
DevNullGopSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
} else if (FeaturePcdGet (PcdConOutUgaSupport)) {
+ //
+ // Sync display output on new device based on UGA settings.
+ //
DevNullUgaSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
}
} else if ((CurrentMode >= 0) && ((GraphicsOutput != NULL) || (UgaDraw != NULL)) && (CurrentMode < Private->TextOutMode.MaxMode)) {
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index db1212b..75df355 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -92,8 +92,8 @@ typedef struct { } CONSOLE_OUT_MODE;
typedef struct {
- UINTN Columns;
- UINTN Rows;
+ UINTN Columns;
+ UINTN Rows;
} TEXT_OUT_SPLITTER_QUERY_DATA;
@@ -1861,8 +1861,8 @@ ConSpliterConsoleControlGetMode ( Set the current mode to either text or graphics. Graphics is
for Quiet Boot.
- @param This Protocol instance pointer.
- @param Mode Mode to set the
+ @param This Console Control Protocol instance pointer.
+ @param Mode Mode to set.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -1877,21 +1877,20 @@ ConSpliterConsoleControlSetMode ( );
/**
- Return the current video mode information.
+ Returns information for an available graphics mode that the graphics device
+ and the set of active video output devices supports.
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to return information on.
- @param SizeOfInfo A pointer to the size, in bytes, of the Info
- buffer.
- @param Info Caller allocated buffer that returns information
- about ModeNumber.
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
+ @param ModeNumber The mode number to return information on.
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
+ @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
- video mode.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
@@ -1904,15 +1903,16 @@ ConSpliterGraphicsOutputQueryMode ( );
/**
- Graphics output protocol interface to set video mode.
+ Set the video device into the specified mode and clears the visible portions of
+ the output display to black.
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to be set.
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
+ @param ModeNumber Abstraction that defines the current video mode.
- @retval EFI_SUCCESS Graphics mode was changed.
- @retval EFI_DEVICE_ERROR The device had an error and could not complete
- the request.
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
+ @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
+ @retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
@@ -2007,15 +2007,15 @@ DevNullGopSync ( /**
Return the current video mode information.
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.
+ @param RefreshRate The refresh rate of the monitor in Hertz.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
**/
EFI_STATUS
@@ -2029,17 +2029,17 @@ ConSpliterUgaDrawGetMode ( );
/**
- Return the current video mode information.
+ Set the current video mode information.
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.
+ @param RefreshRate The refresh rate of the monitor in Hertz.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_OUT_OF_RESOURCES Out of resources.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
**/
EFI_STATUS
@@ -2053,49 +2053,52 @@ ConSpliterUgaDrawSetMode ( );
/**
- The following table defines actions for BltOperations.
+ Blt a rectangle of pixels on the graphics screen.
- EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
- EfiUgaVideoToBltBuffer - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
- EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
- EfiUgaVideoToVideo - Copy from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
- to the video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
-
- @param This Protocol instance pointer.
- @param BltBuffer Buffer containing data to blit into video buffer.
- This buffer has a size of
- Width*Height*sizeof(EFI_UGA_PIXEL)
- @param BltOperation Operation to perform on BlitBuffer and video
- memory
- @param SourceX X coordinate of source for the BltBuffer.
- @param SourceY Y coordinate of source for the BltBuffer.
- @param DestinationX X coordinate of destination for the BltBuffer.
- @param DestinationY Y coordinate of destination for the BltBuffer.
- @param Width Width of rectangle in BltBuffer in pixels.
- @param Height Hight of rectangle in BltBuffer in pixels.
- @param Delta OPTIONAL.
+ The following table defines actions for BltOperations.
- @retval EFI_SUCCESS The Blt operation completed.
- @retval EFI_INVALID_PARAMETER BltOperation is not valid.
- @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
- buffer.
+ EfiUgaVideoFill:
+ Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiUgaVideoToBltBuffer:
+ Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiUgaBltBufferToVideo:
+ Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiUgaVideoToVideo:
+ Copy from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
+ to the video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ @param This Protocol instance pointer.
+ @param BltBuffer Buffer containing data to blit into video buffer. This
+ buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
+ @param BltOperation Operation to perform on BlitBuffer and video memory
+ @param SourceX X coordinate of source for the BltBuffer.
+ @param SourceY Y coordinate of source for the BltBuffer.
+ @param DestinationX X coordinate of destination for the BltBuffer.
+ @param DestinationY Y coordinate of destination for the BltBuffer.
+ @param Width Width of rectangle in BltBuffer in pixels.
+ @param Height Hight of rectangle in BltBuffer in pixels.
+ @param Delta OPTIONAL
+
+ @retval EFI_SUCCESS The Blt operation completed.
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
**/
EFI_STATUS
@@ -2162,7 +2165,7 @@ DevNullTextOutOutputString ( /**
Sets the output device(s) to a specified mode.
- @param Private Private data structure pointer.
+ @param Private Text Out Splitter pointer.
@param ModeNumber The mode number to set.
@retval EFI_SUCCESS The requested text mode was set.
@@ -2182,7 +2185,7 @@ DevNullTextOutSetMode ( Clears the output device(s) display to the currently selected background
color.
- @param Private Protocol instance pointer.
+ @param Private Text Out Splitter pointer.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_DEVICE_ERROR The device had an error and could not complete
@@ -2198,7 +2201,7 @@ DevNullTextOutClearScreen ( /**
Sets the current coordinates of the cursor position.
- @param Private Protocol instance pointer.
+ @param Private Text Out Splitter pointer.
@param Column
@param Row the position to set the cursor to. Must be
greater than or equal to zero and less than the
@@ -2220,14 +2223,13 @@ DevNullTextOutSetCursorPosition ( );
/**
- Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
- In this driver, the cursor cannot be hidden.
+ Set cursor visibility property.
- @param Private Indicates the calling context.
+ @param Private Text Out Splitter pointer.
@param Visible If TRUE, the cursor is set to be visible, If
FALSE, the cursor is set to be invisible.
- @retval EFI_SUCCESS The request is valid.
+ @retval EFI_SUCCESS Returns always.
**/
EFI_STATUS
@@ -2240,7 +2242,7 @@ DevNullTextOutEnableCursor ( Take the DevNull TextOut device and update the Simple Text Out on every
UGA device.
- @param Private Indicates the calling context.
+ @param Private Text Out Splitter pointer.
@retval EFI_SUCCESS The request is valid.
@retval other Return status of TextOut->OutputString ()
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf index cb068cf..595b6f0 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf @@ -3,6 +3,13 @@ #
# This driver acts as a virtual console, takes over the console I/O control from selected
# standard console devices, and transmits console I/O to related console device drivers.
+# Consplitter could install Graphics Output protocol and/or UGA Draw protocol in system
+# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always
+# consumes Graphics Output protocol which is produced by display device, and consumes UGA Draw
+# protocol which is produced by display device according to PcdUgaConsumeSupport value.
+# Note: If only UGA Draw protocol is installed in system table, PcdUgaConsumeSupport
+# should be set to TRUE.
+#
# Copyright (c) 2006 - 2008, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c index 1a0715e..686a473 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c @@ -16,7 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
-
#include "ConSplitter.h"
@@ -80,8 +79,8 @@ ConSpliterConsoleControlGetMode ( Set the current mode to either text or graphics. Graphics is
for Quiet Boot.
- @param This Protocol instance pointer.
- @param Mode Mode to set the
+ @param This Console Control Protocol instance pointer.
+ @param Mode Mode to set.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -152,21 +151,20 @@ ConSpliterConsoleControlSetMode ( /**
- Return the current video mode information.
+ Returns information for an available graphics mode that the graphics device
+ and the set of active video output devices supports.
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to return information on.
- @param SizeOfInfo A pointer to the size, in bytes, of the Info
- buffer.
- @param Info Caller allocated buffer that returns information
- about ModeNumber.
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
+ @param ModeNumber The mode number to return information on.
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
+ @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
- video mode.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
@@ -194,7 +192,6 @@ ConSpliterGraphicsOutputQueryMode ( }
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
-
if (*Info == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -208,15 +205,16 @@ ConSpliterGraphicsOutputQueryMode ( /**
- Graphics output protocol interface to set video mode.
+ Set the video device into the specified mode and clears the visible portions of
+ the output display to black.
- @param This Protocol instance pointer.
- @param ModeNumber The mode number to be set.
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
+ @param ModeNumber Abstraction that defines the current video mode.
- @retval EFI_SUCCESS Graphics mode was changed.
- @retval EFI_DEVICE_ERROR The device had an error and could not complete
- the request.
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
+ @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
+ @retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
@@ -293,9 +291,7 @@ ConSpliterGraphicsOutputSetMode ( if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
- }
-
- if (EFI_ERROR (ReturnStatus) && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
UgaDraw = Private->TextOutList[Index].UgaDraw;
if (UgaDraw != NULL) {
Status = UgaDraw->SetMode (
@@ -671,7 +667,7 @@ DevNullGopSync ( Private->GraphicsOutput.Mode->Info->VerticalResolution,
0
);
- } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
return UgaDraw->Blt (
UgaDraw,
(EFI_UGA_PIXEL *) Private->GraphicsOutputBlt,
@@ -689,19 +685,18 @@ DevNullGopSync ( }
}
-
/**
Return the current video mode information.
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.
+ @param RefreshRate The refresh rate of the monitor in Hertz.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.
**/
EFI_STATUS
@@ -717,9 +712,9 @@ ConSpliterUgaDrawGetMode ( TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
if ((HorizontalResolution == NULL) ||
- (VerticalResolution == NULL) ||
- (RefreshRate == NULL) ||
- (ColorDepth == NULL)) {
+ (VerticalResolution == NULL) ||
+ (RefreshRate == NULL) ||
+ (ColorDepth == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
@@ -737,17 +732,17 @@ ConSpliterUgaDrawGetMode ( /**
- Return the current video mode information.
+ Set the current video mode information.
- @param This Protocol instance pointer.
- @param HorizontalResolution Current video horizontal resolution in pixels
- @param VerticalResolution Current video vertical resolution in pixels
- @param ColorDepth Current video color depth in bits per pixel
- @param RefreshRate Current video refresh rate in Hz.
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.
+ @param RefreshRate The refresh rate of the monitor in Hertz.
- @retval EFI_SUCCESS Mode information returned.
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
- @retval EFI_OUT_OF_RESOURCES Out of resources.
+ @retval EFI_SUCCESS Mode information returned.
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
+ @retval EFI_OUT_OF_RESOURCES Out of resources.
**/
EFI_STATUS
@@ -812,78 +807,80 @@ ConSpliterUgaDrawSetMode ( ReturnStatus = EFI_UNSUPPORTED;
- if (FeaturePcdGet (PcdUgaConsumeSupport)) {
- UgaDraw = Private->TextOutList[Index].UgaDraw;
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
- Status = UgaDraw->SetMode (
- UgaDraw,
- HorizontalResolution,
- VerticalResolution,
- ColorDepth,
- RefreshRate
- );
+ GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
+ if (GraphicsOutput != NULL) {
+ //
+ // Find corresponding ModeNumber of this GraphicsOutput instance
+ //
+ for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);
if (EFI_ERROR (Status)) {
- ReturnStatus = Status;
+ return Status;
}
- }
- }
-
- if (EFI_ERROR (ReturnStatus)) {
- GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
- if (GraphicsOutput != NULL) {
- //
- // Find corresponding ModeNumber of this GraphicsOutput instance
- //
- for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {
- Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);
- if (EFI_ERROR (Status)) {
- return Status;
- }
- if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {
- FreePool (Info);
- break;
- }
+ if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {
FreePool (Info);
+ break;
}
+ FreePool (Info);
+ }
- Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
+ Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
+ if (EFI_ERROR (Status)) {
+ ReturnStatus = Status;
+ }
+ } else if (FeaturePcdGet (PcdUgaConsumeSupport)){
+ UgaDraw = Private->TextOutList[Index].UgaDraw;
+ if (UgaDraw != NULL) {
+ Status = UgaDraw->SetMode (
+ UgaDraw,
+ HorizontalResolution,
+ VerticalResolution,
+ ColorDepth,
+ RefreshRate
+ );
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
}
- }
+ }
}
return ReturnStatus;
}
/**
- The following table defines actions for BltOperations.
+ Blt a rectangle of pixels on the graphics screen.
- EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
- EfiBltVideoToBltBuffer - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
- EfiBltBufferToVideo - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
- EfiBltVideoToVideo - Copy from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
- to the video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
+ The following table defines actions for BltOperations.
- @param Private Protocol instance pointer.
+ EfiUgaVideoFill:
+ Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiUgaVideoToBltBuffer:
+ Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiUgaBltBufferToVideo:
+ Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiUgaVideoToVideo:
+ Copy from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
+ to the video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ @param Private Text Out Splitter pointer.
@param BltBuffer Buffer containing data to blit into video buffer.
This buffer has a size of
Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
@@ -1020,51 +1017,53 @@ DevNullUgaBlt ( return EFI_SUCCESS;
}
-
/**
- The following table defines actions for BltOperations.
-
- EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
- directly to every pixel of the video display rectangle
- (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- Only one pixel will be used from the BltBuffer. Delta is NOT used.
- EfiUgaVideoToBltBuffer - Read data from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
- the BltBuffer rectangle (DestinationX, DestinationY )
- (DestinationX + Width, DestinationY + Height). If DestinationX or
- DestinationY is not zero then Delta must be set to the length in bytes
- of a row in the BltBuffer.
- EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
- video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
- not zero then Delta must be set to the length in bytes of a row in the
- BltBuffer.
- EfiUgaVideoToVideo - Copy from the video display rectangle
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
- to the video display rectangle (DestinationX, DestinationY)
- (DestinationX + Width, DestinationY + Height).
- The BltBuffer and Delta are not used in this mode.
+ Blt a rectangle of pixels on the graphics screen.
- @param This Protocol instance pointer.
- @param BltBuffer Buffer containing data to blit into video buffer.
- This buffer has a size of
- Width*Height*sizeof(EFI_UGA_PIXEL)
- @param BltOperation Operation to perform on BlitBuffer and video
- memory
- @param SourceX X coordinate of source for the BltBuffer.
- @param SourceY Y coordinate of source for the BltBuffer.
- @param DestinationX X coordinate of destination for the BltBuffer.
- @param DestinationY Y coordinate of destination for the BltBuffer.
- @param Width Width of rectangle in BltBuffer in pixels.
- @param Height Hight of rectangle in BltBuffer in pixels.
- @param Delta OPTIONAL.
+ The following table defines actions for BltOperations.
- @retval EFI_SUCCESS The Blt operation completed.
- @retval EFI_INVALID_PARAMETER BltOperation is not valid.
- @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
- buffer.
+ EfiUgaVideoFill:
+ Write data from the BltBuffer pixel (SourceX, SourceY)
+ directly to every pixel of the video display rectangle
+ (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.
+ EfiUgaVideoToBltBuffer:
+ Read data from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
+ the BltBuffer rectangle (DestinationX, DestinationY )
+ (DestinationX + Width, DestinationY + Height). If DestinationX or
+ DestinationY is not zero then Delta must be set to the length in bytes
+ of a row in the BltBuffer.
+ EfiUgaBltBufferToVideo:
+ Write data from the BltBuffer rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
+ video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
+ not zero then Delta must be set to the length in bytes of a row in the
+ BltBuffer.
+ EfiUgaVideoToVideo:
+ Copy from the video display rectangle
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
+ to the video display rectangle (DestinationX, DestinationY)
+ (DestinationX + Width, DestinationY + Height).
+ The BltBuffer and Delta are not used in this mode.
+
+ @param This Protocol instance pointer.
+ @param BltBuffer Buffer containing data to blit into video buffer. This
+ buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
+ @param BltOperation Operation to perform on BlitBuffer and video memory
+ @param SourceX X coordinate of source for the BltBuffer.
+ @param SourceY Y coordinate of source for the BltBuffer.
+ @param DestinationX X coordinate of destination for the BltBuffer.
+ @param DestinationY Y coordinate of destination for the BltBuffer.
+ @param Width Width of rectangle in BltBuffer in pixels.
+ @param Height Hight of rectangle in BltBuffer in pixels.
+ @param Delta OPTIONAL
+
+ @retval EFI_SUCCESS The Blt operation completed.
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
**/
EFI_STATUS
@@ -1183,31 +1182,31 @@ DevNullUgaSync ( IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
)
{
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
- return UgaDraw->Blt (
- UgaDraw,
- Private->UgaBlt,
- EfiUgaBltBufferToVideo,
+ if (GraphicsOutput != NULL) {
+ return GraphicsOutput->Blt (
+ GraphicsOutput,
+ (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,
+ EfiBltBufferToVideo,
0,
0,
0,
0,
Private->UgaHorizontalResolution,
Private->UgaVerticalResolution,
- Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)
+ 0
);
- } else if (GraphicsOutput != NULL) {
- return GraphicsOutput->Blt (
- GraphicsOutput,
- (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,
- EfiBltBufferToVideo,
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
+ return UgaDraw->Blt (
+ UgaDraw,
+ Private->UgaBlt,
+ EfiUgaBltBufferToVideo,
0,
0,
0,
0,
Private->UgaHorizontalResolution,
Private->UgaVerticalResolution,
- 0
+ Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)
);
} else {
return EFI_UNSUPPORTED;
@@ -1436,7 +1435,7 @@ DevNullTextOutOutputString ( /**
Sets the output device(s) to a specified mode.
- @param Private Private data structure pointer.
+ @param Private Text Out Splitter pointer.
@param ModeNumber The mode number to set.
@retval EFI_SUCCESS The requested text mode was set.
@@ -1513,7 +1512,7 @@ DevNullTextOutSetMode ( Clears the output device(s) display to the currently selected background
color.
- @param Private Protocol instance pointer.
+ @param Private Text Out Splitter pointer.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_DEVICE_ERROR The device had an error and could not complete
@@ -1561,7 +1560,7 @@ DevNullTextOutClearScreen ( /**
Sets the current coordinates of the cursor position.
- @param Private Protocol instance pointer.
+ @param Private Text Out Splitter pointer.
@param Column
@param Row the position to set the cursor to. Must be
greater than or equal to zero and less than the
@@ -1595,14 +1594,13 @@ DevNullTextOutSetCursorPosition ( /**
- Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
- In this driver, the cursor cannot be hidden.
+ Set cursor visibility property.
- @param Private Indicates the calling context.
+ @param Private Text Out Splitter pointer.
@param Visible If TRUE, the cursor is set to be visible, If
FALSE, the cursor is set to be invisible.
- @retval EFI_SUCCESS The request is valid.
+ @retval EFI_SUCCESS Returns always.
**/
EFI_STATUS
@@ -1621,7 +1619,7 @@ DevNullTextOutEnableCursor ( Take the DevNull TextOut device and update the Simple Text Out on every
UGA device.
- @param Private Indicates the calling context.
+ @param Private Text Out Splitter pointer.
@retval EFI_SUCCESS The request is valid.
@retval other Return status of TextOut->OutputString ()
|