diff options
author | xgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 10:27:54 +0000 |
---|---|---|
committer | xgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 10:27:54 +0000 |
commit | e313deb9929eafe17428556d5a6b232ec1e4afe8 (patch) | |
tree | e8b4dc7a0f38840e833383c4be8e96038c5fa487 | |
parent | fb610f2ac1a90ea5ed11e43edd386739314e8cb1 (diff) | |
download | edk2-platforms-e313deb9929eafe17428556d5a6b232ec1e4afe8.tar.xz |
To fix,
1662 Graphics Console Driver: No checking for invalid parameter in SetMode()
8588 Graphic Console should not chech PixelFormat for 800*600 resolution
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2242 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c index 40e89a9170..05edbd0fec 100644 --- a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c +++ b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c @@ -378,9 +378,7 @@ GraphicsConsoleControllerDriverStart ( );
if (!EFI_ERROR (Status)) {
if ((Info->HorizontalResolution == 800) &&
- (Info->VerticalResolution == 600) &&
- ((Info->PixelFormat == PixelRedGreenBlueReserved8BitPerColor) ||
- (Info->PixelFormat == PixelBlueGreenRedReserved8BitPerColor))) {
+ (Info->VerticalResolution == 600)) {
Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
if (!EFI_ERROR (Status)) {
gBS->FreePool (Info);
@@ -1164,6 +1162,10 @@ GraphicsConsoleConOutSetMode ( UgaDraw = Private->UgaDraw;
ModeData = &(Private->ModeData[ModeNumber]);
+ if (ModeData->Columns <= 0 && ModeData->Rows <= 0) {
+ return EFI_UNSUPPORTED;
+ }
+
//
// Make sure the requested mode number is supported
//
|