summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-12-25 08:21:01 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2012-12-25 08:21:01 +0000
commitc84f0482249b06674fb95cd41b78f4c5ec012f1e (patch)
tree8c4d00b1ce7479799b597982eb5edb569c8c64f2 /MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
parent51f65b37398fa5d488f5e36073d9700eca8cc193 (diff)
downloadedk2-platforms-c84f0482249b06674fb95cd41b78f4c5ec012f1e.tar.xz
Set graphic mode if graphic mode is not same with the one which GraphicsConsole driver find by itself.
Signed-off-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> Reviewed-by: Tian Hot <hot.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14023 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c')
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 52b0ec651c..212564a5c8 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -497,6 +497,19 @@ GraphicsConsoleControllerDriverStart (
}
}
}
+ if (ModeNumber != Private->GraphicsOutput->Mode->Mode) {
+ //
+ // Current graphics mode is not set or is not set to the mode which we has found,
+ // set the new graphic mode.
+ //
+ Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
+ if (EFI_ERROR (Status)) {
+ //
+ // The mode set operation failed
+ //
+ goto Error;
+ }
+ }
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
//
// At first try to set user-defined resolution