show_splash() computed the result of video_bmp_display() but discarded it and always returned 0, so a failing splash display was silently ignored by video_post_probe().
The helper is a single video_bmp_display() call with a single caller, so drop it and inline it into video_post_probe(), taking the logo from video_get_u_boot_logo(). This has the nice side effect of leaving video_get_u_boot_logo() as the only remaining user of the logo symbols. Since the return value was discarded, failing to draw the logo never aborted the boot, so keep that behaviour and only add a debug message reporting the error. Signed-off-by: Julien Stephan <[email protected]> --- drivers/video/video-uclass.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 228d6bacc58..1a268137bde 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -592,16 +592,6 @@ void *video_get_u_boot_logo(void) return SPLASH_START(u_boot_logo); } -static int show_splash(struct udevice *dev) -{ - u8 *data = SPLASH_START(u_boot_logo); - int ret; - - ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true); - - return 0; -} - int video_default_font_height(struct udevice *dev) { struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); @@ -721,11 +711,11 @@ static int video_post_probe(struct udevice *dev) if (CONFIG_IS_ENABLED(VIDEO_LOGO) && !CONFIG_IS_ENABLED(SPLASH_SCREEN) && !plat->hide_logo) { - ret = show_splash(dev); - if (ret) { - log_debug("Cannot show splash screen\n"); - return ret; - } + u8 *data = video_get_u_boot_logo(); + + ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true); + if (ret) + log_debug("Cannot show splash screen (err=%dE)\n", ret); } /* register cyclic as soon as the first video device is probed */ -- 2.55.0
