aboutsummaryrefslogtreecommitdiff
path: root/common/splash.c
diff options
context:
space:
mode:
authorDzmitry Sankouski2023-03-07 13:21:14 +0300
committerAnatolij Gustschin2023-03-07 15:57:19 +0100
commit39c1fa2c212b8acf15dfbccd7b10c6de93ba88df (patch)
tree799bc6e1d231a7eb93de3ddb6524aa6c9018890b /common/splash.c
parent0e177d5a95c020c6d7a0d4294de5c7f34f5bf664 (diff)
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 <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [agust: fixed build error when bmp logo disabled] Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'common/splash.c')
-rw-r--r--common/splash.c8
1 files changed, 5 insertions, 3 deletions
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 <dm.h>
#include <video_console.h>
#include <video_font.h>
+#include <video_font_data.h>
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;