edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe
Ashraf Ali S 41b32312c4 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 <ashraf.ali.s@intel.com>
2026-02-28 03:35:35 +00:00
..
ComponentName.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GraphicsConsole.c MdeModulePkg: Fix PreferMode selection for same-width text modes 2026-02-28 03:35:35 +00:00
GraphicsConsole.h MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
GraphicsConsoleDxe.inf MdeModulePkg/GraphicsConsoleDxe UGA 2025-07-08 15:42:03 +00:00
GraphicsConsoleDxe.uni MdeModulePkg/GraphicsConsoleDxe UGA 2025-07-08 15:42:03 +00:00
GraphicsConsoleDxeExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
LaffStd.c MdeModulePkg: remove garbage pixels in LaffStd glyphs 2023-01-20 17:39:25 +00:00