Take the highest horizontal resolution as highest video resolution.

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@14075 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2013-01-22 06:37:06 +00:00
parent 0666b5e858
commit 7f7dba5c86
1 changed files with 6 additions and 2 deletions

View File

@ -1580,6 +1580,9 @@ BiosVideoCheckForVbe (
continue;
}
DEBUG ((EFI_D_INFO, "Video Controller Mode 0x%x: %d x %d\n",
VbeModeNumber, BiosVideoPrivate->VbeModeInformationBlock->XResolution, BiosVideoPrivate->VbeModeInformationBlock->YResolution));
if (EdidFound && (ValidEdidTiming.ValidNumber > 0)) {
//
// EDID exist, check whether this mode match with any mode in EDID
@ -1623,8 +1626,9 @@ BiosVideoCheckForVbe (
//
// Record the highest resolution mode to set later
//
if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution >= HighestHorizontalResolution) &&
(BiosVideoPrivate->VbeModeInformationBlock->YResolution >= HighestVerticalResolution)) {
if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution > HighestHorizontalResolution) ||
((BiosVideoPrivate->VbeModeInformationBlock->XResolution == HighestHorizontalResolution) &&
(BiosVideoPrivate->VbeModeInformationBlock->YResolution > HighestVerticalResolution))) {
HighestHorizontalResolution = BiosVideoPrivate->VbeModeInformationBlock->XResolution;
HighestVerticalResolution = BiosVideoPrivate->VbeModeInformationBlock->YResolution;
HighestResolutionMode = ModeNumber;