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>
This commit is contained in:

committed by
Anatolij Gustschin

parent
0e177d5a95
commit
39c1fa2c21
@@ -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;
|
||||
|
Reference in New Issue
Block a user