From 7f7dba5c86cddb56e4df9121d08aac53f5b2c78d Mon Sep 17 00:00:00 2001 From: li-elvin Date: Tue, 22 Jan 2013 06:37:06 +0000 Subject: [PATCH] Take the highest horizontal resolution as highest video resolution. Signed-off-by: Li Elvin Reviewed-by: Ni Ruiyu Reviewed-by: Tian Hot git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14075 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Csm/BiosThunk/VideoDxe/BiosVideo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c index f38c968943..fc9672651c 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c @@ -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;