[24/33] splash: make splash_video_logo_load() available to boards

Message ID 20261104085036.4012238-25-dario.binacchi@amarulasolutions.com
State New
Headers
Series Add Engicam MicroGEA-STM32MP257D-RMM board support |

Commit Message

Dario Binacchi Nov. 4, 2026, 8:49 a.m. UTC
Boards providing their own splash_screen_prepare() to load the splash
image from a board specific location have no way to fall back to the
built-in logo when that image is missing.

Export splash_video_logo_load(), which copies the built-in logo to
the "splashimage" address, so that they can use it as fallback.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 common/splash.c  | 4 +---
 include/splash.h | 9 +++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.43.0
  

Comments

Tom Rini Nov. 4, 2026, 7:18 p.m. UTC | #1
On Wed, Nov 04, 2026 at 09:49:57AM +0100, Dario Binacchi wrote:

> Boards providing their own splash_screen_prepare() to load the splash
> image from a board specific location have no way to fall back to the
> built-in logo when that image is missing.
> 
> Export splash_video_logo_load(), which copies the built-in logo to
> the "splashimage" address, so that they can use it as fallback.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
  

Patch

diff --git a/common/splash.c b/common/splash.c
index 8a65ae597771..5502b4f5452f 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -70,7 +70,7 @@  static struct splash_location default_splash_locations[] = {
 
 #include <bmp_logo_data.h>
 
-static int splash_video_logo_load(void)
+int splash_video_logo_load(void)
 {
 	char *splashimage;
 	ulong bmp_load_addr;
@@ -90,8 +90,6 @@  static int splash_video_logo_load(void)
 
 	return 0;
 }
-#else
-static inline int splash_video_logo_load(void) { return -ENOSYS; }
 #endif
 
 __weak int splash_screen_prepare(void)
diff --git a/include/splash.h b/include/splash.h
index 7671bd7e9c44..0a3ea0346030 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -61,6 +61,15 @@  static inline int splash_source_load(struct splash_location *locations,
 }
 #endif
 
+#if IS_ENABLED(CONFIG_VIDEO_LOGO)
+int splash_video_logo_load(void);
+#else
+static inline int splash_video_logo_load(void)
+{
+	return -ENOSYS;
+}
+#endif
+
 int splash_screen_prepare(void);
 void splash_get_pos(int *x, int *y);
 int splash_display(void);