diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-18 03:40:29 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-18 03:40:29 +0000 |
commit | d6e11f223065ed83ce38e84a9a00e20dfa37bc2d (patch) | |
tree | 5c90eb716e1e280781e6a83f3371dc2dfb028b07 /MdeModulePkg | |
parent | 1f1cb2f2166f48a63b54dfc40f43c1a998e00a37 (diff) | |
download | edk2-d6e11f223065ed83ce38e84a9a00e20dfa37bc2d.tar.gz edk2-d6e11f223065ed83ce38e84a9a00e20dfa37bc2d.tar.bz2 edk2-d6e11f223065ed83ce38e84a9a00e20dfa37bc2d.zip |
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
Diffstat (limited to 'MdeModulePkg')
3 files changed, 46 insertions, 37 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 109caf7306..763dee2c21 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -107,18 +107,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = { // Uga Draw Protocol Private Data template
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {
- ConSpliterUgaDrawGetMode,
- ConSpliterUgaDrawSetMode,
- ConSpliterUgaDrawBlt
+ ConSplitterUgaDrawGetMode,
+ ConSplitterUgaDrawSetMode,
+ ConSplitterUgaDrawBlt
};
//
// Graphics Output Protocol Private Data template
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate = {
- ConSpliterGraphicsOutputQueryMode,
- ConSpliterGraphicsOutputSetMode,
- ConSpliterGraphicsOutputBlt,
+ ConSplitterGraphicsOutputQueryMode,
+ ConSplitterGraphicsOutputSetMode,
+ ConSplitterGraphicsOutputBlt,
NULL
};
@@ -671,7 +671,7 @@ ConSplitterTextOutConstructor ( //
// 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)) {
//
@@ -2951,6 +2951,7 @@ ConSplitterTextOutAddDevice ( TEXT_OUT_AND_GOP_DATA *TextAndGop;
UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
+ EFI_STATUS DeviceStatus;
Status = EFI_SUCCESS;
CurrentNumOfConsoles = Private->CurrentNumberOfConsoles;
@@ -2959,7 +2960,6 @@ ConSplitterTextOutAddDevice ( // If the Text Out List is full, enlarge it by calling ConSplitterGrowBuffer().
//
while (CurrentNumOfConsoles >= Private->TextOutListCount) {
- CpuBreakpoint ();
Status = ConSplitterGrowBuffer (
sizeof (TEXT_OUT_AND_GOP_DATA),
&Private->TextOutListCount,
@@ -3004,20 +3004,17 @@ ConSplitterTextOutAddDevice ( MaxMode = Private->TextOutMode.MaxMode;
ASSERT (MaxMode >= 1);
+ DeviceStatus = EFI_DEVICE_ERROR;
if (FeaturePcdGet (PcdConOutGopSupport)) {
//
// 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);
+ DeviceStatus = ConSplitterAddGraphicsOutputMode (Private, GraphicsOutput, UgaDraw);
}
}
if (FeaturePcdGet (PcdConOutUgaSupport)) {
- UgaHorizontalResolution = 800;
- UgaVerticalResolution = 600;
- UgaColorDepth = 32;
- UgaRefreshRate = 60;
Status = EFI_DEVICE_ERROR;
//
@@ -3043,19 +3040,31 @@ ConSplitterTextOutAddDevice ( &UgaColorDepth,
&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
- );
}
//
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index 846c065bb8..e802bf1442 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -1773,7 +1773,7 @@ ConSplitterGrowBuffer ( **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputQueryMode (
+ConSplitterGraphicsOutputQueryMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo,
@@ -1795,7 +1795,7 @@ ConSpliterGraphicsOutputQueryMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputSetMode (
+ConSplitterGraphicsOutputSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber
);
@@ -1848,7 +1848,7 @@ ConSpliterGraphicsOutputSetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputBlt (
+ConSplitterGraphicsOutputBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
@@ -1878,7 +1878,7 @@ ConSpliterGraphicsOutputBlt ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawGetMode (
+ConSplitterUgaDrawGetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
OUT UINT32 *HorizontalResolution,
OUT UINT32 *VerticalResolution,
@@ -1902,7 +1902,7 @@ ConSpliterUgaDrawGetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawSetMode (
+ConSplitterUgaDrawSetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN UINT32 HorizontalResolution,
IN UINT32 VerticalResolution,
@@ -1961,7 +1961,7 @@ ConSpliterUgaDrawSetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawBlt (
+ConSplitterUgaDrawBlt (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
IN EFI_UGA_BLT_OPERATION BltOperation,
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c index baa8d10dbe..f01e0a7b8d 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c @@ -37,7 +37,7 @@ CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL }; **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputQueryMode (
+ConSplitterGraphicsOutputQueryMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo,
@@ -87,7 +87,7 @@ ConSpliterGraphicsOutputQueryMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputSetMode (
+ConSplitterGraphicsOutputSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber
)
@@ -219,7 +219,7 @@ ConSpliterGraphicsOutputSetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterGraphicsOutputBlt (
+ConSplitterGraphicsOutputBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
@@ -315,7 +315,7 @@ ConSpliterGraphicsOutputBlt ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawGetMode (
+ConSplitterUgaDrawGetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
OUT UINT32 *HorizontalResolution,
OUT UINT32 *VerticalResolution,
@@ -361,7 +361,7 @@ ConSpliterUgaDrawGetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawSetMode (
+ConSplitterUgaDrawSetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN UINT32 HorizontalResolution,
IN UINT32 VerticalResolution,
@@ -489,7 +489,7 @@ ConSpliterUgaDrawSetMode ( **/
EFI_STATUS
EFIAPI
-ConSpliterUgaDrawBlt (
+ConSplitterUgaDrawBlt (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
IN EFI_UGA_BLT_OPERATION BltOperation,
|