[PATCH 0/9] Enable splash screen

To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)

Add necessary Kconfigs to enable video driver and enable splash screen at spl stage. CONFIG_SPL_VIDEO enables all necessary configs enabled by CONFIG_VIDEO at spl stage. CONFIG_SPL_SYS_WHITE_ON_BLACK allows displaying on black background at spl stage.
These configs are specific to SPL and will allow us to enable the video driver and splash screen at SPL stage only and not at u-boot proper. The existing Kconfigs from u-boot proper were not used to make SPL splash screen independent to them.
Enable BMP_GZIP at SPL stage when SPL_SPLASH_SCREEN or SPL_CMD_BMP are defined.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- drivers/video/Kconfig | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 2a76d19cc8..1097e2c623 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -14,7 +14,17 @@ config VIDEO option compiles in the video uclass and routes all LCD/video access through this.
-if VIDEO +config SPL_VIDEO + bool "Enable driver model support for LCD/video" + depends on SPL_DM + help + The video subsystem adds a small amount of overhead to the image. + If this is acceptable and you have a need to use video drivers in + SPL, enable this option. It might provide a cleaner interface to + setting up video within SPL, and allows the same drivers to be + used as U-Boot proper. + +if VIDEO || SPL_VIDEO
config VIDEO_LOGO bool "Show the U-Boot logo on the display" @@ -193,6 +203,14 @@ config SYS_WHITE_ON_BLACK better in low-light situations or to reduce eye strain in some cases.
+config SPL_SYS_WHITE_ON_BLACK + bool "Display console as white on a black background" + help + Normally the display is black on a white background, Enable this + option to invert this, i.e. white on a black background at spl stage. + This can be better in low-light situations or to reduce eye strain in + some cases. + config NO_FB_CLEAR bool "Skip framebuffer clear" help @@ -795,7 +813,13 @@ config SPLASH_SCREEN image data before it is processed and sent to the frame buffer by U-Boot. Define your own version to use this feature.
-if SPLASH_SCREEN +config SPL_SPLASH_SCREEN + bool "Show a splash-screen image" + help + If this option is set, the environment is checked for a variable + "splashimage" at spl stage. + +if SPLASH_SCREEN || SPL_SPLASH_SCREEN
config SPLASH_SCREEN_ALIGN bool "Allow positioning the splash image anywhere on the display" @@ -863,7 +887,7 @@ endif # SPLASH_SCREEN
config VIDEO_BMP_GZIP bool "Gzip compressed BMP image support" - depends on CMD_BMP || SPLASH_SCREEN + depends on CMD_BMP || SPLASH_SCREEN || SPL_SPLASH_SCREEN || SPL_CMD_BMP help If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the

To enable tidss video driver only at SPL stage, add necessary config, CONFIG_SPL_VIDEO_TIDSS.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- drivers/video/tidss/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/drivers/video/tidss/Kconfig b/drivers/video/tidss/Kconfig index 2a5e56ea4e..748c332281 100644 --- a/drivers/video/tidss/Kconfig +++ b/drivers/video/tidss/Kconfig @@ -16,3 +16,9 @@ menuconfig VIDEO_TIDSS DPI . This option enables these supports which can be used on devices which have OLDI or HDMI display connected.
+config SPL_VIDEO_TIDSS + bool "Enable TIDSS video support in SPL Stage" + depends on SPL_VIDEO + help + This options enables tidss driver in SPL stage. If + you need to use tidssat SPL stage use this config.

CONFIG_CMD_BMP and CONFIG_SPLASH_SCREEN enable's splash display at only u-boot proper. To enable splash display at SPL stage add SPL specific configs, which are SPL_CMD_BMP and SPL_SPLASH_SCREEN.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- cmd/Kconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 2caa4af71c..2f7b820ab8 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1415,6 +1415,11 @@ config CMD_READ help Provides low-level access to the data in a partition.
+config SPL_CMD_READ + bool "read - Read binary data from a partition" + help + Provides low-level access to the data in a partition at SPL stage. + config CMD_REMOTEPROC bool "remoteproc" depends on REMOTEPROC @@ -1931,6 +1936,18 @@ config CMD_BMP the image into RAM, then using this command to look at it or display it.
+config SPL_CMD_BMP + bool "Enable 'bmp' command" + depends on SPL_VIDEO + help + This provides a way to obtain information about a BMP-format image + and to display it in spl stage.BMP (which presumably stands for BitMaP) is a + file format defined by Microsoft which supports images of various + depths, formats and compression methods. Headers on the file + determine the formats used. This command can be used by first loading + the image into RAM, then using this command to look at it or display + it. + config CMD_BOOTCOUNT bool "bootcount" depends on BOOTCOUNT_LIMIT

