[Concept,v2,7/9] video: Move the logo into the new video-images directory
Commit Message
From: Simon Glass <sjg@chromium.org>
Move u_boot_logo.bmp into drivers/video/images and include it in the
build.
Make use of the new video_image_get() macro to obtain the logo.
Drop the old SPLASH_...() macros.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
drivers/video/Makefile | 3 ++-
drivers/video/images/Makefile | 5 +++++
.../{u_boot_logo.bmp => images/u_boot.bmp} | Bin
drivers/video/video-uclass.c | 20 +++++++-----------
4 files changed, 15 insertions(+), 13 deletions(-)
create mode 100644 drivers/video/images/Makefile
rename drivers/video/{u_boot_logo.bmp => images/u_boot.bmp} (100%)
@@ -24,7 +24,6 @@ obj-$(CONFIG_$(PHASE_)PANEL) += panel-uclass.o
obj-$(CONFIG_PANEL_HX8238D) += hx8238d.o
obj-$(CONFIG_$(PHASE_)SIMPLE_PANEL) += simple_panel.o
-obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
obj-$(CONFIG_$(PHASE_)BMP) += bmp.o
obj-y += vesa_helper.o
@@ -86,3 +85,5 @@ obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp/
obj-y += bridge/
obj-y += sunxi/
obj-y += tegra20/
+
+obj-y += images/
new file mode 100644
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2025 Simon Glass <sjg@chromium.org>
+
+obj-$(CONFIG_VIDEO_LOGO) += u_boot.o
similarity index 100%
rename from drivers/video/u_boot_logo.bmp
rename to drivers/video/images/u_boot.bmp
@@ -581,28 +581,24 @@ int video_get_ysize(struct udevice *dev)
return priv->ysize;
}
-#define SPLASH_DECL(_name) \
- extern u8 __splash_ ## _name ## _begin[]; \
- extern u8 __splash_ ## _name ## _end[]
-
-#define SPLASH_START(_name) __splash_ ## _name ## _begin
-#define SPLASH_END(_name) __splash_ ## _name ## _end
-
-SPLASH_DECL(u_boot_logo);
-
void *video_get_u_boot_logo(int *sizep)
{
+ void *ptr;
+ int size;
+
+ ptr = video_image_get(u_boot, &size);
if (sizep)
- *sizep = SPLASH_END(u_boot_logo) - SPLASH_START(u_boot_logo);
+ *sizep = size;
- return SPLASH_START(u_boot_logo);
+ return ptr;
}
static int show_splash(struct udevice *dev)
{
- u8 *data = SPLASH_START(u_boot_logo);
+ u8 *data;
int ret;
+ data = video_image_getptr(u_boot);
ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
return 0;