1. remove duplicated set operation on UGA device.
2. update some typo. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8320 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1f1cb2f216
commit
d6e11f2230
@ -107,18 +107,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
|||||||
// Uga Draw Protocol Private Data template
|
// Uga Draw Protocol Private Data template
|
||||||
//
|
//
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {
|
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {
|
||||||
ConSpliterUgaDrawGetMode,
|
ConSplitterUgaDrawGetMode,
|
||||||
ConSpliterUgaDrawSetMode,
|
ConSplitterUgaDrawSetMode,
|
||||||
ConSpliterUgaDrawBlt
|
ConSplitterUgaDrawBlt
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Graphics Output Protocol Private Data template
|
// Graphics Output Protocol Private Data template
|
||||||
//
|
//
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate = {
|
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate = {
|
||||||
ConSpliterGraphicsOutputQueryMode,
|
ConSplitterGraphicsOutputQueryMode,
|
||||||
ConSpliterGraphicsOutputSetMode,
|
ConSplitterGraphicsOutputSetMode,
|
||||||
ConSpliterGraphicsOutputBlt,
|
ConSplitterGraphicsOutputBlt,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -671,7 +671,7 @@ ConSplitterTextOutConstructor (
|
|||||||
//
|
//
|
||||||
// Setup the UgaDraw to 800 x 600 x 32 bits per pixel, 60Hz.
|
// Setup the UgaDraw to 800 x 600 x 32 bits per pixel, 60Hz.
|
||||||
//
|
//
|
||||||
ConSpliterUgaDrawSetMode (&ConOutPrivate->UgaDraw, 800, 600, 32, 60);
|
ConSplitterUgaDrawSetMode (&ConOutPrivate->UgaDraw, 800, 600, 32, 60);
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
||||||
//
|
//
|
||||||
@ -2951,6 +2951,7 @@ ConSplitterTextOutAddDevice (
|
|||||||
TEXT_OUT_AND_GOP_DATA *TextAndGop;
|
TEXT_OUT_AND_GOP_DATA *TextAndGop;
|
||||||
UINTN SizeOfInfo;
|
UINTN SizeOfInfo;
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||||
|
EFI_STATUS DeviceStatus;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
CurrentNumOfConsoles = Private->CurrentNumberOfConsoles;
|
CurrentNumOfConsoles = Private->CurrentNumberOfConsoles;
|
||||||
@ -2959,7 +2960,6 @@ ConSplitterTextOutAddDevice (
|
|||||||
// If the Text Out List is full, enlarge it by calling ConSplitterGrowBuffer().
|
// If the Text Out List is full, enlarge it by calling ConSplitterGrowBuffer().
|
||||||
//
|
//
|
||||||
while (CurrentNumOfConsoles >= Private->TextOutListCount) {
|
while (CurrentNumOfConsoles >= Private->TextOutListCount) {
|
||||||
CpuBreakpoint ();
|
|
||||||
Status = ConSplitterGrowBuffer (
|
Status = ConSplitterGrowBuffer (
|
||||||
sizeof (TEXT_OUT_AND_GOP_DATA),
|
sizeof (TEXT_OUT_AND_GOP_DATA),
|
||||||
&Private->TextOutListCount,
|
&Private->TextOutListCount,
|
||||||
@ -3004,20 +3004,17 @@ ConSplitterTextOutAddDevice (
|
|||||||
MaxMode = Private->TextOutMode.MaxMode;
|
MaxMode = Private->TextOutMode.MaxMode;
|
||||||
ASSERT (MaxMode >= 1);
|
ASSERT (MaxMode >= 1);
|
||||||
|
|
||||||
|
DeviceStatus = EFI_DEVICE_ERROR;
|
||||||
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
||||||
//
|
//
|
||||||
// If GOP is produced by Consplitter, this device display mode will be added into Graphics Ouput modes.
|
// If GOP is produced by Consplitter, this device display mode will be added into Graphics Ouput modes.
|
||||||
//
|
//
|
||||||
if ((GraphicsOutput != NULL) || (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport))) {
|
if ((GraphicsOutput != NULL) || (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport))) {
|
||||||
ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
|
DeviceStatus = ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||||
UgaHorizontalResolution = 800;
|
|
||||||
UgaVerticalResolution = 600;
|
|
||||||
UgaColorDepth = 32;
|
|
||||||
UgaRefreshRate = 60;
|
|
||||||
|
|
||||||
Status = EFI_DEVICE_ERROR;
|
Status = EFI_DEVICE_ERROR;
|
||||||
//
|
//
|
||||||
@ -3043,19 +3040,31 @@ ConSplitterTextOutAddDevice (
|
|||||||
&UgaColorDepth,
|
&UgaColorDepth,
|
||||||
&UgaRefreshRate
|
&UgaRefreshRate
|
||||||
);
|
);
|
||||||
|
if (!EFI_ERROR (Status) && EFI_ERROR (DeviceStatus)) {
|
||||||
|
//
|
||||||
|
// if GetMode is successfully and UGA device hasn't been set, set it
|
||||||
|
//
|
||||||
|
Status = ConSplitterUgaDrawSetMode (
|
||||||
|
&Private->UgaDraw,
|
||||||
|
UgaHorizontalResolution,
|
||||||
|
UgaVerticalResolution,
|
||||||
|
UgaColorDepth,
|
||||||
|
UgaRefreshRate
|
||||||
|
);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// If GetMode/SetMode is failed, set to 800x600 mode
|
||||||
|
//
|
||||||
|
if(EFI_ERROR (Status)) {
|
||||||
|
Status = ConSplitterUgaDrawSetMode (
|
||||||
|
&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
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1773,7 +1773,7 @@ ConSplitterGrowBuffer (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputQueryMode (
|
ConSplitterGraphicsOutputQueryMode (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT UINTN *SizeOfInfo,
|
OUT UINTN *SizeOfInfo,
|
||||||
@ -1795,7 +1795,7 @@ ConSpliterGraphicsOutputQueryMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputSetMode (
|
ConSplitterGraphicsOutputSetMode (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
);
|
);
|
||||||
@ -1848,7 +1848,7 @@ ConSpliterGraphicsOutputSetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputBlt (
|
ConSplitterGraphicsOutputBlt (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
|
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
||||||
@ -1878,7 +1878,7 @@ ConSpliterGraphicsOutputBlt (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawGetMode (
|
ConSplitterUgaDrawGetMode (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
OUT UINT32 *HorizontalResolution,
|
OUT UINT32 *HorizontalResolution,
|
||||||
OUT UINT32 *VerticalResolution,
|
OUT UINT32 *VerticalResolution,
|
||||||
@ -1902,7 +1902,7 @@ ConSpliterUgaDrawGetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawSetMode (
|
ConSplitterUgaDrawSetMode (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
IN UINT32 HorizontalResolution,
|
IN UINT32 HorizontalResolution,
|
||||||
IN UINT32 VerticalResolution,
|
IN UINT32 VerticalResolution,
|
||||||
@ -1961,7 +1961,7 @@ ConSpliterUgaDrawSetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawBlt (
|
ConSplitterUgaDrawBlt (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
IN EFI_UGA_BLT_OPERATION BltOperation,
|
||||||
|
@ -37,7 +37,7 @@ CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputQueryMode (
|
ConSplitterGraphicsOutputQueryMode (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
IN UINT32 ModeNumber,
|
IN UINT32 ModeNumber,
|
||||||
OUT UINTN *SizeOfInfo,
|
OUT UINTN *SizeOfInfo,
|
||||||
@ -87,7 +87,7 @@ ConSpliterGraphicsOutputQueryMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputSetMode (
|
ConSplitterGraphicsOutputSetMode (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||||
IN UINT32 ModeNumber
|
IN UINT32 ModeNumber
|
||||||
)
|
)
|
||||||
@ -219,7 +219,7 @@ ConSpliterGraphicsOutputSetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterGraphicsOutputBlt (
|
ConSplitterGraphicsOutputBlt (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
|
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
||||||
@ -315,7 +315,7 @@ ConSpliterGraphicsOutputBlt (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawGetMode (
|
ConSplitterUgaDrawGetMode (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
OUT UINT32 *HorizontalResolution,
|
OUT UINT32 *HorizontalResolution,
|
||||||
OUT UINT32 *VerticalResolution,
|
OUT UINT32 *VerticalResolution,
|
||||||
@ -361,7 +361,7 @@ ConSpliterUgaDrawGetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawSetMode (
|
ConSplitterUgaDrawSetMode (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
IN UINT32 HorizontalResolution,
|
IN UINT32 HorizontalResolution,
|
||||||
IN UINT32 VerticalResolution,
|
IN UINT32 VerticalResolution,
|
||||||
@ -489,7 +489,7 @@ ConSpliterUgaDrawSetMode (
|
|||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSpliterUgaDrawBlt (
|
ConSplitterUgaDrawBlt (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *This,
|
IN EFI_UGA_DRAW_PROTOCOL *This,
|
||||||
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
|
||||||
IN EFI_UGA_BLT_OPERATION BltOperation,
|
IN EFI_UGA_BLT_OPERATION BltOperation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user