From 39c1fa2c212b8acf15dfbccd7b10c6de93ba88df Mon Sep 17 00:00:00 2001 From: Dzmitry Sankouski Date: Tue, 7 Mar 2023 13:21:14 +0300 Subject: video console: implement multiple fonts configuration This needed for unit testing different fonts. Configured fonts are placed in an array of fonts. First font is selected by default upon console probe. Signed-off-by: Dzmitry Sankouski Reviewed-by: Simon Glass [agust: fixed build error when bmp logo disabled] Signed-off-by: Anatolij Gustschin --- common/splash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common/splash.c') diff --git a/common/splash.c b/common/splash.c index 245ff680ebd..4bc54b1bf9e 100644 --- a/common/splash.c +++ b/common/splash.c @@ -127,9 +127,11 @@ void splash_get_pos(int *x, int *y) #include #include #include +#include void splash_display_banner(void) { + struct video_fontdata __maybe_unused *fontdata = fonts; struct udevice *dev; char buf[DISPLAY_OPTIONS_BANNER_LENGTH]; int col, row, ret; @@ -138,9 +140,9 @@ void splash_display_banner(void) if (ret) return; -#ifdef CONFIG_VIDEO_LOGO - col = BMP_LOGO_WIDTH / VIDEO_FONT_WIDTH + 1; - row = BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT + 1; +#if IS_ENABLED(CONFIG_VIDEO_LOGO) + col = BMP_LOGO_WIDTH / fontdata->width + 1; + row = BMP_LOGO_HEIGHT / fontdata->height + 1; #else col = 0; row = 0; -- cgit v1.2.3