From: sashiko-bot@kernel.org
To: "Alan Mackenzie" <acm@muc.de>
Cc: linux-serial@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [Patch 5/9]: vt: Amend three Kconfig files
Date: Thu, 27 Aug 2026 19:12:57 +0000 [thread overview]
Message-ID: <20260827191257.AE0A51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <apCG-zHyuMVYHJ6j@MAC.fritz.box>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Enabling CONFIG_FB_GLYPH_21BIT changes GLYPH_SZ to 4 globally, breaking hardware console drivers (like vgacon) and rotated fbcon drivers that still hardcode 16-bit screen buffer accesses.
- [Medium] FB_GLYPH_21BIT is a generic VT/fbdev feature but is inappropriately placed in the DRM clients menu, unnecessarily restricting its use.
--
commit 7b9fb605add2fa8c6f62e8ba79cee762cbcbd24c
Author: Alan Mackenzie <acm@muc.de>
vt: Amend three Kconfig files
Until it becomes clear how to integrate CONFIG_A11Y_BRAILLE_CONSOLE and
CONFIG_SPEAKUP, they will remain disabled when CONFIG_FB_GLYPH_21BIT is
#defined.
[ ... ]
> diff --git a/drivers/gpu/drm/clients/Kconfig b/drivers/gpu/drm/clients/Kconfig
> index 6096c623d9d5b..0ce8c1506eaad 100644
> --- a/drivers/gpu/drm/clients/Kconfig
> +++ b/drivers/gpu/drm/clients/Kconfig
> @@ -42,6 +42,15 @@ config DRM_FBDEV_EMULATION
>
> If in doubt, say "Y".
>
> +config FB_GLYPH_21BIT
> + bool "Enable 21-bit glyphs in the frame buffer device"
> + depends on (DRM_FBDEV_EMULATION = y)
[Severity: Medium]
Could placing this generic VT/fbdev feature in the DRM clients menu
inappropriately restrict its use?
Native framebuffer drivers (e.g., vesafb, efifb, simplefb) might be prevented
from utilizing 21-bit glyph support, as this strictly requires
DRM_FBDEV_EMULATION. The feature modifies the generic Virtual Terminal and
fbcon subsystems, which are independent of DRM.
[Severity: High]
Can enabling CONFIG_FB_GLYPH_21BIT corrupt the screen buffer for hardware
console drivers and rotated fbcon drivers?
When this is enabled, GLYPH_SZ becomes 4 globally and VT uses 32-bit screen
buffer entries. However, the consw interface still passes pointers typed as
const unsigned short *, and some drivers still hardcode 16-bit accesses.
For example, rotated fbcon implementations iterate the buffer using scr_readw()
which advances the u16 pointer by 2 bytes instead of 4, reading half-characters:
drivers/video/fbdev/core/fbcon_cw.c:cw_putcs_aligned() {
...
src = par->rotated.buf + (scr_readw(s++) & charmask) * cellsize;
...
}
Similarly, vgacon maps physical VGA VRAM assuming exactly 16 bits per character,
meaning 32-bit writes from scr_writeg in vt.c will overwrite adjacent cells
in hardware memory:
drivers/video/console/vgacon.c:vgacon_invert_region() {
...
u16 a = scr_readw(p);
...
scr_writew(a, p++);
...
}
> + help
> + This option enables 21-bit glyphs in the fbdev framebuffer,
> + surmounting the traditional restriction to 256/512 glyphs dating back
> + to the VGA hardware of the 1980s and 1990s. To use this effectively
> + you will need a suitable font and possibly a suitable keyboard layout.
> +
--
Sashiko AI review · https://sashiko.dev/#/patchset/apCEDM2sWv_M354-@MAC.fritz.box?part=5
next prev parent reply other threads:[~2026-08-27 19:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 18:38 vt: Enlarge the framebuffer glyph size from 16 to 32 bits Alan Mackenzie
2026-08-27 18:42 ` [Patch 1/9]: Make consolemap.c handle Unicode planes outside BMP Alan Mackenzie
2026-08-27 19:14 ` sashiko-bot
2026-08-28 4:57 ` Jiri Slaby
2026-08-29 11:51 ` Alan Mackenzie
2026-08-27 18:45 ` [Patch 2/9]: Glyph size: Use GLYPH_SZ/HW rather than hardcoded 2, 1 Alan Mackenzie
2026-08-27 19:22 ` sashiko-bot
2026-08-27 18:47 ` [Patch 3/9]: Replace scr_readw/writew by scr_readg/writeg, etc Alan Mackenzie
2026-08-27 19:18 ` sashiko-bot
2026-08-29 12:11 ` Greg Kroah-Hartman
2026-08-29 13:33 ` Alan Mackenzie
2026-08-27 18:48 ` [Patch 4/9]: Amend internal manipulation of glyph structure Alan Mackenzie
2026-08-27 19:19 ` sashiko-bot
2026-08-27 18:50 ` [Patch 5/9]: vt: Amend three Kconfig files Alan Mackenzie
2026-08-27 19:12 ` sashiko-bot [this message]
2026-08-27 18:52 ` [Patch 6/9]: vt: Use u32 and typedef u1632 to handle whole glyphs Alan Mackenzie
2026-08-27 19:22 ` sashiko-bot
2026-08-27 18:54 ` [Patch 7/9]: vt: Handle up to 2^21 glyphs, rather than 256/512 Alan Mackenzie
2026-08-27 19:14 ` sashiko-bot
2026-08-27 18:56 ` [Patch 8/9]: vt: Enhancements to the VT ioctl interface Alan Mackenzie
2026-08-27 19:25 ` sashiko-bot
2026-08-27 18:58 ` [Patch 9/9]: vt: Misc changes, e.g. to #include directives Alan Mackenzie
2026-08-27 19:25 ` sashiko-bot
2026-08-29 12:06 ` Greg Kroah-Hartman
2026-08-28 6:12 ` vt: Enlarge the framebuffer glyph size from 16 to 32 bits Thomas Zimmermann
2026-08-28 14:36 ` Alan Mackenzie
2026-08-29 12:09 ` Greg Kroah-Hartman
2026-08-29 14:39 ` Alan Mackenzie
2026-08-31 6:20 ` Thomas Zimmermann
2026-08-31 14:45 ` Alan Mackenzie
2026-08-31 17:21 ` Helge Deller
2026-09-01 11:14 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260827191257.AE0A51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acm@muc.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox