[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27ade063-79df-dad9-0427-e16f1ddb43ef@kernel.org>
Date: Tue, 6 Dec 2022 07:40:30 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Samuel Thibault <samuel.thibault@...-lyon.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
kbd@...ts.altlinux.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [patch 1/3] VT: Add height parameter to con_font_get/set consw
operations
On 05. 12. 22, 1:07, Samuel Thibault wrote:
> The current con_font_get/set API currently hardcodes a 32-pixel-tall
> limitation, which only dates from the old VGA hardware which could not
> handle taller fonts than that.
>
> This change just adds a vpitch parameter to release this
> constraint. Drivers which do not support vpitch != 32 can just return
> EINVAL when it is not 32, font loading tools will revert to trying 32
> and succeed.
>
> This change makes the fbcon driver consider vpitch appropriately, thus
> making it able to load large fonts.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>
>
...
> --- linux-6.0.orig/drivers/usb/misc/sisusbvga/sisusb_con.c
> +++ linux-6.0/drivers/usb/misc/sisusbvga/sisusb_con.c
...
> @@ -1243,13 +1244,15 @@ sisusbcon_font_set(struct vc_data *c, st
>
> /* Interface routine */
> static int
> -sisusbcon_font_get(struct vc_data *c, struct console_font *font)
> +sisusbcon_font_get(struct vc_data *c, struct console_font *font, unsigned int vpitch)
> {
> struct sisusb_usb_data *sisusb;
>
> sisusb = sisusb_get_sisusb_lock_and_check(c->vc_num);
> if (!sisusb)
> return -ENODEV;
> + if (vpitch != 32)
> + return -EINVAL;
>
> /* sisusb->lock is down */
>
> @@ -1268,7 +1271,7 @@ sisusbcon_font_get(struct vc_data *c, st
> }
>
> /* Copy 256 chars only, like vgacon */
> - memcpy(font->data, sisusb->font_backup, 256 * 32);
> + memcpy(font->data, sisusb->font_backup, 256 * height);
Have you tested this? What does this 'height' refer to?
thanks,
--
js
suse labs
Powered by blists - more mailing lists