diff options
author | Tom Rini <trini@konsulko.com> | 2023-05-05 09:36:08 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-05 09:36:08 -0400 |
commit | ab75996ba49c140c529f14b5c40d0d16430feefb (patch) | |
tree | acedbf783e9db8b8b7d0adadb3aa14565d7c646b /common/splash.c | |
parent | eb59ece5204fe06bd037fe64944bfbb3b85864ea (diff) | |
parent | def72d5c6265bde4e9eb7976db53a77fabc4808a (diff) |
Merge tag 'video-for-v2023.07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-video
- enable video support in SPL
- support splash screen for TI am62x
- replace #ifdef and #if with if's in bmp/splash
- add lm3533 backlight driver
- add Solomon SSD2825 DSI/LVDS bridge driver
- add Renesas R61307 and R69328 MIPI DSI panel drivers
- add tegra DC based PWM backlight driver
- add generic endeavoru (HTC One X) panel driver
Diffstat (limited to 'common/splash.c')
-rw-r--r-- | common/splash.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/splash.c b/common/splash.c index 4bc54b1bf9e..6820db683bd 100644 --- a/common/splash.c +++ b/common/splash.c @@ -89,19 +89,18 @@ static inline int splash_video_logo_load(void) { return -ENOSYS; } __weak int splash_screen_prepare(void) { - if (IS_ENABLED(CONFIG_SPLASH_SOURCE)) + if (CONFIG_IS_ENABLED(SPLASH_SOURCE)) return splash_source_load(default_splash_locations, ARRAY_SIZE(default_splash_locations)); return splash_video_logo_load(); } -#ifdef CONFIG_SPLASH_SCREEN_ALIGN void splash_get_pos(int *x, int *y) { char *s = env_get("splashpos"); - if (!s) + if (!CONFIG_IS_ENABLED(SPLASH_SCREEN_ALIGN) || !s) return; if (s[0] == 'm') @@ -117,9 +116,8 @@ void splash_get_pos(int *x, int *y) *y = simple_strtol(s + 1, NULL, 0); } } -#endif /* CONFIG_SPLASH_SCREEN_ALIGN */ -#if defined(CONFIG_VIDEO) && !defined(CONFIG_HIDE_LOGO_VERSION) +#if CONFIG_IS_ENABLED(VIDEO) && !CONFIG_IS_ENABLED(HIDE_LOGO_VERSION) #ifdef CONFIG_VIDEO_LOGO #include <bmp_logo.h> @@ -159,13 +157,13 @@ 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) int splash_display(void) { ulong addr; char *s; int x = 0, y = 0, ret; - + if (!CONFIG_IS_ENABLED(SPLASH_SCREEN)) + return -ENOSYS; s = env_get("splashimage"); if (!s) return -EINVAL; @@ -177,16 +175,18 @@ int splash_display(void) splash_get_pos(&x, &y); - ret = bmp_display(addr, x, y); + if (CONFIG_IS_ENABLED(BMP)) + ret = bmp_display(addr, x, y); + else + return -ENOSYS; /* Skip banner output on video console if the logo is not at 0,0 */ if (x || y) goto end; -#if defined(CONFIG_VIDEO) && !defined(CONFIG_HIDE_LOGO_VERSION) +#if CONFIG_IS_ENABLED(VIDEO) && !CONFIG_IS_ENABLED(HIDE_LOGO_VERSION) splash_display_banner(); #endif end: return ret; } -#endif |