From patchwork Wed Oct 1 23:05:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 470 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759359970; bh=0tGgBNH/9I7T4WJwHmi8ljVuxCHi3sXBlonvuKCsH68=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DHqrIhQ7PnhTmECJ7JFe8DjUU9adMsJOUjYCIzn/zFiDmC8LaR7JoamjPlIo5nWaA Q69HZc5NVqqO14Uvis80GlM4jRANlEXkig7Gcpo2BDE0bNshIMetT2viOc23H7OA0n HNG2L/8oOtSWkkwF2kDXeSZfDNMPVPHDQ4RBYLGUUmocPgioTUr5/vEuuhfSxHhz9S y1qgsYPkCBHVI9Vf0CGLL94gqM2glhLIr6bo+lK8iQzBppZV9zwAiFRl35EmaHzbiV rK6I1e1n16L2YXcrcYMQb33YDgCxhk1ifsEFFo0MsaHgDJRY1g5uuX67DpmXOM3KRu 5lxyEuWeP6SuA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D80E167E42 for ; Wed, 1 Oct 2025 17:06:10 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cZdrqs0-QVv3 for ; Wed, 1 Oct 2025 17:06:10 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759359970; bh=0tGgBNH/9I7T4WJwHmi8ljVuxCHi3sXBlonvuKCsH68=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DHqrIhQ7PnhTmECJ7JFe8DjUU9adMsJOUjYCIzn/zFiDmC8LaR7JoamjPlIo5nWaA Q69HZc5NVqqO14Uvis80GlM4jRANlEXkig7Gcpo2BDE0bNshIMetT2viOc23H7OA0n HNG2L/8oOtSWkkwF2kDXeSZfDNMPVPHDQ4RBYLGUUmocPgioTUr5/vEuuhfSxHhz9S y1qgsYPkCBHVI9Vf0CGLL94gqM2glhLIr6bo+lK8iQzBppZV9zwAiFRl35EmaHzbiV rK6I1e1n16L2YXcrcYMQb33YDgCxhk1ifsEFFo0MsaHgDJRY1g5uuX67DpmXOM3KRu 5lxyEuWeP6SuA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C53D267D8D for ; Wed, 1 Oct 2025 17:06:10 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759359968; bh=U+ZPAEJ55/K9XZ8Su2qMKu9ufDwgz16kiGsPMXLEpDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XDCdjRkA/kTEjV8jPeq7l2WIt/TyB7IfXMslsube5HRM79ZdThkZiTLHjOZpZZrFL N2GHmX7aC44CQbCLFQL6rpDeZjir693fTJHxvpziaQRHA4SbNDJl5WG8XCWE48bVUp XzDFIJIZKk/Fi8zWxpcED4QASb2RWvnCsWbHdJGjNY0iNSd5hYTPrjatQlFQ0dj2rx hVl5dp/oKUV7ZcZWOpxyuo+PYUmlheKtGwh/JkDgsQzzA3UQcaTCy7H75zRbQf6bau qqVh2YLxt6ylswExDQmURg9Vl1q2cus/ACoWI4uBF6Cm4UPPyryHoCK5U6xpjqNAif mheMsrQVh6JJQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9674767E42; Wed, 1 Oct 2025 17:06:08 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id NrpN4vgcvtoq; Wed, 1 Oct 2025 17:06:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759359962; bh=B5VkOJXR9LlcI45WRsXwpYRZtl5eWedvOItliLZkQdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VLswZ/3Gs8O+r36kyXpi75+RD1wR797jyuv380sJk7gtXmGkqvJOVz3RBl0plVhEv jrr0eMAe+2joBiZeVNgQkvp823jMZJCdE8L8E3FvYSPiws6RUwMBuSgnZAQxT3EuOY FWC7MKNVPRPrkTPb80ok7KGj/L2WFqhycVaUIB3vyabgOGCYWKXi4DatRkAQXPKPQV ie3CQmMSXzNO18Pp0J5nCchGvlgsHrEXwnvGpB1RKZemUZ3rwwKyfEB93qYgRwUZOP lxskOEPNt7d5h9HCVQyf2cRVfmdRXt1E5lBSvBo0l5y73l08K1x6gZAibI/pfow1QY lElb0KcN/5JCw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9330F67D8D; Wed, 1 Oct 2025 17:06:02 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 1 Oct 2025 17:05:30 -0600 Message-ID: <20251001230537.3324058-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251001230537.3324058-1-sjg@u-boot.org> References: <20251001230537.3324058-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7C6RSJ3ZEKJZN7SM5P7TYOWMQGHHEXBC X-Message-ID-Hash: 7C6RSJ3ZEKJZN7SM5P7TYOWMQGHHEXBC X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/6] video: Move the logo into the new video-images directory List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 Signed-off-by: Simon Glass --- 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%) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index e0b0015606f..620f278c738 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -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/ diff --git a/drivers/video/images/Makefile b/drivers/video/images/Makefile new file mode 100644 index 00000000000..d3aca2ee7f7 --- /dev/null +++ b/drivers/video/images/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2025 Simon Glass + +obj-$(CONFIG_VIDEO_LOGO) += u_boot.o diff --git a/drivers/video/u_boot_logo.bmp b/drivers/video/images/u_boot.bmp similarity index 100% rename from drivers/video/u_boot_logo.bmp rename to drivers/video/images/u_boot.bmp diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index be014a770d0..eaf6cf9fc71 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -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;