ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // One of Either Graphics Output protocol and UGA Draw protocol must be supported.\r
+ // Either Graphics Output protocol or UGA Draw protocol must be supported.\r
//\r
ASSERT (FeaturePcdGet (PcdConOutGopSupport) ||\r
FeaturePcdGet (PcdConOutUgaSupport));\r
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;\r
- EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
- EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
+ EFI_STATUS Status;\r
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;\r
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
+ EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
+ UINTN SizeOfInfo;\r
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;\r
\r
//\r
// Start ConSplitter on ControllerHandle, and create the virtual\r
//\r
// Open UGA DRAW protocol\r
//\r
- Status = gBS->OpenProtocol (\r
- ControllerHandle,\r
- &gEfiUgaDrawProtocolGuid,\r
- (VOID **) &UgaDraw,\r
- This->DriverBindingHandle,\r
- mConOut.VirtualHandle,\r
- EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
- );\r
+ gBS->OpenProtocol (\r
+ ControllerHandle,\r
+ &gEfiUgaDrawProtocolGuid,\r
+ (VOID **) &UgaDraw,\r
+ This->DriverBindingHandle,\r
+ mConOut.VirtualHandle,\r
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+ );\r
}\r
\r
//\r
Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);\r
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));\r
\r
- if (FeaturePcdGet (PcdConOutUgaSupport) && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ if (FeaturePcdGet (PcdConOutUgaSupport)) {\r
//\r
- // Match the UGA mode data of ConOut with the current mode\r
+ // Get the UGA mode data of ConOut from the current mode\r
//\r
- if (UgaDraw != NULL) {\r
- UgaDraw->GetMode (\r
+ if (GraphicsOutput != NULL) {\r
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
+ \r
+ mConOut.UgaHorizontalResolution = Info->HorizontalResolution;\r
+ mConOut.UgaVerticalResolution = Info->VerticalResolution;\r
+ mConOut.UgaColorDepth = 32; \r
+ mConOut.UgaRefreshRate = 60;\r
+\r
+ FreePool (Info);\r
+\r
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ Status = UgaDraw->GetMode (\r
UgaDraw,\r
&mConOut.UgaHorizontalResolution,\r
&mConOut.UgaVerticalResolution,\r
);\r
}\r
}\r
+\r
return Status;\r
}\r
\r
}\r
\r
/**\r
- Add the device's output mode to console splitter's mode list.\r
+ Sync the device's output mode to console splitter's mode list.\r
\r
@param Private Text Out Splitter pointer.\r
@param TextOut Simple Text Output protocol pointer.\r
\r
\r
/**\r
- Add display (GOP or UGA) output modes into Consplitter Text Out list.\r
+ Add Grahpics Output modes into Consplitter Text Out list.\r
\r
@param Private Text Out Splitter pointer.\r
@param GraphicsOutput Graphics Output protocol pointer.\r
\r
**/\r
EFI_STATUS\r
-ConSplitterAddDisplayOutputMode (\r
+ConSplitterAddGraphicsOutputMode (\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,\r
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw\r
UINT32 UgaColorDepth;\r
UINT32 UgaRefreshRate;\r
\r
- if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {\r
- return EFI_UNSUPPORTED;\r
- }\r
+ ASSERT (GraphicsOutput != NULL || UgaDraw != NULL);\r
\r
CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;\r
\r
//\r
// This is the first Graphics Output device added\r
//\r
- CurrentGraphicsOutputMode->MaxMode = GraphicsOutput->Mode->MaxMode;\r
- CurrentGraphicsOutputMode->Mode = GraphicsOutput->Mode->Mode;\r
+ CopyMem (CurrentGraphicsOutputMode, GraphicsOutput->Mode, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE));\r
CopyMem (CurrentGraphicsOutputMode->Info, GraphicsOutput->Mode->Info, GraphicsOutput->Mode->SizeOfInfo);\r
- CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
- CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
- CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
\r
//\r
// Allocate resource for the private mode buffer\r
}\r
}\r
}\r
- }\r
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
//\r
// Graphics console driver can ensure the same mode for all GOP devices\r
// so we can get the current mode from this video device\r
CurrentGraphicsOutputMode->MaxMode = 1;\r
Info = CurrentGraphicsOutputMode->Info;\r
Info->Version = 0;\r
- Info->HorizontalResolution = UgaHorizontalResolution;\r
- Info->VerticalResolution = UgaVerticalResolution;\r
- Info->PixelFormat = PixelBltOnly;\r
- Info->PixelsPerScanLine = UgaHorizontalResolution;\r
- CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
+ Info->HorizontalResolution = UgaHorizontalResolution;\r
+ Info->VerticalResolution = UgaVerticalResolution;\r
+ Info->PixelFormat = PixelBltOnly;\r
+ Info->PixelsPerScanLine = UgaHorizontalResolution;\r
+ CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL;\r
CurrentGraphicsOutputMode->FrameBufferSize = 0;\r
\r
return Status;\r
}\r
\r
-\r
/**\r
+ Set the current console out mode.\r
+\r
This routine will get the current console mode information (column, row)\r
from ConsoleOutMode variable and set it; if the variable does not exist,\r
set to user defined console mode.\r
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private\r
)\r
{\r
- UINTN Col;\r
- UINTN Row;\r
- UINTN Mode;\r
- UINTN PreferMode;\r
- UINTN BaseMode;\r
- UINTN ModeInfoSize;\r
- UINTN MaxMode;\r
- EFI_STATUS Status;\r
- CONSOLE_OUT_MODE *ModeInfo;\r
+ UINTN Col;\r
+ UINTN Row;\r
+ UINTN Mode;\r
+ UINTN PreferMode;\r
+ UINTN BaseMode;\r
+ UINTN MaxMode;\r
+ EFI_STATUS Status;\r
+ CONSOLE_OUT_MODE ModeInfo;\r
+ UINTN ModeInfoSize;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;\r
\r
PreferMode = 0xFF;\r
BaseMode = 0xFF;\r
TextOut = &Private->TextOut;\r
MaxMode = (UINTN) (TextOut->Mode->MaxMode);\r
- ModeInfoSize = sizeof (CONSOLE_OUT_MODE);\r
-\r
- ModeInfo = AllocateZeroPool (sizeof(CONSOLE_OUT_MODE));\r
- ASSERT(ModeInfo != NULL);\r
\r
+ ModeInfoSize = sizeof (CONSOLE_OUT_MODE);\r
Status = gRT->GetVariable (\r
VARCONOUTMODE,\r
&gEfiGenericPlatformVariableGuid,\r
NULL,\r
&ModeInfoSize,\r
- ModeInfo\r
+ &ModeInfo\r
);\r
\r
- //\r
- // Set to the default mode 80 x 25 required by EFI/UEFI spec;\r
- // user can also define other valid default console mode here.\r
- //\r
if (EFI_ERROR(Status)) {\r
- ModeInfo->Column = 80;\r
- ModeInfo->Row = 25;\r
- Status = gRT->SetVariable (\r
- VARCONOUTMODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (CONSOLE_OUT_MODE),\r
- ModeInfo\r
- );\r
+ //\r
+ // If fail to get variable, set variable to the default mode 80 x 25\r
+ // required by UEFI spec;\r
+ //\r
+ ModeInfo.Column = 80;\r
+ ModeInfo.Row = 25;\r
+\r
+ gRT->SetVariable (\r
+ VARCONOUTMODE,\r
+ &gEfiGenericPlatformVariableGuid,\r
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
+ sizeof (CONSOLE_OUT_MODE),\r
+ &ModeInfo\r
+ );\r
}\r
\r
+ //\r
+ // To find the prefer mode and basic mode from Text Out mode list\r
+ //\r
for (Mode = 0; Mode < MaxMode; Mode++) {\r
Status = TextOut->QueryMode (TextOut, Mode, &Col, &Row);\r
if (!EFI_ERROR(Status)) {\r
- if (Col == ModeInfo->Column && Row == ModeInfo->Row) {\r
+ if (Col == ModeInfo.Column && Row == ModeInfo.Row) {\r
PreferMode = Mode;\r
}\r
if (Col == 80 && Row == 25) {\r
}\r
}\r
\r
- Status = TextOut->SetMode (TextOut, PreferMode);\r
-\r
//\r
- // if current mode setting is failed, default 80x25 mode will be set.\r
+ // Set perfer mode to Text Out devices.\r
//\r
+ Status = TextOut->SetMode (TextOut, PreferMode);\r
if (EFI_ERROR(Status)) {\r
+ //\r
+ // if current mode setting is failed, default 80x25 mode will be set.\r
+ //\r
Status = TextOut->SetMode (TextOut, BaseMode);\r
ASSERT(!EFI_ERROR(Status));\r
\r
- ModeInfo->Column = 80;\r
- ModeInfo->Row = 25;\r
+ ModeInfo.Column = 80;\r
+ ModeInfo.Row = 25;\r
\r
//\r
// Update ConOutMode variable\r
//\r
- Status = gRT->SetVariable (\r
- VARCONOUTMODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (CONSOLE_OUT_MODE),\r
- ModeInfo\r
- );\r
+ gRT->SetVariable (\r
+ VARCONOUTMODE,\r
+ &gEfiGenericPlatformVariableGuid,\r
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
+ sizeof (CONSOLE_OUT_MODE),\r
+ &ModeInfo\r
+ );\r
}\r
\r
- gBS->FreePool (ModeInfo);\r
+ return ;\r
}\r
\r
\r
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw\r
)\r
{\r
- EFI_STATUS Status;\r
- UINTN CurrentNumOfConsoles;\r
- INT32 CurrentMode;\r
- INT32 MaxMode;\r
- UINT32 UgaHorizontalResolution;\r
- UINT32 UgaVerticalResolution;\r
- UINT32 UgaColorDepth;\r
- UINT32 UgaRefreshRate;\r
- TEXT_OUT_AND_GOP_DATA *TextAndGop;\r
+ EFI_STATUS Status;\r
+ UINTN CurrentNumOfConsoles;\r
+ INT32 CurrentMode;\r
+ INT32 MaxMode;\r
+ UINT32 UgaHorizontalResolution;\r
+ UINT32 UgaVerticalResolution;\r
+ UINT32 UgaColorDepth;\r
+ UINT32 UgaRefreshRate;\r
+ TEXT_OUT_AND_GOP_DATA *TextAndGop;\r
+ UINTN SizeOfInfo;\r
+ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;\r
\r
Status = EFI_SUCCESS;\r
CurrentNumOfConsoles = Private->CurrentNumberOfConsoles;\r
\r
TextAndGop = &Private->TextOutList[CurrentNumOfConsoles];\r
\r
- TextAndGop->TextOut = TextOut;\r
+ TextAndGop->TextOut = TextOut;\r
TextAndGop->GraphicsOutput = GraphicsOutput;\r
- TextAndGop->UgaDraw = UgaDraw;\r
+ TextAndGop->UgaDraw = UgaDraw;\r
\r
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {\r
//\r
MaxMode = Private->TextOutMode.MaxMode;\r
ASSERT (MaxMode >= 1);\r
\r
- //\r
- // Update DevNull mode according to current video device\r
- //\r
if (FeaturePcdGet (PcdConOutGopSupport)) {\r
- if ((GraphicsOutput != NULL) || (UgaDraw != NULL)) {\r
- ConSplitterAddDisplayOutputMode (Private, GraphicsOutput, UgaDraw);\r
+ //\r
+ // If GOP is produced by Consplitter, this device display mode will be added into Graphics Ouput modes.\r
+ //\r
+ if ((GraphicsOutput != NULL) || (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport))) {\r
+ ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);\r
}\r
}\r
+\r
if (FeaturePcdGet (PcdConOutUgaSupport)) {\r
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ UgaHorizontalResolution = 800;\r
+ UgaVerticalResolution = 600;\r
+ UgaColorDepth = 32; \r
+ UgaRefreshRate = 60;\r
+\r
+ Status = EFI_DEVICE_ERROR;\r
+ //\r
+ // If UGA is produced by Consplitter\r
+ //\r
+ if (GraphicsOutput != NULL) {\r
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, GraphicsOutput->Mode->Mode, &SizeOfInfo, &Info);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ ASSERT ( SizeOfInfo <= sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
+\r
+ UgaHorizontalResolution = Info->HorizontalResolution;\r
+ UgaVerticalResolution = Info->VerticalResolution;\r
+\r
+ FreePool (Info);\r
+ \r
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
Status = UgaDraw->GetMode (\r
UgaDraw,\r
&UgaHorizontalResolution,\r
&UgaColorDepth,\r
&UgaRefreshRate\r
);\r
- if (!EFI_ERROR (Status)) {\r
- Status = ConSpliterUgaDrawSetMode (\r
- &Private->UgaDraw,\r
- UgaHorizontalResolution,\r
- UgaVerticalResolution,\r
- UgaColorDepth,\r
- UgaRefreshRate\r
- );\r
- }\r
- //\r
- // If GetMode/SetMode is failed, set to 800x600 mode\r
- //\r
- if(EFI_ERROR (Status)) {\r
- Status = ConSpliterUgaDrawSetMode (\r
- &Private->UgaDraw,\r
- 800,\r
- 600,\r
- 32,\r
- 60\r
- );\r
- }\r
}\r
+ \r
+ //\r
+ // Set UGA Draw mode,\r
+ // if GetMode is failed, set to 800x600 mode\r
+ //\r
+ Status = ConSpliterUgaDrawSetMode (\r
+ &Private->UgaDraw,\r
+ UgaHorizontalResolution,\r
+ UgaVerticalResolution,\r
+ UgaColorDepth,\r
+ UgaRefreshRate\r
+ );\r
}\r
\r
if (Private->ConsoleOutputMode == EfiConsoleControlScreenGraphics && GraphicsOutput != NULL) {\r
// We just added a new GOP or UGA device in graphics mode\r
//\r
if (FeaturePcdGet (PcdConOutGopSupport)) {\r
+ //\r
+ // Sync display output on new device based on GOP settings.\r
+ //\r
DevNullGopSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);\r
} else if (FeaturePcdGet (PcdConOutUgaSupport)) {\r
+ //\r
+ // Sync display output on new device based on UGA settings.\r
+ //\r
DevNullUgaSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);\r
}\r
} else if ((CurrentMode >= 0) && ((GraphicsOutput != NULL) || (UgaDraw != NULL)) && (CurrentMode < Private->TextOutMode.MaxMode)) {\r
} CONSOLE_OUT_MODE;\r
\r
typedef struct {\r
- UINTN Columns;\r
- UINTN Rows;\r
+ UINTN Columns;\r
+ UINTN Rows;\r
} TEXT_OUT_SPLITTER_QUERY_DATA;\r
\r
\r
Set the current mode to either text or graphics. Graphics is\r
for Quiet Boot.\r
\r
- @param This Protocol instance pointer.\r
- @param Mode Mode to set the\r
+ @param This Console Control Protocol instance pointer.\r
+ @param Mode Mode to set.\r
\r
@retval EFI_SUCCESS Mode information returned.\r
@retval EFI_INVALID_PARAMETER Invalid parameter.\r
);\r
\r
/**\r
- Return the current video mode information.\r
+ Returns information for an available graphics mode that the graphics device\r
+ and the set of active video output devices supports.\r
\r
- @param This Protocol instance pointer.\r
- @param ModeNumber The mode number to return information on.\r
- @param SizeOfInfo A pointer to the size, in bytes, of the Info\r
- buffer.\r
- @param Info Caller allocated buffer that returns information\r
- about ModeNumber.\r
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
+ @param ModeNumber The mode number to return information on.\r
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.\r
+ @param Info A pointer to callee allocated buffer that returns information about ModeNumber.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the\r
- video mode.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_OUT_OF_RESOURCES No resource available.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- Graphics output protocol interface to set video mode.\r
+ Set the video device into the specified mode and clears the visible portions of \r
+ the output display to black.\r
\r
- @param This Protocol instance pointer.\r
- @param ModeNumber The mode number to be set.\r
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
+ @param ModeNumber Abstraction that defines the current video mode.\r
\r
- @retval EFI_SUCCESS Graphics mode was changed.\r
- @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
- the request.\r
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
+ @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
+ @retval EFI_OUT_OF_RESOURCES No resource available.\r
\r
**/\r
EFI_STATUS\r
/**\r
Return the current video mode information.\r
\r
- @param This Protocol instance pointer.\r
- @param HorizontalResolution Current video horizontal resolution in pixels\r
- @param VerticalResolution Current video vertical resolution in pixels\r
- @param ColorDepth Current video color depth in bits per pixel\r
- @param RefreshRate Current video refresh rate in Hz.\r
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
+ @param RefreshRate The refresh rate of the monitor in Hertz.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- Return the current video mode information.\r
+ Set the current video mode information.\r
\r
- @param This Protocol instance pointer.\r
- @param HorizontalResolution Current video horizontal resolution in pixels\r
- @param VerticalResolution Current video vertical resolution in pixels\r
- @param ColorDepth Current video color depth in bits per pixel\r
- @param RefreshRate Current video refresh rate in Hz.\r
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
+ @param RefreshRate The refresh rate of the monitor in Hertz.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- The following table defines actions for BltOperations.\r
+ Blt a rectangle of pixels on the graphics screen.\r
\r
- EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
- directly to every pixel of the video display rectangle\r
- (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
- EfiUgaVideoToBltBuffer - Read data from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
- the BltBuffer rectangle (DestinationX, DestinationY )\r
- (DestinationX + Width, DestinationY + Height). If DestinationX or\r
- DestinationY is not zero then Delta must be set to the length in bytes\r
- of a row in the BltBuffer.\r
- EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
- video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
- not zero then Delta must be set to the length in bytes of a row in the\r
- BltBuffer.\r
- EfiUgaVideoToVideo - Copy from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
- to the video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- The BltBuffer and Delta are not used in this mode.\r
-\r
- @param This Protocol instance pointer.\r
- @param BltBuffer Buffer containing data to blit into video buffer.\r
- This buffer has a size of\r
- Width*Height*sizeof(EFI_UGA_PIXEL)\r
- @param BltOperation Operation to perform on BlitBuffer and video\r
- memory\r
- @param SourceX X coordinate of source for the BltBuffer.\r
- @param SourceY Y coordinate of source for the BltBuffer.\r
- @param DestinationX X coordinate of destination for the BltBuffer.\r
- @param DestinationY Y coordinate of destination for the BltBuffer.\r
- @param Width Width of rectangle in BltBuffer in pixels.\r
- @param Height Hight of rectangle in BltBuffer in pixels.\r
- @param Delta OPTIONAL.\r
+ The following table defines actions for BltOperations.\r
\r
- @retval EFI_SUCCESS The Blt operation completed.\r
- @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
- @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
- buffer.\r
+ EfiUgaVideoFill:\r
+ Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiUgaVideoToBltBuffer: \r
+ Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiUgaBltBufferToVideo:\r
+ Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiUgaVideoToVideo:\r
+ Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer. This\r
+ buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels.\r
+ @param Delta OPTIONAL\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
\r
**/\r
EFI_STATUS\r
/**\r
Sets the output device(s) to a specified mode.\r
\r
- @param Private Private data structure pointer.\r
+ @param Private Text Out Splitter pointer.\r
@param ModeNumber The mode number to set.\r
\r
@retval EFI_SUCCESS The requested text mode was set.\r
Clears the output device(s) display to the currently selected background\r
color.\r
\r
- @param Private Protocol instance pointer.\r
+ @param Private Text Out Splitter pointer.\r
\r
@retval EFI_SUCCESS The operation completed successfully.\r
@retval EFI_DEVICE_ERROR The device had an error and could not complete\r
/**\r
Sets the current coordinates of the cursor position.\r
\r
- @param Private Protocol instance pointer.\r
+ @param Private Text Out Splitter pointer.\r
@param Column \r
@param Row the position to set the cursor to. Must be\r
greater than or equal to zero and less than the\r
);\r
\r
/**\r
- Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
- In this driver, the cursor cannot be hidden.\r
+ Set cursor visibility property.\r
\r
- @param Private Indicates the calling context.\r
+ @param Private Text Out Splitter pointer.\r
@param Visible If TRUE, the cursor is set to be visible, If\r
FALSE, the cursor is set to be invisible.\r
\r
- @retval EFI_SUCCESS The request is valid.\r
+ @retval EFI_SUCCESS Returns always.\r
\r
**/\r
EFI_STATUS\r
Take the DevNull TextOut device and update the Simple Text Out on every\r
UGA device.\r
\r
- @param Private Indicates the calling context.\r
+ @param Private Text Out Splitter pointer.\r
\r
@retval EFI_SUCCESS The request is valid.\r
@retval other Return status of TextOut->OutputString ()\r
#\r
# This driver acts as a virtual console, takes over the console I/O control from selected \r
# standard console devices, and transmits console I/O to related console device drivers.\r
+# Consplitter could install Graphics Output protocol and/or UGA Draw protocol in system\r
+# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always\r
+# consumes Graphics Output protocol which is produced by display device, and consumes UGA Draw \r
+# protocol which is produced by display device according to PcdUgaConsumeSupport value. \r
+# Note: If only UGA Draw protocol is installed in system table, PcdUgaConsumeSupport \r
+# should be set to TRUE.\r
+#\r
# Copyright (c) 2006 - 2008, Intel Corporation\r
#\r
# All rights reserved. This program and the accompanying materials\r
\r
**/\r
\r
-\r
#include "ConSplitter.h"\r
\r
\r
Set the current mode to either text or graphics. Graphics is\r
for Quiet Boot.\r
\r
- @param This Protocol instance pointer.\r
- @param Mode Mode to set the\r
+ @param This Console Control Protocol instance pointer.\r
+ @param Mode Mode to set.\r
\r
@retval EFI_SUCCESS Mode information returned.\r
@retval EFI_INVALID_PARAMETER Invalid parameter.\r
\r
\r
/**\r
- Return the current video mode information.\r
+ Returns information for an available graphics mode that the graphics device\r
+ and the set of active video output devices supports.\r
\r
- @param This Protocol instance pointer.\r
- @param ModeNumber The mode number to return information on.\r
- @param SizeOfInfo A pointer to the size, in bytes, of the Info\r
- buffer.\r
- @param Info Caller allocated buffer that returns information\r
- about ModeNumber.\r
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
+ @param ModeNumber The mode number to return information on.\r
+ @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.\r
+ @param Info A pointer to callee allocated buffer that returns information about ModeNumber.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
- @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the\r
- video mode.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
+ @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_OUT_OF_RESOURCES No resource available.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
-\r
if (*Info == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
\r
/**\r
- Graphics output protocol interface to set video mode.\r
+ Set the video device into the specified mode and clears the visible portions of \r
+ the output display to black.\r
\r
- @param This Protocol instance pointer.\r
- @param ModeNumber The mode number to be set.\r
+ @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
+ @param ModeNumber Abstraction that defines the current video mode.\r
\r
- @retval EFI_SUCCESS Graphics mode was changed.\r
- @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
- the request.\r
- @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
+ @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.\r
+ @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+ @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
+ @retval EFI_OUT_OF_RESOURCES No resource available.\r
\r
**/\r
EFI_STATUS\r
if (EFI_ERROR (Status)) {\r
ReturnStatus = Status;\r
}\r
- }\r
-\r
- if (EFI_ERROR (ReturnStatus) && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
UgaDraw = Private->TextOutList[Index].UgaDraw;\r
if (UgaDraw != NULL) {\r
Status = UgaDraw->SetMode (\r
Private->GraphicsOutput.Mode->Info->VerticalResolution,\r
0\r
);\r
- } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
return UgaDraw->Blt (\r
UgaDraw,\r
(EFI_UGA_PIXEL *) Private->GraphicsOutputBlt,\r
}\r
}\r
\r
-\r
/**\r
Return the current video mode information.\r
\r
- @param This Protocol instance pointer.\r
- @param HorizontalResolution Current video horizontal resolution in pixels\r
- @param VerticalResolution Current video vertical resolution in pixels\r
- @param ColorDepth Current video color depth in bits per pixel\r
- @param RefreshRate Current video refresh rate in Hz.\r
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
+ @param RefreshRate The refresh rate of the monitor in Hertz.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
\r
**/\r
EFI_STATUS\r
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;\r
\r
if ((HorizontalResolution == NULL) ||\r
- (VerticalResolution == NULL) ||\r
- (RefreshRate == NULL) ||\r
- (ColorDepth == NULL)) {\r
+ (VerticalResolution == NULL) ||\r
+ (RefreshRate == NULL) ||\r
+ (ColorDepth == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
\r
\r
/**\r
- Return the current video mode information.\r
+ Set the current video mode information.\r
\r
- @param This Protocol instance pointer.\r
- @param HorizontalResolution Current video horizontal resolution in pixels\r
- @param VerticalResolution Current video vertical resolution in pixels\r
- @param ColorDepth Current video color depth in bits per pixel\r
- @param RefreshRate Current video refresh rate in Hz.\r
+ @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
+ @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
+ @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
+ @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
+ @param RefreshRate The refresh rate of the monitor in Hertz.\r
\r
- @retval EFI_SUCCESS Mode information returned.\r
- @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
- @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+ @retval EFI_SUCCESS Mode information returned.\r
+ @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
\r
**/\r
EFI_STATUS\r
\r
ReturnStatus = EFI_UNSUPPORTED;\r
\r
- if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
- UgaDraw = Private->TextOutList[Index].UgaDraw;\r
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
- Status = UgaDraw->SetMode (\r
- UgaDraw,\r
- HorizontalResolution,\r
- VerticalResolution,\r
- ColorDepth,\r
- RefreshRate\r
- );\r
+ GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;\r
+ if (GraphicsOutput != NULL) {\r
+ //\r
+ // Find corresponding ModeNumber of this GraphicsOutput instance\r
+ //\r
+ for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {\r
+ Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);\r
if (EFI_ERROR (Status)) {\r
- ReturnStatus = Status;\r
+ return Status;\r
}\r
- }\r
- }\r
-\r
- if (EFI_ERROR (ReturnStatus)) {\r
- GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;\r
- if (GraphicsOutput != NULL) {\r
- //\r
- // Find corresponding ModeNumber of this GraphicsOutput instance\r
- //\r
- for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {\r
- Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
- if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {\r
- FreePool (Info);\r
- break;\r
- }\r
+ if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {\r
FreePool (Info);\r
+ break;\r
}\r
+ FreePool (Info);\r
+ }\r
\r
- Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);\r
+ Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);\r
+ if (EFI_ERROR (Status)) {\r
+ ReturnStatus = Status;\r
+ }\r
+ } else if (FeaturePcdGet (PcdUgaConsumeSupport)){\r
+ UgaDraw = Private->TextOutList[Index].UgaDraw;\r
+ if (UgaDraw != NULL) {\r
+ Status = UgaDraw->SetMode (\r
+ UgaDraw,\r
+ HorizontalResolution,\r
+ VerticalResolution,\r
+ ColorDepth,\r
+ RefreshRate\r
+ );\r
if (EFI_ERROR (Status)) {\r
ReturnStatus = Status;\r
}\r
}\r
- }\r
+ } \r
}\r
\r
return ReturnStatus;\r
}\r
\r
/**\r
- The following table defines actions for BltOperations.\r
+ Blt a rectangle of pixels on the graphics screen.\r
\r
- EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
- directly to every pixel of the video display rectangle\r
- (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
- EfiBltVideoToBltBuffer - Read data from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
- the BltBuffer rectangle (DestinationX, DestinationY )\r
- (DestinationX + Width, DestinationY + Height). If DestinationX or\r
- DestinationY is not zero then Delta must be set to the length in bytes\r
- of a row in the BltBuffer.\r
- EfiBltBufferToVideo - Write data from the BltBuffer rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
- video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
- not zero then Delta must be set to the length in bytes of a row in the\r
- BltBuffer.\r
- EfiBltVideoToVideo - Copy from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
- to the video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- The BltBuffer and Delta are not used in this mode.\r
+ The following table defines actions for BltOperations.\r
\r
- @param Private Protocol instance pointer.\r
+ EfiUgaVideoFill:\r
+ Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiUgaVideoToBltBuffer: \r
+ Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiUgaBltBufferToVideo:\r
+ Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiUgaVideoToVideo:\r
+ Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param Private Text Out Splitter pointer.\r
@param BltBuffer Buffer containing data to blit into video buffer.\r
This buffer has a size of\r
Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
return EFI_SUCCESS;\r
}\r
\r
-\r
/**\r
- The following table defines actions for BltOperations.\r
-\r
- EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
- directly to every pixel of the video display rectangle\r
- (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
- EfiUgaVideoToBltBuffer - Read data from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
- the BltBuffer rectangle (DestinationX, DestinationY )\r
- (DestinationX + Width, DestinationY + Height). If DestinationX or\r
- DestinationY is not zero then Delta must be set to the length in bytes\r
- of a row in the BltBuffer.\r
- EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
- video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
- not zero then Delta must be set to the length in bytes of a row in the\r
- BltBuffer.\r
- EfiUgaVideoToVideo - Copy from the video display rectangle\r
- (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
- to the video display rectangle (DestinationX, DestinationY)\r
- (DestinationX + Width, DestinationY + Height).\r
- The BltBuffer and Delta are not used in this mode.\r
+ Blt a rectangle of pixels on the graphics screen.\r
\r
- @param This Protocol instance pointer.\r
- @param BltBuffer Buffer containing data to blit into video buffer.\r
- This buffer has a size of\r
- Width*Height*sizeof(EFI_UGA_PIXEL)\r
- @param BltOperation Operation to perform on BlitBuffer and video\r
- memory\r
- @param SourceX X coordinate of source for the BltBuffer.\r
- @param SourceY Y coordinate of source for the BltBuffer.\r
- @param DestinationX X coordinate of destination for the BltBuffer.\r
- @param DestinationY Y coordinate of destination for the BltBuffer.\r
- @param Width Width of rectangle in BltBuffer in pixels.\r
- @param Height Hight of rectangle in BltBuffer in pixels.\r
- @param Delta OPTIONAL.\r
+ The following table defines actions for BltOperations.\r
\r
- @retval EFI_SUCCESS The Blt operation completed.\r
- @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
- @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
- buffer.\r
+ EfiUgaVideoFill:\r
+ Write data from the BltBuffer pixel (SourceX, SourceY)\r
+ directly to every pixel of the video display rectangle\r
+ (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+ EfiUgaVideoToBltBuffer: \r
+ Read data from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+ the BltBuffer rectangle (DestinationX, DestinationY )\r
+ (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+ DestinationY is not zero then Delta must be set to the length in bytes\r
+ of a row in the BltBuffer.\r
+ EfiUgaBltBufferToVideo:\r
+ Write data from the BltBuffer rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+ video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+ not zero then Delta must be set to the length in bytes of a row in the\r
+ BltBuffer.\r
+ EfiUgaVideoToVideo:\r
+ Copy from the video display rectangle\r
+ (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
+ to the video display rectangle (DestinationX, DestinationY)\r
+ (DestinationX + Width, DestinationY + Height).\r
+ The BltBuffer and Delta are not used in this mode.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param BltBuffer Buffer containing data to blit into video buffer. This\r
+ buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)\r
+ @param BltOperation Operation to perform on BlitBuffer and video memory\r
+ @param SourceX X coordinate of source for the BltBuffer.\r
+ @param SourceY Y coordinate of source for the BltBuffer.\r
+ @param DestinationX X coordinate of destination for the BltBuffer.\r
+ @param DestinationY Y coordinate of destination for the BltBuffer.\r
+ @param Width Width of rectangle in BltBuffer in pixels.\r
+ @param Height Hight of rectangle in BltBuffer in pixels.\r
+ @param Delta OPTIONAL\r
+\r
+ @retval EFI_SUCCESS The Blt operation completed.\r
+ @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
+ @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
\r
**/\r
EFI_STATUS\r
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw\r
)\r
{\r
- if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
- return UgaDraw->Blt (\r
- UgaDraw,\r
- Private->UgaBlt,\r
- EfiUgaBltBufferToVideo,\r
+ if (GraphicsOutput != NULL) {\r
+ return GraphicsOutput->Blt (\r
+ GraphicsOutput,\r
+ (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,\r
+ EfiBltBufferToVideo,\r
0,\r
0,\r
0,\r
0,\r
Private->UgaHorizontalResolution,\r
Private->UgaVerticalResolution,\r
- Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)\r
+ 0\r
);\r
- } else if (GraphicsOutput != NULL) {\r
- return GraphicsOutput->Blt (\r
- GraphicsOutput,\r
- (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,\r
- EfiBltBufferToVideo,\r
+ } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+ return UgaDraw->Blt (\r
+ UgaDraw,\r
+ Private->UgaBlt,\r
+ EfiUgaBltBufferToVideo,\r
0,\r
0,\r
0,\r
0,\r
Private->UgaHorizontalResolution,\r
Private->UgaVerticalResolution,\r
- 0\r
+ Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)\r
);\r
} else {\r
return EFI_UNSUPPORTED;\r
/**\r
Sets the output device(s) to a specified mode.\r
\r
- @param Private Private data structure pointer.\r
+ @param Private Text Out Splitter pointer.\r
@param ModeNumber The mode number to set.\r
\r
@retval EFI_SUCCESS The requested text mode was set.\r
Clears the output device(s) display to the currently selected background\r
color.\r
\r
- @param Private Protocol instance pointer.\r
+ @param Private Text Out Splitter pointer.\r
\r
@retval EFI_SUCCESS The operation completed successfully.\r
@retval EFI_DEVICE_ERROR The device had an error and could not complete\r
/**\r
Sets the current coordinates of the cursor position.\r
\r
- @param Private Protocol instance pointer.\r
+ @param Private Text Out Splitter pointer.\r
@param Column \r
@param Row the position to set the cursor to. Must be\r
greater than or equal to zero and less than the\r
\r
\r
/**\r
- Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
- In this driver, the cursor cannot be hidden.\r
+ Set cursor visibility property.\r
\r
- @param Private Indicates the calling context.\r
+ @param Private Text Out Splitter pointer.\r
@param Visible If TRUE, the cursor is set to be visible, If\r
FALSE, the cursor is set to be invisible.\r
\r
- @retval EFI_SUCCESS The request is valid.\r
+ @retval EFI_SUCCESS Returns always.\r
\r
**/\r
EFI_STATUS\r
Take the DevNull TextOut device and update the Simple Text Out on every\r
UGA device.\r
\r
- @param Private Indicates the calling context.\r
+ @param Private Text Out Splitter pointer.\r
\r
@retval EFI_SUCCESS The request is valid.\r
@retval other Return status of TextOut->OutputString ()\r