]> git.ipfire.org Git - thirdparty/systemd.git/commit
boot/efi: improve automatic mode handling
authorHenrique Dante de Almeida <hdante@gmail.com>
Sat, 16 Dec 2017 23:12:53 +0000 (21:12 -0200)
committerHenrique Dante de Almeida <hdante@gmail.com>
Sat, 3 Feb 2018 19:37:16 +0000 (17:37 -0200)
commit26e51d87f7b9c50cc215dc9ccc78fa99f5225a82
treee8e193a619ff60dd9be98e77add3b6470a739c0a
parent68d4b8ac9b9673637fa198b735f6e64b78b35d3b
boot/efi: improve automatic mode handling

This patch improves the automatic console mode switching by avoiding
changing the mode if it can verify that the text is readable in the
default mode. The implementation avoids changing mode if we're using a
low resolution device (fixed to be smaller than 1920x1080) because we
assume the text is readable, so the initial mode should be a good one.
Also, the mode is not changed when in high resolution mode if the text
viewport area is larger than 10% of the screen. The conclusion is that
only if the text viewport is calculated to occupy less than 10% of the
screen area it is assumed to be hard to read and a new mode is selected.

With this patch the auto mode will typically avoid changing mode
hopefully in most of the cases, only changing it if completely
necessary.
src/boot/efi/console.c