From patchwork Thu Oct 2 15:45:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 479 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=1759420004; bh=wWwE5cAUAZlwYQweigxyUFJacqYn2bZmbMPihfHBxp8=; 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=KGMRTnz0Q1000M6LrdLZTAqVt2QQ685rtFPGAh2Yqoev5wh5rfp3pbQa0fxyeHWTE 8XUHx837GJJBm4XG0BRfVwLF1xeljYZaVaYIftJBMZeIcFUNbSz47ddab8el4zU6Ju SdER89RzNGWYesGmrQsdJNX0+ZgRw3bLBuT9CZxXYSIDHaUxyrTUFXsAjhCJMpQZyr pc8ZH95nkOINIVtCuY33kuNjX4mtuYY6TyKQHfakCOvTl8Lx//92mCSA9z4OiwV+dX 01OQPcvlp2zUfXBB2mh9SHc9/6mJRhd/ZMDzaGAINOrMETsdKX5Yv1Q39Bv1JvvEbs K56RLiGXFU6xA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7360A67F1A for ; Thu, 2 Oct 2025 09:46:44 -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 Jra0MUO3h6tZ for ; Thu, 2 Oct 2025 09:46:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759420004; bh=wWwE5cAUAZlwYQweigxyUFJacqYn2bZmbMPihfHBxp8=; 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=KGMRTnz0Q1000M6LrdLZTAqVt2QQ685rtFPGAh2Yqoev5wh5rfp3pbQa0fxyeHWTE 8XUHx837GJJBm4XG0BRfVwLF1xeljYZaVaYIftJBMZeIcFUNbSz47ddab8el4zU6Ju SdER89RzNGWYesGmrQsdJNX0+ZgRw3bLBuT9CZxXYSIDHaUxyrTUFXsAjhCJMpQZyr pc8ZH95nkOINIVtCuY33kuNjX4mtuYY6TyKQHfakCOvTl8Lx//92mCSA9z4OiwV+dX 01OQPcvlp2zUfXBB2mh9SHc9/6mJRhd/ZMDzaGAINOrMETsdKX5Yv1Q39Bv1JvvEbs K56RLiGXFU6xA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 638CA67F14 for ; Thu, 2 Oct 2025 09:46:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759420002; bh=hnkfR36ENFov18f6IHj2+2BSNUxV2CexIwPcUQtuQ80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pWQMduR8vZyV+I4FHq3CDZB8qalmZ17V9JxRfUfXKpzX2oh/N5j2Rc4p7BOFtZlfi gpQqq63cZUtxukFOSNAts+y1XECq6O5/fKC4PXMU164VIshF8KY7fgkEs/qHiXeTEx 7wUGBswfcfPDWzhegNMUA8KwQS0H9/EHDUU6GNWjsGIAyoFP0YoFOs6BCH3tH4EJUR fgPTEtMnSOqeFbRJM3hmQH1Or4qFw7ciwC/g56RJB5k502E8Usbl+lAga9HP0rTaKR D1bMnWRcQ2VteDE8sQGa0iiI8WrXLCQfr16uxVW3/BlHG+jnvBuU14HrWHEjBZyePp cpYJ+syWssqqQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F3ADD67F14; Thu, 2 Oct 2025 09:46:41 -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 dtyLuAtX7jh5; Thu, 2 Oct 2025 09:46:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759419996; bh=YbEe6EBWLohszTDA8wraGFomDKJ+jdZ/V/uqpfAoQOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPPkvakY3j9JFrU4SDl0cAOhJW4dJpCvHjXUmcuOuB694brBOHrnCtTFo0xU+kBNw ESiVPNY14bcaACLzc9MYu0FohTHZnF49TsQh165rlcHtvYTbjiYL5BQ3Uyr3tfAkep WQApJW5qTgHL55UzKetpGTdWvwle5vVjxZA5vaXClIpBiu/DuUsEdCnmk5LhaLR6NM A1YGOAe76lCXLHmEHAh625jTlG8eC2JOytwZzaIADESSnjR1kpunMvZsmhFBtEa4Ka gEo+zUb5iIAWl4u8xW2RcWSzGIjViMioxJ8vcvQTk/YUmxhoXX80RYQioMvCTaTaMl m2Mbo+3NcXcsQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 91D2067E66; Thu, 2 Oct 2025 09:46:36 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 2 Oct 2025 09:45:47 -0600 Message-ID: <20251002154554.4129220-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251002154554.4129220-1-sjg@u-boot.org> References: <20251002154554.4129220-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HIT67C4AK6AG5KS36UTWPSZ44AB7PP2G X-Message-ID-Hash: HIT67C4AK6AG5KS36UTWPSZ44AB7PP2G 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 v2 7/9] 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 --- (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%) 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;