]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "fbcon: don't lose the console font across generic->chip driver switch"
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 19 Dec 2022 16:05:00 +0000 (17:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:56 +0000 (09:33 +0100)
commit0e1530474efea38692e81da323a766886afc88f3
treed5e6df83d2dd34dd39b4ecc9a05ef1a6db5f880e
parent513e6bf64a775b69e9c7956aae01c2dbbe29effe
Revert "fbcon: don't lose the console font across generic->chip driver switch"

[ Upstream commit 8c38f3bbbbe63166c00f36dab2d87b84a0e3b115 ]

This reverts commit 8bd541dd6a273e7384868f10dd966b25da72596f.

Always free the console font when deinitializing the framebuffer
console. Subsequent framebuffer consoles will then use the default
font. Rely on userspace to load any user-configured font for these
consoles.

Commit 8bd541dd6a27 ("fbcon: don't lose the console font across
generic->chip driver switch") was introduced to work around losing
the font during graphics-device handover. [1][2] It kept a dangling
pointer with the font data between loading the two consoles, which is
fairly adventurous hack. It also never covered cases when the other
consoles, such as VGA text mode, where involved.

The problem has meanwhile been solved in userspace. Systemd comes
with a udev rule that re-installs the configured font when a console
comes up. [3] So the kernel workaround can be removed.

This also removes one of the two special cases triggered by setting
FBINFO_MISC_FIRMWARE in an fbdev driver.

Tested during device handover from efifb and simpledrm to radeon. Udev
reloads the configured console font for the new driver's terminal.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=892340
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1074624
Link: https://cgit.freedesktop.org/systemd/systemd/tree/src/vconsole/90-vconsole.rules.in?h=v222
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-3-tzimmermann@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/core/fbcon.c