summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYao Yiqi <yaoyiqi3@huawei.com>2026-10-19 17:43:29 +0800
committerHelge Deller <deller@gmx.de>2026-10-20 22:29:20 +0200
commit10463bcd43495fb88ff667b2c5348200860f6bdc (patch)
tree1c7c250e5c5bc0a04809eb4262b0e4b8cf6d5778 /include/linux
parent06fccf840640d8f6b0e08a1756f8d2f0435b4cbe (diff)
fbcon: Include font geometry in the rotated font cache
fbcon_rotate_font() caches a rotated copy of the console font and skips the rebuild when the fontdata pointer and the rotation match. Raw font data carries no geometry, though: width, height and charcount live in vc->vc_font. fbcon_set_font() deduplicates uploads by byte equality, so the same bytes re-uploaded with different dimensions keep the fontdata pointer while the geometry changes, and the early-out skips the rebuild. The rotated cell size depends on the geometry (rotation swaps width and height), so the stale buffer is indexed with the new cell size. Re-uploading a 4x16 font as 16x8 on a CW-rotated console, for example, doubles the rotated cell size and reads past the end of the old buffer. Record the geometry the buffer was built from and compare it in the early-out. The pointer-only key used to be backed by an explicit width check in the deduplication, which commit 1e3c49aa03fb ("lib/fonts: Compare font data for equality with font_data_is_equal()") dropped. Fixes: 6cc50e1c5b57 ("[PATCH] fbcon: Console Rotation - Add support to rotate font bitmap") Cc: stable@vger.kernel.org Signed-off-by: Yao Yiqi <yaoyiqi3@huawei.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions