From: Greg KH <gregkh@linuxfoundation.org>
To: Zsolt Kajtar <soci@c64.rulez.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vt: monochrome mode with 512 glyphs
Date: Thu, 21 Aug 2025 08:12:26 +0200 [thread overview]
Message-ID: <2025082128-appraisal-wince-844f@gregkh> (raw)
In-Reply-To: <20250821035533.8206-1-soci@c64.rulez.org>
On Thu, Aug 21, 2025 at 05:55:33AM +0200, Zsolt Kajtar wrote:
> In monochrome mode the lowest 2 bits of the attribute are used for the
> intensity. If a 512 glyph font is loaded the lowest attribute bit is
> used for the MSB.
>
> The result is that with normal intensity (1) the MSB of the glyph can
> be set.
>
> Due to this on my setup the erase character becomes 0x120 instead of
> 0x20. As 0x120 is allocated to U+0161 in the loaded font the erased area
> will be filled with "s" instead of spaces.
>
> To make the 512 glyph case work in monochrome mode the intensity was cut
> down to one bit (bold only) in this patch.
>
> Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org>
> ---
> drivers/tty/vt/vt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 62049ceb3..8eebb5f17 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -667,7 +667,7 @@ static u8 build_attr(struct vc_data *vc, u8 _color,
> {
> u8 a = _color;
> if (!vc->vc_can_do_color)
> - return _intensity |
> + return (_intensity & ~(vc->vc_hi_font_mask ? 1 : 0)) |
For some reason you didn't cc: all of the maintainers and the subsystem
mailing list for this code :(
Anyway, this is anything but obvious as to what is happening, can this
somehow be documented in the change to make it more clear?
thanks,
greg k-h
next prev parent reply other threads:[~2025-08-21 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 3:55 Zsolt Kajtar
2025-08-21 6:12 ` Greg KH [this message]
2025-08-25 5:43 ` Kajtár Zsolt
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=2025082128-appraisal-wince-844f@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@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®