[U-Boot] DM_VIDEO and splash screen functionality

Hi all,
Just a clarifying question: I assume a splash screen functionality from common/splash.c and common/splash_source.c is marked as deprecated and is not going to be used anymore alongside with DM_VIDEO enabled, right?
I understand that the same result can be achieved (showing a boot logo) using CONFIG_PREBOOT define and with an invocation of something like "bmp display <addr>" in "preboot" env variable, but just wanted to know if splashscreen legacy stuff (common/splash.c) is going to be somehow integrated into the new video stack in the future.
Thanks!

Hi Igor,
On Tue, 28 May 2019 13:35:13 +0300 Igor Opaniuk igor.opaniuk@gmail.com wrote:
Hi all,
Just a clarifying question: I assume a splash screen functionality from common/splash.c and common/splash_source.c is marked as deprecated and is not going to be used anymore alongside with DM_VIDEO enabled, right?
no, this is still used with DM_VIDEO enabled. This splash image loading code is for pre-loading the bitmap (file) from configurable storage source before drawing it (see also doc/README.splashprepare).
The bitmap drawing code is currently at 3 different locations, depending on the board and/or video driver configuration: common/lcd.c drivers/video/cfb_console.c (!DM_VIDEO) drivers/video/video_bmp.c (DM_VIDEO)
We will most probably remove cfb_console when all remaining users are converted to DM_VIDEO. lcd.c can co-exist with DM_VIDEO enabled drivers and is still used for some boards. Maybe we will drop it as well, unless LCD console for older boards with limited resources must be supported.
I understand that the same result can be achieved (showing a boot logo) using CONFIG_PREBOOT define and with an invocation of something like "bmp display <addr>" in "preboot" env variable, but just wanted to know if splashscreen legacy stuff (common/splash.c) is going to be somehow integrated into the new video stack in the future.
Yes, you can load the .bmp file to memory first via commands in "preboot" and display it with "bmp" command then. But it would be better to implement it in common way reusable for other boards and independent of "preboot" configuration. We already have the necessary functions splash_screen_prepare() and bmp_display(). The first loads the file to memory address defined in "splashimage" env variable. This address can be passed to bmp_display(). We can add a common function which checks "splashimage" and sets it if not defined, then calls prepare/ display functions. No other integration is required.
-- Anatolij

Hi Anatolij,
On Tue, May 28, 2019 at 3:31 PM Anatolij Gustschin agust@denx.de wrote:
Hi Igor,
On Tue, 28 May 2019 13:35:13 +0300 Igor Opaniuk igor.opaniuk@gmail.com wrote:
Hi all,
Just a clarifying question: I assume a splash screen functionality from common/splash.c and common/splash_source.c is marked as deprecated and is not going to be used anymore alongside with DM_VIDEO enabled, right?
no, this is still used with DM_VIDEO enabled. This splash image loading code is for pre-loading the bitmap (file) from configurable storage source before drawing it (see also doc/README.splashprepare).
The bitmap drawing code is currently at 3 different locations, depending on the board and/or video driver configuration: common/lcd.c drivers/video/cfb_console.c (!DM_VIDEO) drivers/video/video_bmp.c (DM_VIDEO)
Actually I meant the difference in behavior I'm observing between DM_VIDEO enabled drivers and legacy ones. For example, for legacy lcd video stack drawing of boot logo is a part of initialization process, where the main condition is a sane value of env("splashimage"): lcd_init() (common/lcd.c:245) -> lcd_clear() -> lcd_splash() -> bmp_display(addr, x, y)
Also I'm observing the same behavior for cfb_console (also with the same check if env("splashimage") is defined): cfg_video_init(cfb_console.c:2018) -> video_logo() ->video_display_bitmap()
But for DM_VIDEO enabled drivers there is no any signs of invocation of bmp_display()/other wrappers during the overall initialization (I've followed all possible paths starting from stdio_add_devices()), and probing of of DM_VIDEO enabled drivers are deferred till I explicitly invoke something like `bmp` command), so I assumed that not adding the same check for env("splashimage") and further bmp_display() invocation was done for some purpose (for example, to deprecate and remove splash.c functionality in the future).
We will most probably remove cfb_console when all remaining users are converted to DM_VIDEO. lcd.c can co-exist with DM_VIDEO enabled drivers and is still used for some boards. Maybe we will drop it as well, unless LCD console for older boards with limited resources must be supported.
I understand that the same result can be achieved (showing a boot logo) using CONFIG_PREBOOT define and with an invocation of something like "bmp display <addr>" in "preboot" env variable, but just wanted to know if splashscreen legacy stuff (common/splash.c) is going to be somehow integrated into the new video stack in the future.
Yes, you can load the .bmp file to memory first via commands in "preboot" and display it with "bmp" command then. But it would be better to implement it in common way reusable for other boards and independent of "preboot" configuration. We already have the necessary functions splash_screen_prepare() and bmp_display(). The first loads the file to memory address defined in "splashimage" env variable. This address can be passed to bmp_display(). We can add a common function which checks "splashimage" and sets it if not defined, then calls prepare/ display functions. No other integration is required.
Yeah, this was my initial point that it doesn't work now and there is no such function for DM_VIDEO configurations. I just assumed that following steps from doc/README.splashprepare, adding CONFIG_SPLASH_SOURCE define and providing proper values for splashsource/splashimage env vars should make a deal, but obviously it doesn't.
I'll send a patch if don't mind.
-- Anatolij
Thanks for your reply!
participants (2)
-
Anatolij Gustschin
-
Igor Opaniuk