[PATCH 07/16] video: Add function to obtain the U-Boot logo
Simon Glass
sjg at chromium.org
Thu Oct 6 16:36:09 CEST 2022
It is useful to show the logo from other code, coming in a later feature.
Add a function to obtain it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
drivers/video/video-uclass.c | 5 +++++
include/video.h | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 9f22da02528..fbe1ad169e9 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -406,6 +406,11 @@ int video_sync_copy_all(struct udevice *dev)
SPLASH_DECL(u_boot_logo);
+void *video_get_u_boot_logo(void)
+{
+ return SPLASH_START(u_boot_logo);
+}
+
static int show_splash(struct udevice *dev)
{
u8 *data = SPLASH_START(u_boot_logo);
diff --git a/include/video.h b/include/video.h
index 4c216d851b6..2e68dd717ef 100644
--- a/include/video.h
+++ b/include/video.h
@@ -319,4 +319,11 @@ static inline int video_sync_copy_all(struct udevice *dev)
*/
bool video_is_active(void);
+/**
+ * video_get_u_boot_logo() - Get a pointer to the U-Boot logo
+ *
+ * Returns: Pointer to logo
+ */
+void *video_get_u_boot_logo(void);
+
#endif
--
2.38.0.rc1.362.ged0d419d3c-goog
More information about the U-Boot
mailing list