To enable splash screen at SPL we need to add video driver at SPL stage. To support video driver and splash display function compile video_uclass.c, video_console.c and video_bmp.c, thus add rules to compile these files at SPL stage when CONFIG_SPL_VIDEO is defined.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- drivers/video/Makefile | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index cdb7d9a54d..4e2d34e675 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -68,3 +68,8 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o
obj-y += bridge/ obj-y += sunxi/ + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_$(SPL_)VIDEO) += video-uclass.o vidconsole-uclass.o +obj-$(CONFIG_$(SPL_)VIDEO) += video_bmp.o +endif

To enable TIDSS driver only at SPL stage add rule to compile the TIDSS video driver, for SPL stage only if CONFIG_SPL_VIDEO_TIDSS is defined.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- drivers/video/Makefile | 1 + drivers/video/tidss/Makefile | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 4e2d34e675..beec455e3d 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -72,4 +72,5 @@ obj-y += sunxi/ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_$(SPL_)VIDEO) += video-uclass.o vidconsole-uclass.o obj-$(CONFIG_$(SPL_)VIDEO) += video_bmp.o +<<<<<<< HEAD endif diff --git a/drivers/video/tidss/Makefile b/drivers/video/tidss/Makefile index f4f8c6c470..d538d5065b 100644 --- a/drivers/video/tidss/Makefile +++ b/drivers/video/tidss/Makefile @@ -10,3 +10,4 @@
obj-${CONFIG_VIDEO_TIDSS} = tidss_drv.o +obj-${CONFIG_SPL_VIDEO_TIDSS} = tidss_drv.o \ No newline at end of file

On Mon, Mar 13, 2023 at 10:17 AM Nikhil M Jain n-jain1@ti.com wrote:
To enable TIDSS driver only at SPL stage add rule to compile the TIDSS video driver, for SPL stage only if CONFIG_SPL_VIDEO_TIDSS is defined.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com
drivers/video/Makefile | 1 + drivers/video/tidss/Makefile | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 4e2d34e675..beec455e3d 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -72,4 +72,5 @@ obj-y += sunxi/ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_$(SPL_)VIDEO) += video-uclass.o vidconsole-uclass.o obj-$(CONFIG_$(SPL_)VIDEO) += video_bmp.o +<<<<<<< HEAD
I think this artifact is from a bad patch apply and shouldn't be there.
endif diff --git a/drivers/video/tidss/Makefile b/drivers/video/tidss/Makefile index f4f8c6c470..d538d5065b 100644 --- a/drivers/video/tidss/Makefile +++ b/drivers/video/tidss/Makefile @@ -10,3 +10,4 @@
obj-${CONFIG_VIDEO_TIDSS} = tidss_drv.o +obj-${CONFIG_SPL_VIDEO_TIDSS} = tidss_drv.o \ No newline at end of file -- 2.34.1

Splash support requires functions which are in bmp.c and read.c to enable display of bmp image and reading image from boot media. Enable their compilation at SPL stage, using Kconfigs SPL_CMD_BMP, SPL_CMD_READ.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- cmd/Makefile | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/cmd/Makefile b/cmd/Makefile index 36d2daf22a..e2ed35559c 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -232,6 +232,8 @@ obj-$(CONFIG_ARCH_MVEBU) += mvebu/ endif # !CONFIG_SPL_BUILD
obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o +obj-$(CONFIG_$(SPL_)CMD_BMP) += bmp.o +obj-$(CONFIG_$(SPL_)CMD_READ) += read.o
# core command obj-y += nvedit.o

