From: Igor Opaniuk Date: Wed, 15 Jul 2020 10:31:01 +0000 (+0300) Subject: toradex: common: show boot logo X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=d32418977261e39d30e482b97f6a63541c8a9391;p=u-boot.git toradex: common: show boot logo Add function for showing boot logo, embed into u-boot blob. Signed-off-by: Igor Opaniuk --- diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index afe07be949..fe5295f94b 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -9,6 +9,13 @@ #include #include +#ifdef CONFIG_DM_VIDEO +#include +#include +#include +#include +#endif + #include "tdx-cfg-block.h" #include #include "tdx-common.h" @@ -196,3 +203,22 @@ int ft_common_board_setup(void *blob, struct bd_info *bd) } #endif /* CONFIG_TDX_CFG_BLOCK */ + +#if defined(CONFIG_DM_VIDEO) +int show_boot_logo(void) +{ + struct udevice *dev; + int ret; + int xpos, ypos; + + splash_get_pos(&xpos, &ypos); + + ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); + if (ret) + return ret; + + ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true); + + return ret; +} +#endif /* CONFIG_DM_VIDEO */ diff --git a/board/toradex/common/tdx-common.h b/board/toradex/common/tdx-common.h index 81375de598..8020df5b44 100644 --- a/board/toradex/common/tdx-common.h +++ b/board/toradex/common/tdx-common.h @@ -11,4 +11,8 @@ int ft_common_board_setup(void *blob, struct bd_info *bd); +#if defined(CONFIG_DM_VIDEO) +int show_boot_logo(void); +#endif + #endif /* _TDX_COMMON_H */