From: Jiri Slaby <jirislaby@kernel.org>
To: Zsolt Kajtar <soci@c64.rulez.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org
Subject: Re: [PATCH 3/3] tty/vt: Fix unreadable kernel messages on vgacon
Date: Sun, 31 Aug 2025 08:28:35 +0200 [thread overview]
Message-ID: <cd96426e-c1e0-4229-be72-feacacf5962b@kernel.org> (raw)
In-Reply-To: <20250829194908.24852-4-soci@c64.rulez.org>
On 29. 08. 25, 21:49, Zsolt Kajtar wrote:
> When a 512 glyph font is loaded on vgacon and the bold attributes are in
> effect then the kernel console output (printk) becomes unreadable. It is
> because the brightness bit (used for bold) is at the same place where
> the 8th bit of the glyph index is. This patch adds the missing masking
> to ensure the output will be displayed using the lower half of the font.
>
> Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
I assume you checked all writes to the gfx mem?
> ---
> drivers/tty/vt/vt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index d54f4d24e..4c8c87f21 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -3356,7 +3356,8 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
> continue;
> }
> vc_uniscr_putc(vc, c);
> - scr_writew((vc->vc_attr << 8) + c, (unsigned short *)vc->vc_pos);
> + scr_writew(((vc->vc_attr << 8) & ~vc->vc_hi_font_mask) | c,
> + (unsigned short *)vc->vc_pos);
> notify_write(vc, c);
> cnt++;
> if (vc->state.x == vc->vc_cols - 1) {
--
js
suse labs
prev parent reply other threads:[~2025-08-31 6:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 19:49 [PATCH 0/3] tty/vt: fix various 512 glyph font issues Zsolt Kajtar
2025-08-29 19:49 ` [PATCH 1/3] tty/vt: 8th bit location in vc_uniscr routines Zsolt Kajtar
2025-08-31 6:14 ` Jiri Slaby
2025-08-29 19:49 ` [PATCH 2/3] tty/vt: Prevent 8th bit corruption with soft cursor Zsolt Kajtar
2025-08-31 6:25 ` Jiri Slaby
2025-08-29 19:49 ` [PATCH 3/3] tty/vt: Fix unreadable kernel messages on vgacon Zsolt Kajtar
2025-08-31 6:28 ` Jiri Slaby [this message]
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=cd96426e-c1e0-4229-be72-feacacf5962b@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=soci@c64.rulez.org \
/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
all inboxes | Powered by JetHome®