Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 41b32312c47e2b8fdc5b0dacb4d7c1a4d159fcf0
https://github.com/tianocore/edk2/commit/41b32312c47e2b8fdc5b0dacb4d7c1a4d159fcf0
Author: Ashraf Ali S <[email protected]>
Date: 2026-02-28 (Sat, 28 Feb 2026)
Changed paths:
M MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
Log Message:
-----------
MdeModulePkg: Fix PreferMode selection for same-width text modes
The current PreferMode selection logic requires both Columns AND Rows to
be strictly greater (>) than the current maximum, which fails when a
text mode has the same column count but more rows.
Example failure case (1920x1200 display):
- Mode 5: 240x56 - Selected as PreferMode
- Mode 6: 240x63 - Rejected because 240 is not > 240
This mismatch causes ConsplitterSetConsoleOutMode to later request
Mode 6, triggering an unnecessary text mode change and clearing the
screen during console init.
Root Cause:
GraphicsConsole used: if ((Col > Max) && (Row > Max))
This fails when only rows increase while columns stay the same.
Solution:
Change to: if ((Col >= Max) && (Row >= Max))
This aligns with ConSplitter mode selection logic and correctly selects
the mode with the highest column and row counts.
After fix (1920x1200 display):
- Mode 5: 240x56
- Mode 6: 240x63 - Correctly selected as PreferMode
This ensures GraphicsConsole and ConSplitter match on the preferred mode
preventing unnecessary screen clears during console initialization.
Signed-off-by: Ashraf Ali S <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits