render / rpms / edk2

Forked from rpms/edk2 2 months ago
Clone

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

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