diff mbox series

[7/9] common: splash: Enable splash_display at SPL stage

Message ID 20230314045019.5671-8-n-jain1@ti.com
State Changes Requested
Delegated to: Simon Glass
Headers show
Series Enable splash screen | expand

Commit Message

Nikhil Jain March 14, 2023, 4:50 a.m. UTC
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>
---
 common/splash.c  | 2 +-
 include/splash.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass March 27, 2023, 8:24 a.m. UTC | #1
On Tue, 14 Mar 2023 at 17:51, Nikhil M Jain <n-jain1@ti.com> wrote:
>
> 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>
> ---
>  common/splash.c  | 2 +-
>  include/splash.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>  # qemu-x86_64
diff mbox series

Patch

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)