summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/GraphicsConsoleDxe
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-18 09:19:29 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2010-06-18 09:19:29 +0000
commit46f0e2a9eeb384eeff020b69a95b9277ee7c5a16 (patch)
tree69486a626127d82adf2a5be825c09315a4ea4794 /MdeModulePkg/Universal/Console/GraphicsConsoleDxe
parent35f9e94ed4cdd3aef83a41624d638a6773779668 (diff)
downloadedk2-46f0e2a9eeb384eeff020b69a95b9277ee7c5a16.zip
edk2-46f0e2a9eeb384eeff020b69a95b9277ee7c5a16.tar.gz
edk2-46f0e2a9eeb384eeff020b69a95b9277ee7c5a16.tar.bz2
Remove some unnecessary clear screen from console drivers.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10590 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/GraphicsConsoleDxe')
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 8e612c8..1ff37fa 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 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2010, 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
@@ -640,10 +640,18 @@ CheckModeSupported (
if (!EFI_ERROR (Status)) {
if ((Info->HorizontalResolution == HorizontalResolution) &&
(Info->VerticalResolution == VerticalResolution)) {
- Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
- if (!EFI_ERROR (Status)) {
- FreePool (Info);
+ if ((GraphicsOutput->Mode->Info->HorizontalResolution == HorizontalResolution) &&
+ (GraphicsOutput->Mode->Info->VerticalResolution == VerticalResolution)) {
+ //
+ // If video device has been set to this mode, we do not need to SetMode again
+ //
break;
+ } else {
+ Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
+ if (!EFI_ERROR (Status)) {
+ FreePool (Info);
+ break;
+ }
}
}
FreePool (Info);