summaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/vt.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-19 16:19:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-19 16:28:56 +0100
commitffc1e089725e3f8a15ddfdce283db42f7d0fa147 (patch)
treea12ea38b9de91ce77840411df3cb247537e6101a /drivers/tty/vt/vt.c
parente34a79d0b320ea8248e1ee3482eb5c388a27d303 (diff)
downloadlinux-stable-ffc1e089725e3f8a15ddfdce283db42f7d0fa147.tar.gz
linux-stable-ffc1e089725e3f8a15ddfdce283db42f7d0fa147.tar.bz2
linux-stable-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.c4
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();