diff options
Diffstat (limited to 'drivers/video/video-uclass.c')
-rw-r--r-- | drivers/video/video-uclass.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index a52b5d9323..7d499bcec5 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -319,6 +319,24 @@ int video_sync_copy_all(struct udevice *dev) #endif +#define SPLASH_DECL(_name) \ + extern u8 __splash_ ## _name ## _begin[]; \ + extern u8 __splash_ ## _name ## _end[] + +#define SPLASH_START(_name) __splash_ ## _name ## _begin + +SPLASH_DECL(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; +} + /* Set up the display ready for use */ static int video_post_probe(struct udevice *dev) { @@ -384,6 +402,14 @@ static int video_post_probe(struct udevice *dev) return ret; } + if (IS_ENABLED(CONFIG_VIDEO_LOGO) && !plat->hide_logo) { + ret = show_splash(dev); + if (ret) { + log_debug("Cannot show splash screen\n"); + return ret; + } + } + return 0; }; |