[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250901052636.8981-4-soci@c64.rulez.org>
Date: Mon, 1 Sep 2025 07:26:35 +0200
From: Zsolt Kajtar <soci@....rulez.org>
To: linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org,
jirislaby@...nel.org
Cc: Zsolt Kajtar <soci@....rulez.org>
Subject: [PATCH v2 3/4] tty/vt: Fix unreadable kernel messages on vgacon
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@....rulez.org>
---
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 27b1afd5d..5d458211b 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3361,7 +3361,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) {
--
2.30.2
Powered by blists - more mailing lists