Blame SOURCES/0006-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch

cc9195
From 28faeb5f94b4866b9da16cf2a1e4e0fc09a26e37 Mon Sep 17 00:00:00 2001
cc9195
From: Laszlo Ersek <lersek@redhat.com>
cc9195
Date: Tue, 25 Feb 2014 18:40:35 +0100
cc9195
Subject: MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only)
cc9195
cc9195
Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 ->
cc9195
RHEL-8.0/20180508-ee3198e672e2 rebase:
cc9195
cc9195
- reorder the rebase changelog in the commit message so that it reads like
cc9195
  a blog: place more recent entries near the top
cc9195
- no changes to the patch body
cc9195
cc9195
Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase:
cc9195
cc9195
- update commit message as requested in
cc9195
  <https://bugzilla.redhat.com/show_bug.cgi?id=1503316#c0>
cc9195
cc9195
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
cc9195
cc9195
- no changes
cc9195
cc9195
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
cc9195
cc9195
- adapt commit 0bc77c63de03 (code and commit message) to upstream commit
cc9195
  390b95a49c14 ("MdeModulePkg/TerminalDxe: Refine
cc9195
  InitializeTerminalConsoleTextMode", 2017-01-10).
cc9195
cc9195
When the console output is multiplexed to several devices by
cc9195
ConSplitterDxe, then ConSplitterDxe builds an intersection of text modes
cc9195
supported by all console output devices.
cc9195
cc9195
Two notable output devices are provided by:
cc9195
(1) MdeModulePkg/Universal/Console/GraphicsConsoleDxe,
cc9195
(2) MdeModulePkg/Universal/Console/TerminalDxe.
cc9195
cc9195
GraphicsConsoleDxe supports four modes at most -- see
cc9195
InitializeGraphicsConsoleTextMode() and "mGraphicsConsoleModeData":
cc9195
cc9195
(1a) 80x25 (required by the UEFI spec as mode 0),
cc9195
(1b) 80x50 (not necessarily supported, but if it is, then the UEFI spec
cc9195
     requires the driver to provide it as mode 1),
cc9195
(1c) 100x31 (corresponding to graphics resolution 800x600, which the UEFI
cc9195
     spec requires from all plug-in graphics devices),
cc9195
(1d) "full screen" resolution, derived form the underlying GOP's
cc9195
     horizontal and vertical resolutions with division by EFI_GLYPH_WIDTH
cc9195
     (8) and EFI_GLYPH_HEIGHT (19), respectively.
cc9195
cc9195
The automatic "full screen resolution" makes GraphicsConsoleDxe's
cc9195
character console very flexible. However, TerminalDxe (which runs on
cc9195
serial ports) only provides the following fixed resolutions -- see
cc9195
InitializeTerminalConsoleTextMode() and "mTerminalConsoleModeData":
cc9195
cc9195
(2a) 80x25 (required by the UEFI spec as mode 0),
cc9195
(2b) 80x50 (since the character resolution of a serial device cannot be
cc9195
     interrogated easily, this is added unconditionally as mode 1),
cc9195
(2c) 100x31 (since the character resolution of a serial device cannot be
cc9195
     interrogated easily, this is added unconditionally as mode 2).
cc9195
cc9195
When ConSplitterDxe combines (1) and (2), multiplexing console output to
cc9195
both video output and serial terminal, the list of commonly supported text
cc9195
modes (ie. the "intersection") comprises:
cc9195
cc9195
(3a) 80x25, unconditionally, from (1a) and (2a),
cc9195
(3b) 80x50, if the graphics console provides at least 640x950 pixel
cc9195
     resolution, from (1b) and (2b)
cc9195
(3c) 100x31, if the graphics device is a plug-in one (because in that case
cc9195
     800x600 is a mandated pixel resolution), from (1c) and (2c).
cc9195
cc9195
Unfortunately, the "full screen resolution" (1d) of the GOP-based text
cc9195
console is not available in general.
cc9195
cc9195
Mitigate this problem by extending "mTerminalConsoleModeData" with a
cc9195
handful of text resolutions that are derived from widespread maximal pixel
cc9195
resolutions. This way TerminalDxe won't cause ConSplitterDxe to filter out
cc9195
the most frequent (1d) values from the intersection, and eg. the MODE
cc9195
command in the UEFI shell will offer the "best" (ie. full screen)
cc9195
resolution too.
cc9195
cc9195
Upstreaming efforts for this patch have been discontinued; it was clear
cc9195
from the off-list thread that consensus was impossible to reach.
cc9195
cc9195
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
cc9195
(cherry picked from commit 99dc3720ac86059f60156197328cc433603c536e)
cc9195
(cherry picked from commit d2066c1748f885043026c51dec1bc8d6d406ae8f)
cc9195
(cherry picked from commit 1facdd58e946c584a3dc1e5be8f2f837b5a7c621)
cc9195
---
cc9195
 .../Universal/Console/TerminalDxe/Terminal.c       | 41 ++++++++++++++++++++--
cc9195
 1 file changed, 38 insertions(+), 3 deletions(-)
cc9195
cc9195
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
cc9195
index 66dd3ad..78a1983 100644
cc9195
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
cc9195
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
cc9195
@@ -113,9 +113,44 @@ TERMINAL_DEV  mTerminalDevTemplate = {
cc9195
 };
cc9195
 
cc9195
 TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] = {
cc9195
-  {80,  25},
cc9195
-  {80,  50},
cc9195
-  {100, 31},
cc9195
+  {   80,  25 }, // from graphics resolution  640 x  480
cc9195
+  {   80,  50 }, // from graphics resolution  640 x  960
cc9195
+  {  100,  25 }, // from graphics resolution  800 x  480
cc9195
+  {  100,  31 }, // from graphics resolution  800 x  600
cc9195
+  {  104,  32 }, // from graphics resolution  832 x  624
cc9195
+  {  120,  33 }, // from graphics resolution  960 x  640
cc9195
+  {  128,  31 }, // from graphics resolution 1024 x  600
cc9195
+  {  128,  40 }, // from graphics resolution 1024 x  768
cc9195
+  {  144,  45 }, // from graphics resolution 1152 x  864
cc9195
+  {  144,  45 }, // from graphics resolution 1152 x  870
cc9195
+  {  160,  37 }, // from graphics resolution 1280 x  720
cc9195
+  {  160,  40 }, // from graphics resolution 1280 x  760
cc9195
+  {  160,  40 }, // from graphics resolution 1280 x  768
cc9195
+  {  160,  42 }, // from graphics resolution 1280 x  800
cc9195
+  {  160,  50 }, // from graphics resolution 1280 x  960
cc9195
+  {  160,  53 }, // from graphics resolution 1280 x 1024
cc9195
+  {  170,  40 }, // from graphics resolution 1360 x  768
cc9195
+  {  170,  40 }, // from graphics resolution 1366 x  768
cc9195
+  {  175,  55 }, // from graphics resolution 1400 x 1050
cc9195
+  {  180,  47 }, // from graphics resolution 1440 x  900
cc9195
+  {  200,  47 }, // from graphics resolution 1600 x  900
cc9195
+  {  200,  63 }, // from graphics resolution 1600 x 1200
cc9195
+  {  210,  55 }, // from graphics resolution 1680 x 1050
cc9195
+  {  240,  56 }, // from graphics resolution 1920 x 1080
cc9195
+  {  240,  63 }, // from graphics resolution 1920 x 1200
cc9195
+  {  240,  75 }, // from graphics resolution 1920 x 1440
cc9195
+  {  250, 105 }, // from graphics resolution 2000 x 2000
cc9195
+  {  256,  80 }, // from graphics resolution 2048 x 1536
cc9195
+  {  256, 107 }, // from graphics resolution 2048 x 2048
cc9195
+  {  320,  75 }, // from graphics resolution 2560 x 1440
cc9195
+  {  320,  84 }, // from graphics resolution 2560 x 1600
cc9195
+  {  320, 107 }, // from graphics resolution 2560 x 2048
cc9195
+  {  350, 110 }, // from graphics resolution 2800 x 2100
cc9195
+  {  400, 126 }, // from graphics resolution 3200 x 2400
cc9195
+  {  480, 113 }, // from graphics resolution 3840 x 2160
cc9195
+  {  512, 113 }, // from graphics resolution 4096 x 2160
cc9195
+  {  960, 227 }, // from graphics resolution 7680 x 4320
cc9195
+  { 1024, 227 }, // from graphics resolution 8192 x 4320
cc9195
   //
cc9195
   // New modes can be added here.
cc9195
   //
cc9195
-- 
cc9195
1.8.3.1
cc9195