diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-19 16:19:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-19 16:29:01 +0100 |
commit | 05e2600cb0a4d73b0779cf29512819616252aeeb (patch) | |
tree | 5760497fb786f9b75828776ed0a73295298931d5 /drivers/video/fbdev/core | |
parent | 24d69384bcd34b9dcaf5dab744bf7096e84d1abd (diff) | |
download | linux-05e2600cb0a4d73b0779cf29512819616252aeeb.tar.gz |
VT: Bump font size limitation to 64x128 pixels
This moves 32x32 font size limitation checking down to drivers, so that
fbcon can allow large fonts.
We still keep a limitation to 64x128 pixels so as to have a simple bounded
allocation for con_font_get and in the userland kbd tool. That glyph size
will however be enough to have 128x36 characters on a "16/9 8K display".
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/20230119151935.112415738@ens-lyon.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 7cd7346bbc9a..5fb670b6f9a7 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2279,6 +2279,8 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font, unsigne font->width = vc->vc_font.width; font->height = vc->vc_font.height; + if (font->height > vpitch) + return -ENOSPC; font->charcount = vc->vc_hi_font_mask ? 512 : 256; if (!font->data) return 0; |