summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/GraphicsConsoleDxe
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-01-11 02:29:09 +0000
committerniruiyu <niruiyu@Edk2>2016-01-11 02:29:09 +0000
commite8e1bdd66afd5fe2d15a0b65a51ecc62755558a0 (patch)
tree5a033b045d1b27fb0af302cc47071877ff9b45c8 /MdeModulePkg/Universal/Console/GraphicsConsoleDxe
parentde3ecb331fc45550d41d35110948cb96e32df08a (diff)
downloadedk2-platforms-e8e1bdd66afd5fe2d15a0b65a51ecc62755558a0.tar.xz
MdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue
When the GOP doesn't support the resolution specified by PcdVideoHorizontalResolution and PcdVideoVerticalResolution, the code tries to set the resolution to 800x600 but uses the resolution equals to the PCD when calculating the text print position. The patch fixes the bug by updating the resolution to 800x600 for this case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19630 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/GraphicsConsoleDxe')
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 74218c8b4e..7b1c37b357 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -1,7 +1,7 @@
/** @file
This is the main routine for initializing the Graphics Console support routines.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@@ -480,10 +480,12 @@ GraphicsConsoleControllerDriverStart (
//
// if not supporting current mode, try 800x600 which is required by UEFI/EFI spec
//
+ HorizontalResolution = 800;
+ VerticalResolution = 600;
Status = CheckModeSupported (
Private->GraphicsOutput,
- 800,
- 600,
+ HorizontalResolution,
+ VerticalResolution,
&ModeNumber
);
Mode = Private->GraphicsOutput->Mode;