video: Move the logo into the new video-images directory
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>
This commit is contained in:
@@ -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/
|
||||
|
||||
5
drivers/video/images/Makefile
Normal file
5
drivers/video/images/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright 2025 Simon Glass <sjg@chromium.org>
|
||||
|
||||
obj-$(CONFIG_VIDEO_LOGO) += u_boot.o
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -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)
|
||||
{
|
||||
if (sizep)
|
||||
*sizep = SPLASH_END(u_boot_logo) - SPLASH_START(u_boot_logo);
|
||||
void *ptr;
|
||||
int size;
|
||||
|
||||
return SPLASH_START(u_boot_logo);
|
||||
ptr = video_image_get(u_boot, &size);
|
||||
if (sizep)
|
||||
*sizep = size;
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user