CONFIG_SPLASH_SCREEN and CONFIG_CMD_BMP enables splash screen at u-boot proper. To enable splash screen at SPL, separate macros i.e. SPL_SPLASH_SCREEN and SPL_CMD_BMP are used instead. Use CONFIG_IS_ENABLED(#) to check for splash screen and bmp related macros, so that it checks for either u-boot proper or SPl related macros as enabled at u-boot proper or SPL stage respectively.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- common/splash.c | 2 +- include/splash.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/splash.c b/common/splash.c index 245ff680eb..885fa1ec86 100644 --- a/common/splash.c +++ b/common/splash.c @@ -157,7 +157,7 @@ void splash_display_banner(void) * Common function to show a splash image if env("splashimage") is set. * For additional details please refer to doc/README.splashprepare. */ -#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP) +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) && CONFIG_IS_ENABLED(CMD_BMP) int splash_display(void) { ulong addr; diff --git a/include/splash.h b/include/splash.h index 33e45e6941..1e4176b9ba 100644 --- a/include/splash.h +++ b/include/splash.h @@ -67,7 +67,7 @@ void splash_get_pos(int *x, int *y); static inline void splash_get_pos(int *x, int *y) { } #endif
-#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP) +#if CONFIG_IS_ENABLED(SPLASH_SCREEN) && CONFIG_IS_ENABLED(CMD_BMP) int splash_display(void); #else static inline int splash_display(void)

Enable displaying of u-boot video logo as default at SPL stage to if splash screen is disabled at SPL stage. Use CONFIG_IS_ENABLED for checking on splash screen macro both at SPL stage or u-boot proper depending upon where it is enabled.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- drivers/video/Kconfig | 2 +- drivers/video/video-uclass.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 1097e2c623..96e0f367d7 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -28,7 +28,7 @@ if VIDEO || SPL_VIDEO
config VIDEO_LOGO bool "Show the U-Boot logo on the display" - default y if !SPLASH_SCREEN + default y if !SPLASH_SCREEN || !SPL_SPLASH_SCREEN select VIDEO_BMP_RLE8 help This enables showing the U-Boot logo on the display when a video diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 6aaacff10d..5e473c1686 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -498,7 +498,7 @@ static int video_post_probe(struct udevice *dev) }
if (IS_ENABLED(CONFIG_VIDEO_LOGO) && - !IS_ENABLED(CONFIG_SPLASH_SCREEN) && !plat->hide_logo) { + !CONFIG_IS_ENABLED(SPLASH_SCREEN) && !plat->hide_logo) { ret = show_splash(dev); if (ret) { log_debug("Cannot show splash screen\n");

Add ospi boot media support to load splash image from OSPI memory, add offset to read image from ospi and necessary flags defininig type of storage and storage device.
Signed-off-by: Nikhil M Jain n-jain1@ti.com Reviewed-by: Devarsh Thakkar devarsht@ti.com --- board/ti/am62x/evm.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 20b2a70122..ca7c89aea0 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -22,6 +22,12 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SPLASH_SCREEN static struct splash_location default_splash_locations[] = { + { + .name = "sf", + .storage = SPLASH_STORAGE_SF, + .flags = SPLASH_STORAGE_RAW, + .offset = 0x700000, + }, { .name = "mmc", .storage = SPLASH_STORAGE_MMC,

Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
Regards, Simon

Hi Simon,
On 15/03/23 03:38, Simon Glass wrote:
Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
There is a significant difference in time, by adding support in SPL splash screen comes up by approx 650ms and at u-boot proper it comes at 2.6s, measured from first print in console as seen on AM62x. Also we plan to skip u-boot proper and load kernel directly.
Regards, Simon
Regards, Nikhil

Hi Nikhil,
On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain n-jain1@ti.com wrote:
Hi Simon,
On 15/03/23 03:38, Simon Glass wrote:
Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
There is a significant difference in time, by adding support in SPL splash screen comes up by approx 650ms and at u-boot proper it comes at 2.6s, measured from first print in console as seen on AM62x. Also we plan to skip u-boot proper and load kernel directly.
Yes that really is terrible. It should be under a second for U-Boot proper!
Have you tried using bootstage to report the numbers?
Have you tried using tracing to figure out what is wrong? Is it just slow storage?
Regards, Simon

Hi Simon,
On 15/03/23 19:38, Simon Glass wrote:
Hi Nikhil,
On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain n-jain1@ti.com wrote:
Hi Simon,
On 15/03/23 03:38, Simon Glass wrote:
Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
There is a significant difference in time, by adding support in SPL splash screen comes up by approx 650ms and at u-boot proper it comes at 2.6s, measured from first print in console as seen on AM62x. Also we plan to skip u-boot proper and load kernel directly.
Yes that really is terrible. It should be under a second for U-Boot proper!
Have you tried using bootstage to report the numbers?
No I haven't used the bootstage, I will use it to get the numbers.
Have you tried using tracing to figure out what is wrong? Is it just slow storage?
U-boot proper comes up in one sec but the splash display is called through stdio_add_devices which is late in the board_init_r sequence defined in board_r.c.
Regards, Simon
Thanks

Hi Simon,
On 16/03/23 10:10, Nikhil M Jain wrote:
Hi Simon,
On 15/03/23 19:38, Simon Glass wrote:
Hi Nikhil,
On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain n-jain1@ti.com wrote:
Hi Simon,
On 15/03/23 03:38, Simon Glass wrote:
Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
There is a significant difference in time, by adding support in SPL splash screen comes up by approx 650ms and at u-boot proper it comes at 2.6s, measured from first print in console as seen on AM62x. Also we plan to skip u-boot proper and load kernel directly.
Yes that really is terrible. It should be under a second for U-Boot proper!
Have you tried using bootstage to report the numbers?
No I haven't used the bootstage, I will use it to get the numbers.
Boot stage logs link: https://gist.github.com/NikMJain/beb60fe42b1e89829cdd5b8713284330
Have you tried using tracing to figure out what is wrong? Is it just slow storage?
U-boot proper comes up in one sec but the splash display is called through stdio_add_devices which is late in the board_init_r sequence defined in board_r.c.
Regards,
Simon
Thanks
On AM62x we have multi-stage boot first R5 SPL comes up then A53 SPL and u-boot proper, due to which splash screen at u-boot proper takes over 2 sec. On AM62x we have an aggressive requirement for an early splash screen. Hence we are moving splash screen support to SPL., which will bring splash screen time to approx 600 ms.
We also want to support falcon boot mode from A53 SPL, we have customers who don't want u-boot proper in production boot flow and still require splash screen, the only way to support it is to add splash screen at SPL.
u-boot logs with splash screen timings, measurement through timer_get_boot_us at u-boot proper and SPL. link: https://gist.github.com/NikMJain/3be0b6c92092678b6aec8e5fdbc46a98
Thanks, Nikhil

Hi Nikhil,
On Fri, 17 Mar 2023 at 02:13, Nikhil M Jain n-jain1@ti.com wrote:
Hi Simon,
On 16/03/23 10:10, Nikhil M Jain wrote:
Hi Simon,
On 15/03/23 19:38, Simon Glass wrote:
Hi Nikhil,
On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain n-jain1@ti.com wrote:
Hi Simon,
On 15/03/23 03:38, Simon Glass wrote:
Hi Nikhil,
On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain n-jain1@ti.com wrote:
To enable splash screen at SPL stage move video driver and splash screen framework at SPL, which will bring up image on display very quickly and thus have early display support in SPL.
Nikhil M Jain (9): drivers: video: Kconfig: Necessary configs for video at SPL drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL cmd: Kconfig: Add necessary configs for splash screen at SPL drivers: video: Makefile: Compile video driver files at SPL drivers: video: tidss: Makefile: Add condition to compile TIDSS at SPL cmd: Makefile: Add rules to build bmp.c and read.c at SPL common: splash: Enable splash_display at SPL stage drivers: video: video-uclass: Disable u-boot logo at SPL board: ti: am62x: evm: OSPI support for splash screen
board/ti/am62x/evm.c | 6 ++++++ cmd/Kconfig | 17 +++++++++++++++++ cmd/Makefile | 2 ++ common/splash.c | 2 +- drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- drivers/video/Makefile | 6 ++++++ drivers/video/tidss/Kconfig | 6 ++++++ drivers/video/tidss/Makefile | 1 + drivers/video/video-uclass.c | 2 +- include/splash.h | 2 +- 10 files changed, 69 insertions(+), 7 deletions(-)
I'm not necessarily arguing against this, but what is the need for this? How many milliseconds earlier does the image appear with this patch? What is the bottleneck? We should be able to get to U-Boot proper very quickly.
There is a significant difference in time, by adding support in SPL splash screen comes up by approx 650ms and at u-boot proper it comes at 2.6s, measured from first print in console as seen on AM62x. Also we plan to skip u-boot proper and load kernel directly.
Yes that really is terrible. It should be under a second for U-Boot proper!
Have you tried using bootstage to report the numbers?
No I haven't used the bootstage, I will use it to get the numbers.
Boot stage logs link: https://gist.github.com/NikMJain/beb60fe42b1e89829cdd5b8713284330
Have you tried using tracing to figure out what is wrong? Is it just slow storage?
U-boot proper comes up in one sec but the splash display is called through stdio_add_devices which is late in the board_init_r sequence defined in board_r.c.
Regards,
Simon
Thanks
On AM62x we have multi-stage boot first R5 SPL comes up then A53 SPL and u-boot proper, due to which splash screen at u-boot proper takes over 2 sec. On AM62x we have an aggressive requirement for an early splash screen. Hence we are moving splash screen support to SPL., which will bring splash screen time to approx 600 ms.
We also want to support falcon boot mode from A53 SPL, we have customers who don't want u-boot proper in production boot flow and still require splash screen, the only way to support it is to add splash screen at SPL.
u-boot logs with splash screen timings, measurement through timer_get_boot_us at u-boot proper and SPL. link: https://gist.github.com/NikMJain/3be0b6c92092678b6aec8e5fdbc46a98
I think it would be worth looking at what is taking so long. Could you add bootstage in there (which supports SPL as well) and produce a final report? Is BL31 taking a while?You can use bootstage_start()/bootstage_accum() to collect time on MMC loading, etc. even if you don't want to enable CONFIG_TRACE.
This is an important area that will affect a lot of boards. If it takes 2 seconds to get into U-Boot, everyone is going to want to avoid it.
Regards, Simon
participants (3)
-
Nikhil M Jain
-
Peter Robinson
-
Simon Glass