sync tracker to remove duplicate display mode in ConOut virtual handle GOP instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4533 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -170,7 +170,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
||||||
(TEXT_OUT_GOP_MODE *) NULL,
|
(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
|
||||||
|
0,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
{
|
{
|
||||||
@ -233,7 +234,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
||||||
(TEXT_OUT_GOP_MODE *) NULL,
|
(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
|
||||||
|
0,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
{
|
{
|
||||||
@ -663,6 +665,7 @@ ConSplitterTextOutConstructor (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Copy protocols template
|
// Copy protocols template
|
||||||
@ -722,21 +725,24 @@ ConSplitterTextOutConstructor (
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel
|
// Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel
|
||||||
|
// DevNull will be updated to user-defined mode after driver has started.
|
||||||
//
|
//
|
||||||
if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (TEXT_OUT_GOP_MODE))) == NULL) {
|
if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
ConOutPrivate->GraphicsOutputModeBuffer[0].HorizontalResolution = 800;
|
Info = &ConOutPrivate->GraphicsOutputModeBuffer[0];
|
||||||
ConOutPrivate->GraphicsOutputModeBuffer[0].VerticalResolution = 600;
|
Info->Version = 0;
|
||||||
|
Info->HorizontalResolution = 800;
|
||||||
|
Info->VerticalResolution = 600;
|
||||||
|
Info->PixelFormat = PixelBltOnly;
|
||||||
|
Info->PixelsPerScanLine = 800;
|
||||||
|
CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||||
|
ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()
|
// Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()
|
||||||
// GraphicsOutputMode->Info->Version, GraphicsOutputMode->Info->PixelFormat
|
// GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
|
||||||
// GraphicsOutputMode->SizeOfInfo, GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize
|
|
||||||
//
|
//
|
||||||
ConOutPrivate->GraphicsOutput.Mode->Info->Version = 0;
|
|
||||||
ConOutPrivate->GraphicsOutput.Mode->Info->PixelFormat = PixelBltOnly;
|
|
||||||
ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
|
||||||
ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
|
ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
|
||||||
ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;
|
ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;
|
||||||
|
|
||||||
@ -2464,14 +2470,15 @@ Returns:
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
TEXT_OUT_GOP_MODE *Mode;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;
|
||||||
UINTN SizeOfInfo;
|
UINTN SizeOfInfo;
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *CurrentGraphicsOutputMode;
|
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *CurrentGraphicsOutputMode;
|
||||||
TEXT_OUT_GOP_MODE *ModeBuffer;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeBuffer;
|
||||||
TEXT_OUT_GOP_MODE *MatchedMode;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *MatchedMode;
|
||||||
UINTN NumberIndex;
|
UINTN NumberIndex;
|
||||||
BOOLEAN Match;
|
BOOLEAN Match;
|
||||||
|
BOOLEAN AlreadyExist;
|
||||||
|
|
||||||
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
|
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
@ -2479,6 +2486,17 @@ Returns:
|
|||||||
|
|
||||||
CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;
|
CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;
|
||||||
|
|
||||||
|
Index = 0;
|
||||||
|
|
||||||
|
if (Private->CurrentNumberOfUgaDraw != 0) {
|
||||||
|
//
|
||||||
|
// If any UGA device has already been added, then there is no need to
|
||||||
|
// calculate intersection of display mode of different GOP/UGA device,
|
||||||
|
// since only one display mode will be exported (i.e. user-defined mode)
|
||||||
|
//
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
|
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
if (Private->CurrentNumberOfGraphicsOutput == 0) {
|
if (Private->CurrentNumberOfGraphicsOutput == 0) {
|
||||||
//
|
//
|
||||||
@ -2494,7 +2512,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Allocate resource for the private mode buffer
|
// Allocate resource for the private mode buffer
|
||||||
//
|
//
|
||||||
ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * GraphicsOutput->Mode->MaxMode);
|
ModeBuffer = AllocatePool (GraphicsOutput->Mode->SizeOfInfo * GraphicsOutput->Mode->MaxMode);
|
||||||
if (ModeBuffer == NULL) {
|
if (ModeBuffer == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
@ -2510,8 +2528,7 @@ Returns:
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
Mode->HorizontalResolution = Info->HorizontalResolution;
|
CopyMem (Mode, Info, SizeOfInfo);
|
||||||
Mode->VerticalResolution = Info->VerticalResolution;
|
|
||||||
Mode++;
|
Mode++;
|
||||||
FreePool (Info);
|
FreePool (Info);
|
||||||
}
|
}
|
||||||
@ -2519,7 +2536,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Check intersection of display mode
|
// Check intersection of display mode
|
||||||
//
|
//
|
||||||
ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * CurrentGraphicsOutputMode->MaxMode);
|
ModeBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION) * CurrentGraphicsOutputMode->MaxMode);
|
||||||
if (ModeBuffer == NULL) {
|
if (ModeBuffer == NULL) {
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
@ -2544,9 +2561,29 @@ Returns:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Match) {
|
if (Match) {
|
||||||
CopyMem (MatchedMode, Mode, sizeof (TEXT_OUT_GOP_MODE));
|
AlreadyExist = FALSE;
|
||||||
|
|
||||||
|
for (Info = ModeBuffer; Info < MatchedMode; Info++) {
|
||||||
|
if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&
|
||||||
|
(Info->VerticalResolution == Mode->VerticalResolution)) {
|
||||||
|
AlreadyExist = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!AlreadyExist) {
|
||||||
|
CopyMem (MatchedMode, Mode, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||||
|
|
||||||
|
//
|
||||||
|
// Physical frame buffer is no longer available, change PixelFormat to PixelBltOnly
|
||||||
|
//
|
||||||
|
MatchedMode->Version = 0;
|
||||||
|
MatchedMode->PixelFormat = PixelBltOnly;
|
||||||
|
ZeroMem (&MatchedMode->PixelInformation, sizeof (EFI_PIXEL_BITMASK));
|
||||||
|
|
||||||
MatchedMode++;
|
MatchedMode++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Mode++;
|
Mode++;
|
||||||
}
|
}
|
||||||
@ -2560,7 +2597,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Physical frame buffer is no longer available when there are more than one physical GOP devices
|
// Physical frame buffer is no longer available when there are more than one physical GOP devices
|
||||||
//
|
//
|
||||||
CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (TEXT_OUT_GOP_MODE));
|
CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||||
CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;
|
CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;
|
||||||
ZeroMem (&CurrentGraphicsOutputMode->Info->PixelInformation, sizeof (EFI_PIXEL_BITMASK));
|
ZeroMem (&CurrentGraphicsOutputMode->Info->PixelInformation, sizeof (EFI_PIXEL_BITMASK));
|
||||||
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
||||||
@ -2584,21 +2621,19 @@ Returns:
|
|||||||
Index = 0;
|
Index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
}
|
||||||
// Current mode number may need update now, so set it to an invalide mode number
|
if (UgaDraw != NULL) {
|
||||||
//
|
|
||||||
CurrentGraphicsOutputMode->Mode = 0xffff;
|
|
||||||
} else {
|
|
||||||
//
|
//
|
||||||
// For UGA device, it's inconvenient to retrieve all the supported display modes.
|
// For UGA device, it's inconvenient to retrieve all the supported display modes.
|
||||||
// To simplify the implementation, only add one resolution(800x600, 32bit color depth) as defined in UEFI spec
|
// To simplify the implementation, only add one resolution(800x600, 32bit color depth) as defined in UEFI spec
|
||||||
//
|
//
|
||||||
CurrentGraphicsOutputMode->MaxMode = 1;
|
CurrentGraphicsOutputMode->MaxMode = 1;
|
||||||
CurrentGraphicsOutputMode->Info->Version = 0;
|
Info = CurrentGraphicsOutputMode->Info;
|
||||||
CurrentGraphicsOutputMode->Info->HorizontalResolution = 800;
|
Info->Version = 0;
|
||||||
CurrentGraphicsOutputMode->Info->VerticalResolution = 600;
|
Info->HorizontalResolution = 800;
|
||||||
CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;
|
Info->VerticalResolution = 600;
|
||||||
CurrentGraphicsOutputMode->Info->PixelsPerScanLine = 800;
|
Info->PixelFormat = PixelBltOnly;
|
||||||
|
Info->PixelsPerScanLine = 800;
|
||||||
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
||||||
CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
|
CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;
|
||||||
CurrentGraphicsOutputMode->FrameBufferSize = 0;
|
CurrentGraphicsOutputMode->FrameBufferSize = 0;
|
||||||
@ -2606,26 +2641,33 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Update the private mode buffer
|
// Update the private mode buffer
|
||||||
//
|
//
|
||||||
ModeBuffer = &Private->GraphicsOutputModeBuffer[0];
|
CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
|
||||||
ModeBuffer->HorizontalResolution = 800;
|
|
||||||
ModeBuffer->VerticalResolution = 600;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Current mode is unknow now, set it to an invalid mode number 0xffff
|
// Only mode 0 is available to be set
|
||||||
//
|
//
|
||||||
CurrentGraphicsOutputMode->Mode = 0xffff;
|
|
||||||
Index = 0;
|
Index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Done:
|
||||||
|
|
||||||
|
if (GraphicsOutput != NULL) {
|
||||||
|
Private->CurrentNumberOfGraphicsOutput++;
|
||||||
|
}
|
||||||
|
if (UgaDraw != NULL) {
|
||||||
|
Private->CurrentNumberOfUgaDraw++;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Force GraphicsOutput mode to be set,
|
// Force GraphicsOutput mode to be set,
|
||||||
// regardless whether the console is in EfiConsoleControlScreenGraphics or EfiConsoleControlScreenText mode
|
// regardless whether the console is in EfiConsoleControlScreenGraphics or EfiConsoleControlScreenText mode
|
||||||
//
|
//
|
||||||
Private->HardwareNeedsStarting = TRUE;
|
Private->HardwareNeedsStarting = TRUE;
|
||||||
|
//
|
||||||
|
// Current mode number may need update now, so set it to an invalid mode number
|
||||||
|
//
|
||||||
Status = Private->GraphicsOutput.SetMode (&Private->GraphicsOutput, (UINT32) Index);
|
Status = Private->GraphicsOutput.SetMode (&Private->GraphicsOutput, (UINT32) Index);
|
||||||
|
|
||||||
Private->CurrentNumberOfGraphicsOutput++;
|
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2737,7 +2779,7 @@ Returns:
|
|||||||
//
|
//
|
||||||
// The new console supports the same mode of the current console so sync up
|
// The new console supports the same mode of the current console so sync up
|
||||||
//
|
//
|
||||||
DevNullSyncGopStdOut (Private);
|
DevNullSyncStdOut (Private);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// If ConOut, then set the mode to Mode #0 which us 80 x 25
|
// If ConOut, then set the mode to Mode #0 which us 80 x 25
|
||||||
@ -2781,6 +2823,14 @@ Returns:
|
|||||||
if (TextOutList->TextOut == TextOut) {
|
if (TextOutList->TextOut == TextOut) {
|
||||||
CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
|
CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
|
||||||
CurrentNumOfConsoles--;
|
CurrentNumOfConsoles--;
|
||||||
|
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
||||||
|
if (TextOutList->UgaDraw != NULL) {
|
||||||
|
Private->CurrentNumberOfUgaDraw--;
|
||||||
|
}
|
||||||
|
if (TextOutList->GraphicsOutput != NULL) {
|
||||||
|
Private->CurrentNumberOfGraphicsOutput--;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,11 +171,6 @@ typedef struct {
|
|||||||
BOOLEAN TextOutEnabled;
|
BOOLEAN TextOutEnabled;
|
||||||
} TEXT_OUT_AND_GOP_DATA;
|
} TEXT_OUT_AND_GOP_DATA;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINT32 HorizontalResolution;
|
|
||||||
UINT32 VerticalResolution;
|
|
||||||
} TEXT_OUT_GOP_MODE;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT64 Signature;
|
UINT64 Signature;
|
||||||
EFI_HANDLE VirtualHandle;
|
EFI_HANDLE VirtualHandle;
|
||||||
@ -191,8 +186,9 @@ typedef struct {
|
|||||||
|
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
|
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
|
||||||
TEXT_OUT_GOP_MODE *GraphicsOutputModeBuffer;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;
|
||||||
UINTN CurrentNumberOfGraphicsOutput;
|
UINTN CurrentNumberOfGraphicsOutput;
|
||||||
|
UINTN CurrentNumberOfUgaDraw;
|
||||||
BOOLEAN HardwareNeedsStarting;
|
BOOLEAN HardwareNeedsStarting;
|
||||||
|
|
||||||
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
|
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
|
||||||
@ -1369,7 +1365,7 @@ DevNullTextOutEnableCursor (
|
|||||||
;
|
;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullSyncGopStdOut (
|
DevNullSyncStdOut (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -15,7 +15,7 @@ Module Name:
|
|||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
Support for ConsoleControl protocol. Support for UGA Draw spliter.
|
Support for ConsoleControl protocol. Support for Graphics output spliter.
|
||||||
Support for DevNull Console Out. This console uses memory buffers
|
Support for DevNull Console Out. This console uses memory buffers
|
||||||
to represnt the console. It allows a console to start very early and
|
to represnt the console. It allows a console to start very early and
|
||||||
when a new console is added it is synced up with the current console
|
when a new console is added it is synced up with the current console
|
||||||
@ -39,13 +39,13 @@ ConSpliterConsoleControlGetMode (
|
|||||||
|
|
||||||
Routine Description:
|
Routine Description:
|
||||||
Return the current video mode information. Also returns info about existence
|
Return the current video mode information. Also returns info about existence
|
||||||
of UGA Draw devices in system, and if the Std In device is locked. All the
|
of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
|
||||||
arguments are optional and only returned if a non NULL pointer is passed in.
|
arguments are optional and only returned if a non NULL pointer is passed in.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This - Protocol instance pointer.
|
This - Protocol instance pointer.
|
||||||
Mode - Are we in text of grahics mode.
|
Mode - Are we in text of grahics mode.
|
||||||
UgaExists - TRUE if UGA Spliter has found a UGA device
|
GopExists - TRUE if GOP Spliter has found a GOP/UGA device
|
||||||
StdInLocked - TRUE if StdIn device is keyboard locked
|
StdInLocked - TRUE if StdIn device is keyboard locked
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -155,7 +155,7 @@ ConSpliterConsoleControlSetMode (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Mode == EfiConsoleControlScreenText) {
|
if (Mode == EfiConsoleControlScreenText) {
|
||||||
DevNullSyncGopStdOut (Private);
|
DevNullSyncStdOut (Private);
|
||||||
}
|
}
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -189,7 +189,6 @@ ConSpliterGraphicsOutputQueryMode (
|
|||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
TEXT_OUT_GOP_MODE *Mode;
|
|
||||||
|
|
||||||
if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
|
if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -212,11 +211,7 @@ ConSpliterGraphicsOutputQueryMode (
|
|||||||
|
|
||||||
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
|
||||||
|
|
||||||
CopyMem (*Info, Private->GraphicsOutput.Mode->Info, *SizeOfInfo);
|
CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
|
||||||
Mode = &Private->GraphicsOutputModeBuffer[ModeNumber];
|
|
||||||
(*Info)->HorizontalResolution = Mode->HorizontalResolution;
|
|
||||||
(*Info)->VerticalResolution = Mode->VerticalResolution;
|
|
||||||
(*Info)->PixelsPerScanLine = Mode->HorizontalResolution;
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -248,7 +243,7 @@ Routine Description:
|
|||||||
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_STATUS ReturnStatus;
|
EFI_STATUS ReturnStatus;
|
||||||
TEXT_OUT_GOP_MODE *Mode;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||||
UINTN NumberIndex;
|
UINTN NumberIndex;
|
||||||
@ -335,10 +330,7 @@ Routine Description:
|
|||||||
|
|
||||||
This->Mode->Mode = ModeNumber;
|
This->Mode->Mode = ModeNumber;
|
||||||
|
|
||||||
Info = This->Mode->Info;
|
CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
|
||||||
Info->HorizontalResolution = Mode->HorizontalResolution;
|
|
||||||
Info->VerticalResolution = Mode->VerticalResolution;
|
|
||||||
Info->PixelsPerScanLine = Mode->HorizontalResolution;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Information is not enough here, so the following items remain unchanged:
|
// Information is not enough here, so the following items remain unchanged:
|
||||||
@ -1526,7 +1518,7 @@ DevNullTextOutEnableCursor (
|
|||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
DevNullSyncGopStdOut (
|
DevNullSyncStdOut (
|
||||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
Reference in New Issue
Block a user