From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Opaniuk Date: Tue, 23 Jun 2020 23:39:21 +0300 Subject: [PATCH v1 2/6] toradex: common: show boot logo In-Reply-To: <1592944765-28704-1-git-send-email-igor.opaniuk@gmail.com> References: <1592944765-28704-1-git-send-email-igor.opaniuk@gmail.com> Message-ID: <1592944765-28704-2-git-send-email-igor.opaniuk@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Igor Opaniuk Add function for showing boot logo, embed into u-boot blob. Signed-off-by: Igor Opaniuk --- board/toradex/common/tdx-common.c | 26 ++++++++++++++++++++++++++ board/toradex/common/tdx-common.h | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index e8de923..9b6c8f9 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" @@ -168,3 +175,22 @@ int ft_common_board_setup(void *blob, bd_t *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 c537dca..63614c8 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, bd_t *bd); +#if defined(CONFIG_DM_VIDEO) +int show_boot_logo(void); +#endif + #endif /* _TDX_COMMON_H */ -- 2.7.4