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