]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
Take the highest horizontal resolution as highest video resolution.
[mirror_edk2.git] / IntelFrameworkModulePkg / Csm / BiosThunk / VideoDxe / BiosVideo.c
index f38c968943d0d043cee1783982c2a82edd877712..fc9672651cc697a107ab73bacb7f0cec09a1d836 100644 (file)
@@ -1580,6 +1580,9 @@ BiosVideoCheckForVbe (
       continue;\r
     }\r
 \r
+    DEBUG ((EFI_D_INFO, "Video Controller Mode 0x%x: %d x %d\n",\r
+            VbeModeNumber, BiosVideoPrivate->VbeModeInformationBlock->XResolution, BiosVideoPrivate->VbeModeInformationBlock->YResolution));\r
+\r
     if (EdidFound && (ValidEdidTiming.ValidNumber > 0)) {\r
       //\r
       // EDID exist, check whether this mode match with any mode in EDID\r
@@ -1623,8 +1626,9 @@ BiosVideoCheckForVbe (
     //\r
     // Record the highest resolution mode to set later\r
     //\r
-    if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution >= HighestHorizontalResolution) &&\r
-        (BiosVideoPrivate->VbeModeInformationBlock->YResolution >= HighestVerticalResolution)) {\r
+    if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution > HighestHorizontalResolution) ||\r
+        ((BiosVideoPrivate->VbeModeInformationBlock->XResolution == HighestHorizontalResolution) && \r
+         (BiosVideoPrivate->VbeModeInformationBlock->YResolution > HighestVerticalResolution))) {\r
       HighestHorizontalResolution = BiosVideoPrivate->VbeModeInformationBlock->XResolution;\r
       HighestVerticalResolution = BiosVideoPrivate->VbeModeInformationBlock->YResolution;\r
       HighestResolutionMode = ModeNumber;\r