diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-19 16:19:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-19 16:28:56 +0100 |
commit | ffc1e089725e3f8a15ddfdce283db42f7d0fa147 (patch) | |
tree | a12ea38b9de91ce77840411df3cb247537e6101a /drivers/tty/vt/vt.c | |
parent | tty: serial: 8250: add DFL bus driver for Altera 16550. (diff) | |
download | linux-ffc1e089725e3f8a15ddfdce283db42f7d0fa147.tar.xz linux-ffc1e089725e3f8a15ddfdce283db42f7d0fa147.zip |
VT: Add height parameter to con_font_get/set consw operations
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@ens-lyon.org>
Link: https://lore.kernel.org/r/20230119151934.932642243@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r-- | drivers/tty/vt/vt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 71f182416835..268d0f57fdd4 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -4552,7 +4552,7 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op) if (vc->vc_mode != KD_TEXT) rc = -EINVAL; else if (vc->vc_sw->con_font_get) - rc = vc->vc_sw->con_font_get(vc, &font); + rc = vc->vc_sw->con_font_get(vc, &font, 32); else rc = -ENOSYS; console_unlock(); @@ -4613,7 +4613,7 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op) else if (vc->vc_sw->con_font_set) { if (vc_is_sel(vc)) clear_selection(); - rc = vc->vc_sw->con_font_set(vc, &font, op->flags); + rc = vc->vc_sw->con_font_set(vc, &font, 32, op->flags); } else rc = -ENOSYS; console_unlock(); |