From nobody Mon Feb 9 03:52:34 2026 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 698322BDC09; Tue, 6 Jan 2026 14:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.13 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709573; cv=pass; b=mR6W5qvRF7U1KBBHa5u/cDpK4s1hs3pcw1N/svJLKDyQHxUBV/A8Amyh0xiTX7fAOrVcJsRnbLLn/gTghRer2GLsLRwGqLfITtl7cTK0789bWgFpTSl4rbtaO4yZ15s+aSk2qEn4JVx9JZz63/NlTnfF4Nh8Xw24/giRRYtLUfk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709573; c=relaxed/simple; bh=UYzAftTN8qgh7w3/41sYBt+idzxUCtFN1osSWpaEeKE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IkTWu7gFtSeMrb10V8O2Hml1RNWHN8aoJtfx21xjfXTFSPTznQtGHKtcyp/gNnEFHwmdKtEijNgz4WYKkl+D8Ze9YgzCj8rQCa5XIlS09d65DKHvSc5hUkEJoYF/jcWdQwfP8CUtBC9JoTdqpJVjXaj+diY+St4iid7VDH/jVyk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=OxVu7W7f; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=mEm7wXA1; arc=pass smtp.client-ip=185.56.87.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="OxVu7W7f"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="mEm7wXA1" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-hwtm.prod.antispam.mailspamprotection.com; s=arckey; t=1767709570; b=RvyMFB8zTv9TVcKoKUwmaHulsXHOMNiJFTcF0zEicJs+vzAYHP2HgxikRt6xjTOEeftvDWf0tu zEcCEXhjLhX5kBoNrxUZsfgwyelCqLiCmQjoAIIONk/dPSwR1KF2MJAxT97AVJWUCnJ8RmYwSB bIMty9WaEqgIVuIRzZeg2NuAAsmOP4I+7htx8NTica4Zo3lI19hqwWt2Cu5Jh4HA3x/nXt/KWA eVGAv9frBGAOE6JF4RDs7Hq0icysZH6I/jhCmGxg/d/EzI+DUgQ8q0HZZGQTazTZU+ZTps9Z2M LJ3xrHboV523WyWLKV054eLSdWfGu+HMkHP5/PHRFBtkaw==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-hwtm.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-hwtm.prod.antispam.mailspamprotection.com; s=arckey; t=1767709570; bh=UYzAftTN8qgh7w3/41sYBt+idzxUCtFN1osSWpaEeKE=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=gpPNC01wOWH0b19MHOP+E2qcVnlh8JSNqFaqfQnZMVgcQMCg2Vtf7OOO8wVQF0HD2WAQw2E9WP oWWfS2yIOCsEHuveDiSNKNAVKsUKf9lAT0/VQgG5zfASpuZBZn+enkes+rc26Z27USLFISGk2L uw7WXLHvKVHZO4DxJQ2ERHIoJBeCsCy2o74mJNt+t65LKFb2eOSZDZSDRa4CI0PLf5bAVC8f68 RpEnb5RzfUdpiQ77jGA/RKjaiLX+BCrAPmN1QHb2GrsfTE40euKj7lLDCR47nKqZwHqowNOAaz +LZXDZUHCjMGw2ehEc5o/mJwg5E2nXrf2W41P/GXkv0rVA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=AxlTdAfFM4Zhbr3CFlL2bD50RxOvJYwUxjvCgjE4o68=; b=OxVu7W7fq4aGiaYL4mg21KOTsy +U5lF30wt7ezTxid4Z5GuWk9D/4e8B1xRi+5MmQSQSkPp0S7bk+hF+XDG/yeVhjzrYo/jTKn17V27 s1Qf5YwBt28C/un57oJXXxBur5nFSMAgDoFQ1Q9P4SVMDFC8043yvJjV5mjOM3+582XM=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-hwtm.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80W-00000001CtZ-1Rlk; Tue, 06 Jan 2026 14:26:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=AxlTdAfFM4Zhbr3CFlL2bD50RxOvJYwUxjvCgjE4o68=; b=mEm7wXA1m6SNsaPl/G66oh7Jlp J9SWkjyXm4kvVKs0A/285IdmVIIaBk+bdJ9AyHQivIbAnvHU7/6kvJvRJHi4i0YlfKzWez9B/I6zL EtRxowH3sTOQ67XQwRnGa72v59PqcOFzXZ3D8WnMzYVwDaojJJwxXh81oIkNTOoqOxXg=; Received: from [95.248.141.113] (port=61315 helo=[192.168.178.65]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80P-00000000MvX-2AOW; Tue, 06 Jan 2026 14:25:53 +0000 From: Francesco Valla Date: Tue, 06 Jan 2026 15:25:40 +0100 Subject: [PATCH RFC v2 1/3] drm: client: add splash client Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260106-drm_client_splash-v2-1-6e86a7434b59@valla.it> References: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> In-Reply-To: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jonathan Corbet , Jocelyn Falempe , Javier Martinez Canillas Cc: Sam Ravnborg , Mario Limonciello , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=32186; i=francesco@valla.it; h=from:subject:message-id; bh=UYzAftTN8qgh7w3/41sYBt+idzxUCtFN1osSWpaEeKE=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJmx0gV263PCRHnnLg/9dfN6EpO71zbbfZuXXp524eyDB InQi9VBHaUsDGJcDLJiiiwh627c2zPX/FvaBsZHMHNYmUCGMHBxCsBEJKIY/tcsZrfXcbIobnGc czhM98fNvLNGizKZLv6QSLN6XVXO8YaRYQ/b36xlh8XtVta1h90U+fB7g+3GwP1rly//Pj9A8o3 NN3YA X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: 162cf8f848c26c474ae8a7b44bb37f22 AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vd80W-00000001CtZ-1Rlk-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-hwtm.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Add a DRM client that draws a simple splash, with possibility to show: - a colored background; - a static BMP image (loaded as firmware); - the logo provided by EFI BGRT. The client is not meant to replace a full-featured bootsplash, but rather to remove some complexity (and hopefully boot time) on small embedded platforms or on systems with a limited scope (e.g: recovery or manufacturing images). The background color can be set either at build time from a dedicated config option or at runtime through the drm_client_lib.splash_color command line parameter. Any color in RGB888 format can be used. If enabled, the static BMP image is loaded using the kernel firmware infrastructure; a valid BMP image with 24bpp color and no compression is expected. The name of the image can be set through the drm_client_lib.splash_bmp kernel command line parameter, with the default being 'drm_splash.bmp'. Just like the existing DRM clients, the splash can be enabled from the kernel command line using drm_client_lib.active=3Dsplash. Signed-off-by: Francesco Valla --- drivers/gpu/drm/clients/Kconfig | 79 ++- drivers/gpu/drm/clients/Makefile | 1 + drivers/gpu/drm/clients/drm_client_internal.h | 9 + drivers/gpu/drm/clients/drm_client_setup.c | 8 + drivers/gpu/drm/clients/drm_splash.c | 883 ++++++++++++++++++++++= ++++ 5 files changed, 979 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/clients/Kconfig b/drivers/gpu/drm/clients/Kcon= fig index 6096c623d9d5b1a3d4a40d986c45aad2f8277767..dd8cd6cacd1166932eb3890dd81= 6b9ae2d26330f 100644 --- a/drivers/gpu/drm/clients/Kconfig +++ b/drivers/gpu/drm/clients/Kconfig @@ -12,6 +12,7 @@ config DRM_CLIENT_LIB config DRM_CLIENT_SELECTION tristate depends on DRM + select DRM_CLIENT_LIB if DRM_CLIENT_SPLASH select DRM_CLIENT_LIB if DRM_CLIENT_LOG select DRM_CLIENT_LIB if DRM_FBDEV_EMULATION help @@ -85,10 +86,79 @@ config DRM_CLIENT_LOG If you only need logs, but no terminal, or if you prefer userspace terminal, say "Y". =20 +config DRM_CLIENT_SPLASH + bool "Display graphic splash" + depends on DRM_CLIENT_SELECTION + select DRM_CLIENT + select DRM_CLIENT_SETUP + select DRM_DRAW + help + This enables a splash drm client, able to display either a plain + color or a static image until the userspace is ready to take over. + The splash will be displayed on all screens available at boot, if + any, or on the ones part of the first hotplug event. + +config DRM_CLIENT_SPLASH_BACKGROUND_COLOR + hex "Splash background color" + depends on DRM_CLIENT_SPLASH + default 0x000000 + help + The default splash background color, in RGB888 format. + + The color can be overridden through the drm_client_lib.splash_color + kernel command line parameter. + +config DRM_CLIENT_SPLASH_BMP_SUPPORT + bool + +choice + prompt "Splash source" + depends on DRM_CLIENT_SPLASH + default DRM_CLIENT_SPLASH_SRC_COLOR + help + Selects the source for the splash graphic. + +config DRM_CLIENT_SPLASH_SRC_COLOR + bool "Solid color" + help + Use a solid color as splash. The color is selected through the + DRM_CLIENT_SPLASH_BACKGROUND_COLOR config option. + + The image will be loaded using the firmware loading facility the + kernel provides. + +config DRM_CLIENT_SPLASH_SRC_BMP + bool "BMP image" + select DRM_CLIENT_SPLASH_BMP_SUPPORT + select FW_LOADER + help + Use a BMP (bitmap) image as splash. If the image is smaller than the + display(s), it will be centered and the color specified through the + DRM_CLIENT_SPLASH_BACKGROUND_COLOR config option will be used as + background. + + The image will be loaded using the firmware loading facility the + kernel provides; it shall use 24 bits per pixel and shall not be + compressed. The name of the file can be set through the + drm_client_lib.splash_bmp command line parameter, with the default + being 'drm_splash.bmp'. + +config DRM_CLIENT_SPLASH_SRC_BGRT + bool "EFI BGRT" + select DRM_CLIENT_SPLASH_BMP_SUPPORT + depends on EFI + help + Use the BGRT image provided by the EFI bootloader. If the image is + smaller than the display(s), it will be centered and the color + specified through the DRM_CLIENT_SPLASH_BACKGROUND_COLOR config + option will be used as background. + +endchoice + choice prompt "Default DRM Client" depends on DRM_CLIENT_SELECTION - depends on DRM_FBDEV_EMULATION || DRM_CLIENT_LOG + depends on DRM_FBDEV_EMULATION || DRM_CLIENT_LOG || DRM_CLIENT_SPLASH default DRM_CLIENT_DEFAULT_FBDEV help Selects the default drm client. @@ -111,6 +181,12 @@ config DRM_CLIENT_DEFAULT_LOG screen, but doesn't implement a full terminal. For that you will need a userspace terminal using drm/kms. =20 +config DRM_CLIENT_DEFAULT_SPLASH + bool "splash" + depends on DRM_CLIENT_SPLASH + help + Use splash as default drm client. + endchoice =20 config DRM_CLIENT_DEFAULT @@ -118,6 +194,7 @@ config DRM_CLIENT_DEFAULT depends on DRM_CLIENT default "fbdev" if DRM_CLIENT_DEFAULT_FBDEV default "log" if DRM_CLIENT_DEFAULT_LOG + default "splash" if DRM_CLIENT_DEFAULT_SPLASH default "" =20 endmenu diff --git a/drivers/gpu/drm/clients/Makefile b/drivers/gpu/drm/clients/Mak= efile index c16addbc327f09572aa3142cbf0d1d13f172a9e9..3df02d10cd18a47d7e8d7cee701= 63b0ef0129b51 100644 --- a/drivers/gpu/drm/clients/Makefile +++ b/drivers/gpu/drm/clients/Makefile @@ -5,4 +5,5 @@ subdir-ccflags-y +=3D -I$(src)/.. drm_client_lib-y :=3D drm_client_setup.o drm_client_lib-$(CONFIG_DRM_CLIENT_LOG) +=3D drm_log.o drm_client_lib-$(CONFIG_DRM_FBDEV_EMULATION) +=3D drm_fbdev_client.o +drm_client_lib-$(CONFIG_DRM_CLIENT_SPLASH) +=3D drm_splash.o obj-$(CONFIG_DRM_CLIENT_LIB) +=3D drm_client_lib.o diff --git a/drivers/gpu/drm/clients/drm_client_internal.h b/drivers/gpu/dr= m/clients/drm_client_internal.h index 6dc078bf6503b902cbb3267b64ea42d9f1c23375..48ee0c1c2529882b2bf5dc78678= 8390823e25cd6 100644 --- a/drivers/gpu/drm/clients/drm_client_internal.h +++ b/drivers/gpu/drm/clients/drm_client_internal.h @@ -22,4 +22,13 @@ void drm_log_register(struct drm_device *dev); static inline void drm_log_register(struct drm_device *dev) {} #endif =20 +#ifdef CONFIG_DRM_CLIENT_SPLASH +void drm_splash_register(struct drm_device *dev, + const struct drm_format_info *format); +#else +static inline void drm_splash_register(struct drm_device *dev, + const struct drm_format_info *format) +{} +#endif + #endif diff --git a/drivers/gpu/drm/clients/drm_client_setup.c b/drivers/gpu/drm/c= lients/drm_client_setup.c index 515aceac22b18161a14bd60be4acedc1ddd05bc5..c19498938ee3ba442f7502b27a9= c33dfff45a203 100644 --- a/drivers/gpu/drm/clients/drm_client_setup.c +++ b/drivers/gpu/drm/clients/drm_client_setup.c @@ -56,6 +56,14 @@ void drm_client_setup(struct drm_device *dev, const stru= ct drm_format_info *form return; } #endif + +#ifdef CONFIG_DRM_CLIENT_SPLASH + if (!strcmp(drm_client_default, "splash")) { + drm_splash_register(dev, format); + return; + } +#endif + if (strcmp(drm_client_default, "")) drm_warn(dev, "Unknown DRM client %s\n", drm_client_default); } diff --git a/drivers/gpu/drm/clients/drm_splash.c b/drivers/gpu/drm/clients= /drm_splash.c new file mode 100644 index 0000000000000000000000000000000000000000..204a5256ef03b6edb81e5dc8c49= b5929cb51ff92 --- /dev/null +++ b/drivers/gpu/drm/clients/drm_splash.c @@ -0,0 +1,883 @@ +// SPDX-License-Identifier: GPL-2.0 or MIT +/* + * Copyright (c) 2025-2026 Francesco Valla + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "drm_client_internal.h" +#include "drm_draw_internal.h" +#include "drm_internal.h" + +/** + * DOC: overview + * + * This is a simple graphic bootsplash, able to display either a plain col= or or + * a static image. + */ + +static unsigned int splash_color =3D CONFIG_DRM_CLIENT_SPLASH_BACKGROUND_C= OLOR; +module_param(splash_color, uint, 0400); +MODULE_PARM_DESC(splash_color, "Splash background color (RGB888)"); + +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_SRC_BMP) +#define DEFAULT_SPLASH_BMP "drm_splash.bmp" +static char *splash_bmp =3D DEFAULT_SPLASH_BMP; +module_param(splash_bmp, charp, 0400); +MODULE_PARM_DESC(splash_bmp, "Name of splash image (default: \"" DEFAULT_S= PLASH_BMP "\")"); +#endif // CONFIG_DRM_CLIENT_SPLASH_SRC_BMP + +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_BMP_SUPPORT) +#define BMP_FILE_MAGIC_ID 0x4d42 + +/* BMP header structures copied from drivers/video/fbdev/efifb.c */ +struct bmp_file_header { + u16 id; + u32 file_size; + u32 reserved; + u32 bitmap_offset; +} __packed; + +struct bmp_dib_header { + u32 dib_header_size; + s32 width; + s32 height; + u16 planes; + u16 bpp; + u32 compression; + u32 bitmap_size; + u32 horz_resolution; + u32 vert_resolution; + u32 colors_used; + u32 colors_important; +} __packed; +#endif // CONFIG_DRM_CLIENT_SPLASH_BMP_SUPPORT + +typedef int (*drm_splash_data_get_func_t)(void *priv, const u8 **data, siz= e_t *size); +typedef void (*drm_splash_data_release_func_t)(void *priv); + +struct drm_splash_scanout { + int id; + u32 format; + unsigned int width; + unsigned int height; + struct drm_client_buffer *buffer; + bool bg_drawn; +}; + +struct drm_splash { + struct drm_client_dev client; + u32 preferred_format; + struct device dev; + + struct task_struct *thread; + atomic_t pending; + + struct mutex hotplug_lock; + bool initialized; + + u32 n_scanout; + struct drm_splash_scanout *scanout; + + spinlock_t data_lock; + drm_splash_data_get_func_t data_get; + drm_splash_data_release_func_t data_release; + void *data_priv; +}; + +static struct drm_splash *client_to_drm_splash(struct drm_client_dev *clie= nt) +{ + return container_of_const(client, struct drm_splash, client); +} + +static void __maybe_unused +drm_splash_data_source_push(struct drm_splash *splash, + drm_splash_data_get_func_t get, + drm_splash_data_release_func_t release, + void *priv) +{ + guard(spinlock)(&splash->data_lock); + + /* Release previous data */ + if (splash->data_release) + splash->data_release(splash->data_priv); + + splash->data_get =3D get; + splash->data_release =3D release; + splash->data_priv =3D priv; +} + +static void drm_splash_data_source_pop(struct drm_splash *splash, + drm_splash_data_get_func_t *get, + drm_splash_data_release_func_t *release, + void **priv) +{ + guard(spinlock)(&splash->data_lock); + + *get =3D splash->data_get; + splash->data_get =3D NULL; + + *release =3D splash->data_release; + splash->data_release =3D NULL; + + *priv =3D splash->data_priv; + splash->data_priv =3D NULL; +} + +static struct drm_splash_scanout * +get_scanout_from_tile_group(struct drm_splash *splash, int id) +{ + int j; + + for (j =3D 0; j < splash->n_scanout; j++) + if (splash->scanout[j].id =3D=3D id) + return &splash->scanout[j]; + + return NULL; +} + +static u32 drm_splash_find_usable_format(struct drm_plane *plane, + u32 preferred_format) +{ + int i; + + /* Check if the preferred format can be used */ + for (i =3D 0; i < plane->format_count; i++) + if (plane->format_types[i] =3D=3D preferred_format) + return preferred_format; + + /* Otherwise, find the first format that can be converted from XRGB8888 */ + for (i =3D 0; i < plane->format_count; i++) + if (drm_draw_color_from_xrgb8888(0xffffffff, plane->format_types[i]) != =3D 0) + return plane->format_types[i]; + + return DRM_FORMAT_INVALID; +} + +static void drm_splash_fill(struct iosys_map *map, unsigned int dst_pitch, + unsigned int height, unsigned int width, + u32 px_width, u32 color) +{ + switch (px_width) { + case 2: + drm_draw_fill16(map, dst_pitch, height, width, color); + break; + case 3: + drm_draw_fill24(map, dst_pitch, height, width, color); + break; + case 4: + drm_draw_fill32(map, dst_pitch, height, width, color); + break; + default: + WARN_ONCE(1, "Can't fill with pixel width %d", px_width); + } +} + +static int drm_splash_fill_solid_color(struct drm_client_buffer *buffer, u= 32 color) +{ + struct drm_client_dev *client =3D buffer->client; + struct drm_framebuffer *fb =3D buffer->fb; + struct drm_rect r =3D DRM_RECT_INIT(0, 0, fb->width, fb->height); + u32 px_width =3D fb->format->cpp[0]; + struct iosys_map map; + int ret; + + ret =3D drm_client_buffer_vmap_local(buffer, &map); + if (ret) { + drm_err(client->dev, "splash: cannot vmap buffer: %d", ret); + return ret; + } + + drm_splash_fill(&map, fb->pitches[0], drm_rect_height(&r), + drm_rect_width(&r), px_width, color); + + drm_client_buffer_vunmap_local(buffer); + + return drm_client_buffer_flush(buffer, &r); +} + +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_BMP_SUPPORT) +static void drm_splash_blit_pix16(struct iosys_map *map, unsigned int dpit= ch, + unsigned int x_pad, unsigned int y_pad, + const u8 *sbuf8, unsigned int spitch, + unsigned int width, unsigned int height, + bool invert_y, u32 format) +{ + unsigned int x, y, src_offset, dst_offset; + u32 scolor, dcolor, wr_off; + + for (y =3D 0; y < height; y++) { + src_offset =3D (invert_y ? (height - y - 1) : y) * spitch; + dst_offset =3D (y_pad + y) * dpitch; + + for (x =3D 0; x < width; x++) { + scolor =3D *(const u32 *)(&sbuf8[src_offset + 3 * x]); + dcolor =3D drm_draw_color_from_xrgb8888(scolor, format); + wr_off =3D dst_offset + (x_pad + x) * sizeof(u16); + + iosys_map_wr(map, wr_off, u16, dcolor); + } + } +} + +static void drm_splash_blit_pix24(struct iosys_map *map, unsigned int dpit= ch, + unsigned int x_pad, unsigned int y_pad, + const u8 *sbuf8, unsigned int spitch, + unsigned int width, unsigned int height, + bool invert_y, u32 format) +{ + unsigned int x, y, src_offset, dst_offset; + u32 scolor, dcolor, wr_off; + + for (y =3D 0; y < height; y++) { + src_offset =3D (invert_y ? (height - y - 1) : y) * spitch; + dst_offset =3D (y_pad + y) * dpitch; + + for (x =3D 0; x < width; x++) { + scolor =3D *(const u32 *)(&sbuf8[src_offset + 3 * x]); + dcolor =3D drm_draw_color_from_xrgb8888(scolor, format); + wr_off =3D dst_offset + (x_pad + x) * 3; + + iosys_map_wr(map, wr_off, u8, (dcolor & 0x000000FF) >> 0); + iosys_map_wr(map, wr_off + 1, u8, (dcolor & 0x0000FF00) >> 8); + iosys_map_wr(map, wr_off + 2, u8, (dcolor & 0x00FF0000) >> 16); + } + } +} + +static void drm_splash_blit_pix32(struct iosys_map *map, unsigned int dpit= ch, + unsigned int x_pad, unsigned int y_pad, + const u8 *sbuf8, unsigned int spitch, + unsigned int width, unsigned int height, + bool invert_y, u32 format) +{ + unsigned int x, y, src_offset, dst_offset; + u32 scolor, dcolor, wr_off; + + for (y =3D 0; y < height; y++) { + src_offset =3D (invert_y ? (height - y - 1) : y) * spitch; + dst_offset =3D (y_pad + y) * dpitch; + + for (x =3D 0; x < width; x++) { + scolor =3D *(const u32 *)(&sbuf8[src_offset + 3 * x]); + dcolor =3D drm_draw_color_from_xrgb8888(scolor, format); + wr_off =3D dst_offset + (x_pad + x) * sizeof(u32); + + iosys_map_wr(map, wr_off, u32, dcolor); + } + } +} + +static void drm_splash_blit_rgb888(struct iosys_map *map, unsigned int dpi= tch, + unsigned int x_pad, unsigned int y_pad, + const u8 *sbuf8, unsigned int spitch, + unsigned int width, unsigned int height, + bool invert_y) +{ + unsigned int y, src_offset, dst_offset; + + for (y =3D 0; y < height; y++) { + src_offset =3D (invert_y ? (height - y - 1) : y) * spitch; + dst_offset =3D (y_pad + y) * dpitch + x_pad * 3; + + iosys_map_memcpy_to(map, dst_offset, &sbuf8[src_offset], width * 3); + } +} + +static int drm_splash_bmp_to_scanout(struct drm_splash_scanout *scanout, + const u8 *data, size_t data_len) + +{ + struct drm_client_buffer *buffer =3D scanout->buffer; + struct drm_client_dev *client =3D buffer->client; + struct drm_framebuffer *fb =3D buffer->fb; + u32 px_width =3D fb->format->cpp[0]; + const struct bmp_file_header *file_header; + const struct bmp_dib_header *dib_header; + u32 bmp_width, bmp_height, bmp_pitch; + bool bmp_invert_y; + unsigned int x_pad, y_pad; + const u8 *image_data; + struct iosys_map map; + struct drm_rect r; + int ret; + + if (data_len < (sizeof(*file_header) + sizeof(*dib_header))) { + drm_err(client->dev, "splash: BMP file too short"); + return -EINVAL; + } + + file_header =3D (const struct bmp_file_header *)data; + if (file_header->id !=3D BMP_FILE_MAGIC_ID) { + drm_err(client->dev, "splash: invalid BMP magic 0x%04X", + file_header->id); + return -EINVAL; + } + + dib_header =3D (const struct bmp_dib_header *)(data + sizeof(*file_header= )); + + /* Restrict supported format to uncompressed, 24bit RGB888 */ + if (dib_header->dib_header_size !=3D 40 || dib_header->width < 0 || + dib_header->planes !=3D 1 || dib_header->compression !=3D 0 || + dib_header->bpp !=3D 24) { + drm_err(client->dev, "splash: invalid BMP format"); + return -EINVAL; + } + + bmp_width =3D dib_header->width; + bmp_height =3D abs(dib_header->height); + bmp_pitch =3D round_up(3 * bmp_width, 4); + bmp_invert_y =3D (dib_header->height > 0); + + if ((file_header->bitmap_offset + bmp_pitch * bmp_height) > data_len) { + drm_err(client->dev, "splash: invalid BMP size"); + return -EINVAL; + } + + if (bmp_width > scanout->width || bmp_height > scanout->height) { + drm_err(client->dev, "splash: BMP image is too big for the screen"); + return -EINVAL; + } + + image_data =3D data + file_header->bitmap_offset; + + ret =3D drm_client_buffer_vmap_local(buffer, &map); + if (ret) { + drm_err(client->dev, "splash: cannot vmap buffer: %d", ret); + return ret; + } + + /* Center X and Y */ + x_pad =3D (scanout->width - bmp_width) / 2; + y_pad =3D (scanout->height - bmp_height) / 2; + r =3D DRM_RECT_INIT(x_pad, y_pad, bmp_width, bmp_height); + + /* In case the target format is RGB888, source data can be copied to + * the video buffer line by line, avoiding some overhead. + */ + if (scanout->format =3D=3D DRM_FORMAT_RGB888) { + drm_splash_blit_rgb888(&map, fb->pitches[0], x_pad, y_pad, + image_data, bmp_pitch, bmp_width, + bmp_height, bmp_invert_y); + } else { + switch (px_width) { + case 2: + drm_splash_blit_pix16(&map, fb->pitches[0], x_pad, + y_pad, image_data, bmp_pitch, + bmp_width, bmp_height, + bmp_invert_y, scanout->format); + break; + case 3: + drm_splash_blit_pix24(&map, fb->pitches[0], x_pad, + y_pad, image_data, bmp_pitch, + bmp_width, bmp_height, + bmp_invert_y, scanout->format); + break; + case 4: + drm_splash_blit_pix32(&map, fb->pitches[0], x_pad, + y_pad, image_data, bmp_pitch, + bmp_width, bmp_height, + bmp_invert_y, scanout->format); + break; + default: + drm_warn_once(client->dev, + "splash: can't blit with pixel width %d", + px_width); + } + } + + drm_client_buffer_vunmap_local(buffer); + + return drm_client_buffer_flush(buffer, &r); +} +#else +static inline int drm_splash_bmp_to_scanout(struct drm_splash_scanout *sca= nout, + const u8 *data, size_t data_len) +{ + return -EOPNOTSUPP; +} +#endif + +static int drm_splash_draw_scanout(struct drm_splash *splash, + struct drm_splash_scanout *scanout, + const u8 *data, size_t data_len) +{ + if (!scanout->buffer) + return -ENODEV; + + if (!scanout->bg_drawn) { + u32 color =3D drm_draw_color_from_xrgb8888(splash_color, + scanout->format); + drm_splash_fill_solid_color(scanout->buffer, color); + scanout->bg_drawn =3D true; + } + + if (data !=3D NULL) { + /* Ignore the return value, since the solid color has already + * been drawn to screen. + */ + drm_splash_bmp_to_scanout(scanout, data, data_len); + } + + return 0; +} + +static int drm_splash_render_thread(void *data) +{ + struct drm_splash *splash =3D data; + struct drm_client_dev *client =3D &splash->client; + + while (!kthread_should_stop()) { + unsigned int draw_count =3D 0; + drm_splash_data_get_func_t get_fn =3D NULL; + drm_splash_data_release_func_t release_fn =3D NULL; + void *priv =3D NULL; + const u8 *img_data =3D NULL; + size_t img_data_len =3D 0; + int i, ret; + + drm_splash_data_source_pop(splash, &get_fn, &release_fn, &priv); + + if (get_fn) { + ret =3D get_fn(priv, &img_data, &img_data_len); + if (ret) { + drm_err(client->dev, + "splash: failed to get image data: %d", + ret); + } + } + + for (i =3D 0; i < splash->n_scanout; i++) { + ret =3D drm_splash_draw_scanout(splash, + &splash->scanout[i], + img_data, img_data_len); + if (ret) { + drm_err(client->dev, + "splash: failed to fill scanout %d: %d", + i, ret); + continue; + } + + draw_count++; + } + + if (release_fn) + release_fn(priv); + + if (draw_count > 0) { + ret =3D drm_client_modeset_commit(client); + /* If commit returns EBUSY, another master showed up. + * This means that the splash is no more required. + */ + if (ret =3D=3D -EBUSY) { + drm_info(client->dev, + "splash: not master anymore, exiting"); + break; + } + } + + /* If no changes arrived in the mean time, wait to be awaken, + * e.g.by a firmware callback. + */ + if (atomic_xchg(&splash->pending, 0) =3D=3D 0) + set_current_state(TASK_UNINTERRUPTIBLE); + + schedule(); + } + + return 0; +} + +static inline void drm_splash_wake_render_thread(struct drm_splash *splash) +{ + atomic_set(&splash->pending, 1); + wake_up_process(splash->thread); +} + +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_SRC_BMP) +static int drm_splash_fw_get(void *priv, const u8 **data, size_t *size) +{ + const struct firmware *fw =3D priv; + + if (!fw) + return -ENODATA; + + *data =3D fw->data; + *size =3D fw->size; + + return 0; +} + +static void drm_splash_fw_release(void *priv) +{ + const struct firmware *fw =3D priv; + + if (fw) + release_firmware(fw); +} + +static void drm_splash_fw_callback(const struct firmware *fw, void *contex= t) +{ + struct drm_splash *splash =3D context; + struct drm_client_dev *client =3D &splash->client; + + if (!fw || !fw->data) { + drm_err(client->dev, "splash: no firmware"); + return; + } + + drm_splash_data_source_push(splash, drm_splash_fw_get, + drm_splash_fw_release, (void *)fw); + + /* Wake the render thread */ + drm_dbg(client->dev, "splash: firmware loaded, wake up drawing thread"); + drm_splash_wake_render_thread(splash); +} + +static int drm_splash_fw_request_bmp(struct drm_splash *splash) +{ + struct drm_client_dev *client =3D &splash->client; + + drm_info(client->dev, "splash: request %s as firmware", splash_bmp); + + return request_firmware_nowait(THIS_MODULE, FW_ACTION_UEVENT, + splash_bmp, client->dev->dev, GFP_KERNEL, + splash, drm_splash_fw_callback); +} +#else +static inline int drm_splash_fw_request_bmp(struct drm_splash *splash) +{ + return -EOPNOTSUPP; +} +#endif // CONFIG_DRM_CLIENT_SPLASH_SRC_BMP + +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_SRC_BGRT) +static int drm_splash_bgrt_get_data(void *priv, const u8 **data, size_t *s= ize) +{ + void *bgrt_image =3D priv; + + *data =3D bgrt_image; + *size =3D bgrt_image_size; + + return 0; +} + +static void drm_splash_bgrt_release(void *priv) +{ + void *bgrt_image =3D priv; + + if (bgrt_image) + memunmap(bgrt_image); +} + +static int drm_splash_bgrt_load(struct drm_splash *splash) +{ + struct drm_client_dev *client =3D &splash->client; + void *bgrt_image =3D NULL; + + drm_info(client->dev, "splash: using EFI BGRT"); + + if (!bgrt_tab.image_address) { + drm_info(client->dev, "splash: no BGRT found"); + return -ENOENT; + } + + if (bgrt_tab.status & 0x06) { + drm_info(client->dev, "splash: BGRT rotation bits set, skipping"); + return -EOPNOTSUPP; + } + + drm_dbg(client->dev, "splash: BGRT image is at 0x%016llx, size=3D%zX", + bgrt_tab.image_address, bgrt_image_size); + + bgrt_image =3D memremap(bgrt_tab.image_address, bgrt_image_size, + MEMREMAP_WB); + if (!bgrt_image) { + drm_warn(client->dev, "splash: failed to map BGRT image memory"); + return -ENOMEM; + } + + drm_splash_data_source_push(splash, drm_splash_bgrt_get_data, + drm_splash_bgrt_release, bgrt_image); + + drm_splash_wake_render_thread(splash); + + return 0; +} +#else +static inline int drm_splash_bgrt_load(struct drm_splash *splash) +{ + return -EOPNOTSUPP; +} +#endif // CONFIG_DRM_CLIENT_SPLASH_SRC_BGRT + +static int drm_splash_init_client(struct drm_splash *splash) +{ + struct drm_client_dev *client =3D &splash->client; + struct drm_mode_set *modeset; + unsigned int modeset_mask =3D 0; + unsigned int fb_count =3D 0; + int j; + + if (drm_client_modeset_probe(client, 0, 0)) + return -1; + + j =3D 0; + drm_client_for_each_modeset(modeset, client) { + struct drm_splash_scanout *tmp; + struct drm_splash_scanout *scanout; + u32 format; + int id =3D -1; + + /* Skip modesets without a mode */ + if (!modeset->mode) + continue; + + if (modeset->connectors[0]->has_tile) { + struct drm_splash_scanout *tiled; + int new_id =3D modeset->connectors[0]->tile_group->id; + + /* Tiled modesets contribute to a single framebuffer, + * check if this tiled group has already been seen. + */ + tiled =3D get_scanout_from_tile_group(splash, new_id); + if (tiled !=3D NULL) { + if (!modeset->x) + tiled->width +=3D modeset->mode->vdisplay; + if (!modeset->y) + tiled->height +=3D modeset->mode->hdisplay; + modeset->fb =3D tiled->buffer->fb; + continue; + } + + /* New tile group, save its ID for later */ + id =3D new_id; + } + + format =3D drm_splash_find_usable_format(modeset->crtc->primary, + splash->preferred_format); + if (format =3D=3D DRM_FORMAT_INVALID) { + drm_warn(client->dev, + "splash: can't find a usable format for modeset"); + continue; + } + + tmp =3D krealloc(splash->scanout, + (splash->n_scanout + 1) * sizeof(*splash->scanout), + GFP_KERNEL); + if (!tmp) { + drm_warn(client->dev, + "splash: can't reallocate the scanout array"); + break; + } + + splash->scanout =3D tmp; + scanout =3D &splash->scanout[splash->n_scanout]; + splash->n_scanout++; + + memset(scanout, 0, sizeof(*scanout)); + scanout->id =3D id; + scanout->format =3D format; + scanout->width =3D modeset->mode->hdisplay; + scanout->height =3D modeset->mode->vdisplay; + + modeset_mask |=3D BIT(j); + j++; + } + + /* Now that all sensible modesets have been collected, allocate buffers */ + j =3D 0; + drm_client_for_each_modeset(modeset, client) { + struct drm_splash_scanout *scanout; + + if (!(modeset_mask & BIT(j))) + continue; + + scanout =3D &splash->scanout[j]; + j++; + + scanout->buffer =3D drm_client_buffer_create_dumb(client, + scanout->width, + scanout->height, + scanout->format); + if (IS_ERR(scanout->buffer)) { + drm_warn(client->dev, + "splash: can't create dumb buffer %d %d %p4cc", + scanout->width, scanout->height, &scanout->format); + continue; + } + + drm_info(client->dev, "splash: created dumb buffer %d %d %p4cc", + scanout->width, scanout->height, &scanout->format); + + modeset->fb =3D scanout->buffer->fb; + fb_count++; + } + + return (fb_count =3D=3D 0) ? -ENODEV : 0; +} + +static void drm_splash_free_scanout(struct drm_client_dev *client) +{ + struct drm_splash *splash =3D client_to_drm_splash(client); + int i; + + if (splash->n_scanout) { + for (i =3D 0; i < splash->n_scanout; i++) + drm_client_buffer_delete(splash->scanout[i].buffer); + + splash->n_scanout =3D 0; + kfree(splash->scanout); + splash->scanout =3D NULL; + } +} + +static int drm_splash_client_hotplug(struct drm_client_dev *client) +{ + struct drm_splash *splash =3D client_to_drm_splash(client); + int ret; + + guard(mutex)(&splash->hotplug_lock); + + /* The modesets that get a splash are defined at first hotplug event */ + if (splash->initialized) + return 0; + + ret =3D drm_splash_init_client(splash); + if (ret =3D=3D -ENODEV) { + drm_info(client->dev, "splash: no modeset found"); + return 0; + } else if (ret) { + drm_err(client->dev, + "splash: failed to init client: %d", ret); + return ret; + } + + /* Create the render thread, waken later */ + splash->thread =3D kthread_create(drm_splash_render_thread, + splash, "drm_splash_%s", + client->dev->unique); + if (IS_ERR(splash->thread)) { + ret =3D PTR_ERR(splash->thread); + drm_err(client->dev, "splash: failed to create render thread: %d", ret); + drm_splash_free_scanout(client); + return ret; + } + + if (IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_SRC_BMP)) + ret =3D drm_splash_fw_request_bmp(splash); + else if (IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_SRC_BGRT)) + ret =3D drm_splash_bgrt_load(splash); + else + ret =3D 0; + + if (ret) { + drm_err(client->dev, "splash: failed to kick image load: %d", ret); + kthread_stop(splash->thread); + drm_splash_free_scanout(client); + return ret; + } + + /* Wake the render thread to show initial contents */ + drm_splash_wake_render_thread(splash); + + splash->initialized =3D true; + + return 0; +} + +static int drm_splash_client_restore(struct drm_client_dev *client, bool f= orce) +{ + int ret; + + if (force) + ret =3D drm_client_modeset_commit_locked(client); + else + ret =3D drm_client_modeset_commit(client); + + return ret; +} + +static void drm_splash_client_unregister(struct drm_client_dev *client) +{ + struct drm_splash *splash =3D client_to_drm_splash(client); + + kthread_stop(splash->thread); + drm_splash_free_scanout(client); + drm_client_release(client); + + if (splash->data_release) + splash->data_release(splash->data_priv); +} + +static void drm_splash_client_free(struct drm_client_dev *client) +{ + struct drm_splash *splash =3D client_to_drm_splash(client); + struct drm_device *dev =3D client->dev; + + mutex_destroy(&splash->hotplug_lock); + kfree(splash); + + drm_dbg(dev, "Unregistered with drm splash"); +} + +static const struct drm_client_funcs drm_splash_client_funcs =3D { + .owner =3D THIS_MODULE, + .hotplug =3D drm_splash_client_hotplug, + .restore =3D drm_splash_client_restore, + .unregister =3D drm_splash_client_unregister, + .free =3D drm_splash_client_free, +}; + +/** + * drm_splash_register() - Register a drm device to drm_splash + * @dev: the drm device to register. + * @format: drm device preferred format. + */ +void drm_splash_register(struct drm_device *dev, + const struct drm_format_info *format) +{ + struct drm_splash *splash; + + splash =3D kzalloc(sizeof(*splash), GFP_KERNEL); + if (!splash) + goto err_warn; + + mutex_init(&splash->hotplug_lock); + spin_lock_init(&splash->data_lock); + + if (format && format->num_planes =3D=3D 1) + splash->preferred_format =3D format->format; + else + splash->preferred_format =3D DRM_FORMAT_RGB888; + + if (drm_client_init(dev, &splash->client, "drm_splash", + &drm_splash_client_funcs)) + goto err_free; + + drm_client_register(&splash->client); + drm_dbg(dev, "Registered with drm splash"); + + return; + +err_free: + kfree(splash); +err_warn: + drm_warn(dev, "Failed to register with drm splash"); +} --=20 2.52.0 From nobody Mon Feb 9 03:52:34 2026 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 577161898F8; Tue, 6 Jan 2026 14:26:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.13 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709573; cv=pass; b=VS3Y38ru6JPCz3KWkCPO3i4b4xihOFlVrIocmeGjkwTGsmSpAnplnGxaUTBbrFwfwT0UIBjt2BeuYKFbcxCMtaGcEGtrtzk63tX3XuMZieZ+cMF2t1qC4HQfsx3Uv40ePxFRMnZpakffBadIKI6wICKTWGLDVhm1gZzjJEgM9dA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709573; c=relaxed/simple; bh=0IYFBwj/1Tc94SMR8BBfztM14FE1yqGNpcH/ENSaQ1c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h6b0oMHMXogKon0uGGlpboS10YFrqDd1cZdaYxRR63axtkmtDKa+8XtssVjchIAwV8N/+MSkWfo3KBx8jZ6kdKczbDxRSkGqVmMt+9A29VlSYf85HjbdI8OCAdqkn3j2g8RTA0ZvBiaBXDoc9fJ+nQCDihaDbGkEUuKpJq7RyQE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=krE7LJU7; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=jquIUnvn; arc=pass smtp.client-ip=185.56.87.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="krE7LJU7"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="jquIUnvn" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-q36k.prod.antispam.mailspamprotection.com; s=arckey; t=1767709571; b=sFQGjhlIzp47y3QVKvRDKGWcf85f2aOktg1GV2Izs3wzRtSBhIfG1cA2HsXtelBr0BlOrOQOuc h27yx4vDrvpDAvBFN8GBtX9Pos90/1Tx4rNJyThqMVq9HAMFL4G0I1FXiQle/AE8DYnA4vRwJh t7pyrJKucvRMXE1BOkNDyXcPyIkYrNN/vizF1bu5fChNYwya4ORLBj0I97wnDOx5puQKGnbG7D X/bczLcIRIo/yoY5MPJij4ShXAZY1SV3cpoStTDIyu9AQhwCsGv5YnvSrThd0sYWdaxCpiYXV6 0ZHP8013qCuhzdT7AqyKQ024R+Dt8oZ3Ma00Cc9ALWc5XQ==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-q36k.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-q36k.prod.antispam.mailspamprotection.com; s=arckey; t=1767709571; bh=0IYFBwj/1Tc94SMR8BBfztM14FE1yqGNpcH/ENSaQ1c=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=zKFZYVO3poVnQDNejCC50igKKaCDd9kBVrA7ODSgKmn2dJRUDrx2/mhUBEuOSO+ABBLzCnArOR is3K0cJC4nIwrsd23mc4fbZgc5Mn2k3CCodpemPUOLcnK9H4U9jNKfBC48dFS/0Lb6eo749Adp gmtqnvI0/2M6alipY8g4spOYsLIYVDy3Qys5bV5otIZlu4r0qW40ZNBP3XaX66Zic0Ld3Pmmyu PQHvhjQJzNUHBZF8wxnUQChzUT8AQimkhOxMJ387VIuimBcKpF6UE/YhldqK3mF5bkGC2XGpMu vy9hnxvAv6Uoz0+bNTEkt+NI5oliFe5TTwypGq5rsdfzMA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=wiIHoTKpqez2GTpzlzsY8o+kb8sgJMLZXwtewGty5hM=; b=krE7LJU7LNakqPT3XkL1ON99Nc 8dy/qqvZP1IzLO3m2y8T+rPPE+yZPF/BfgLV+lFrV4JI7/mg10M5NcOTWJMkMrTf3cs2m52Ky6oLu 6892SCoxKFQFuOpHydHPn5uDCL0y9cXnBFhJHD25NLfq4xwCQqxDZYeNctEGk37ly5wo=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-q36k.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80W-00000007JlC-46z4; Tue, 06 Jan 2026 14:26:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=wiIHoTKpqez2GTpzlzsY8o+kb8sgJMLZXwtewGty5hM=; b=jquIUnvnh807JgCtpiNwojuMa6 CbnE88N3AOndu1b8mbrmryg/EcwUoOmLuA67FsmAP2hHlEpvvyiyVuEFp5ohWGbqC+6H+a+k9w5Xu RpTLqcXIU2bEeSHfh3Kc8+OwRuLagbH+978ZpgYCbp50+niM4ZKaRvpTLkNc2EIQ0Ezg=; Received: from [95.248.141.113] (port=61315 helo=[192.168.178.65]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80Q-00000000MvX-0eas; Tue, 06 Jan 2026 14:25:54 +0000 From: Francesco Valla Date: Tue, 06 Jan 2026 15:25:41 +0100 Subject: [PATCH RFC v2 2/3] MAINTAINERS: add entry for DRM splash client Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260106-drm_client_splash-v2-2-6e86a7434b59@valla.it> References: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> In-Reply-To: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jonathan Corbet , Jocelyn Falempe , Javier Martinez Canillas Cc: Sam Ravnborg , Mario Limonciello , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=845; i=francesco@valla.it; h=from:subject:message-id; bh=0IYFBwj/1Tc94SMR8BBfztM14FE1yqGNpcH/ENSaQ1c=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJmx0gWmrCpurisy4upDdth3XxK8LZ3yg7NQP6/C1d79J hdL4a2OUhYGMS4GWTFFlpB1N+7tmWv+LW0D4yOYOaxMIEMYuDgFYCLRexkZlkbdds9RTr17hVnA oD9lWd28/VLPpzzwuWSSd2i2qK/nO4Z/1s8Yrh/hP2g+dUGjXaxk3JOX2nzLK+sy+6IUOLlMc4Q YAA== X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: 0e1ea53b869b0fd5d173713231c2b2dc AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vd80W-00000007JlC-46z4-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-q36k.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Add myself as maintainer for the DRM splash client. Signed-off-by: Francesco Valla --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a0dd762f5648b7e4e6fc62560662e43720422e01..35032cd6fddf4828906ca30924c= 5322949551ddf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8758,6 +8758,13 @@ T: git https://gitlab.freedesktop.org/drm/misc/kerne= l.git F: drivers/gpu/drm/drm_privacy_screen* F: include/drm/drm_privacy_screen* =20 +DRM SPLASH +M: Francesco Valla +L: dri-devel@lists.freedesktop.org +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: drivers/gpu/drm/clients/drm_splash.c + DRM TTM SUBSYSTEM M: Christian Koenig M: Huang Rui --=20 2.52.0 From nobody Mon Feb 9 03:52:34 2026 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 836DF29E101; Tue, 6 Jan 2026 14:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.1 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709989; cv=pass; b=gFeQypM6QTebVsu6M2LGWOlbfw//nroSJR6r03tanZluWmgt2s4ih8pnKMfIGCaA5rDtstXbfhL2paD+fF71oItapHcoQ2hu/BSEgO4CdTR4ds+2bqtbvK8GFfKTa6HVwK38rEhEGOAzo+1xgBibaFEltrcdmYlOaOjFmJVeNlo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767709989; c=relaxed/simple; bh=IAwJRtP6e6Uok6TXGFtjo0psvVmWxfzfjk894Ekbkgk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qA7vNhjM1Yvi6UAxr9egu8sGJVWdOVSD+go9oB2xPlYMZmXEG2/dnr/LujGxkifU9LDquQFIRZ3/T1D73Sk6CQeU3g8kEt/7iQBXFuAoyNC08cYa6dxnTrdWcVxPXmCsZQBGuuCIIbzi5Dl4DCZiNsFTlHF1I4sFtNe75DjO4Hw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=jNJPbdZM; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=X8DKm7NV; arc=pass smtp.client-ip=185.56.87.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="jNJPbdZM"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="X8DKm7NV" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-rv86.prod.antispam.mailspamprotection.com; s=arckey; t=1767709987; b=CQ0BQyFOB/jEd2oKqcsdlw/KYyTCGP9LJgbfhpnA05dbmWlDOoMjvxf3gtjFxaTqlLEeapkCfw h8BgrWQSXHD202gEG5/U6S1RDObMm76QV9DqawaVW9KYEMqBKiq34/ORNOrkeF2i9gDtAI1UPq jTSs+9QqzLGpNHtT6gP5ECZgaPVKpwqUQFb2Y4OejoBNqcI9ujQWumC8XpiGjzmYA5e447ogZO Z95ZsVT6QChi//GfNzvabxpukh48NiDYfp3QaO5KckDUr+LMfSEB6DGPy9kOvc6C5aD2CnIcmD VGpwo0ozsiyezx+9zpyzQer5fkaRpYe2AdG13zxkCBZVHg==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-rv86.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-rv86.prod.antispam.mailspamprotection.com; s=arckey; t=1767709987; bh=IAwJRtP6e6Uok6TXGFtjo0psvVmWxfzfjk894Ekbkgk=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=pqHBc2qdnV408IV+Bq7r1k6893wg9jVV+W8Jy/lrEmym3JLOS1Oco3tQHkJgTlDE653mCRSywA 8TYwcbQ6Ng16cGotv0RL8wR4nbj6EtvoOfaSaOX2axUf+j1sp1OIcWWJr/8npHyuQHOa0JI3AI uI9HZwuTHuUmrxxpWE75Yl3E6zqUIoHpimihsrxuLkza67DyV6gYdFiJfXK4W6jM+io31j8PP6 sSjZqJOngfw3WkyYrEcgXjMeW1InpCXYMGvGe1jGcBwzrnWxpeovYlVRYc+VAEvmyadWE741/O abER0b2/raHSrxxVerf22K/665UcssfXQfb83KYNGahmRQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=DfKGtrGKPa3faWLHh9s5lvGkj1UBCJYGSw0oOVidCkA=; b=jNJPbdZMSApGkNtA1id3RK8qHw QN3VC6lR7CiuousgoxvISDydH2dSoCdBVfFJqwCyYfREazdvXm0doH1k74U+WBBmcc+nA0KIHfMvr LoJt5e1WLdB9aOpl12eY5rzxAxq8VoqLu/vUcUH29ihGgM/1P0/MqsCnwcfkZWQFpO6w=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-rv86.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80X-000000092dR-18Ge; Tue, 06 Jan 2026 14:26:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=DfKGtrGKPa3faWLHh9s5lvGkj1UBCJYGSw0oOVidCkA=; b=X8DKm7NV+9b2ecTeAkwSCIeOFM bN+lnqT25kLjdj7zBjEJpPS6d7QsH/dKOrALH6IS0enDINpVBTi0JFeg3nHNk1NJqYZTRf64dpe7k 7i6K5OMneVpjVgxt6QcU3UXTkF45yd35TKxj664aGtlLWdopO2BcyT93Y5jbDG/WlVIs=; Received: from [95.248.141.113] (port=61315 helo=[192.168.178.65]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vd80Q-00000000MvX-3A1v; Tue, 06 Jan 2026 14:25:54 +0000 From: Francesco Valla Date: Tue, 06 Jan 2026 15:25:42 +0100 Subject: [PATCH RFC v2 3/3] drm: docs: remove bootsplash from TODO Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260106-drm_client_splash-v2-3-6e86a7434b59@valla.it> References: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> In-Reply-To: <20260106-drm_client_splash-v2-0-6e86a7434b59@valla.it> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jonathan Corbet , Jocelyn Falempe , Javier Martinez Canillas Cc: Sam Ravnborg , Mario Limonciello , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1227; i=francesco@valla.it; h=from:subject:message-id; bh=IAwJRtP6e6Uok6TXGFtjo0psvVmWxfzfjk894Ekbkgk=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJmx0gXmUTertpzR2dZ+eW365IkmL11kct489H+6uy/w0 LPKwsmHO0pZGMS4GGTFFFlC1t24t2eu+be0DYyPYOawMoEMYeDiFICJrPJjZHjeevb4/au3buf3 7n65r44jj1+ucYK9ifiUbSf4nt/+/KeGkaFBZfl6/7eRrH+vn3r9dnvjpZbdz/aKC2p6ZtxnK4l W+sIGAA== X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: e0e33038253e151e17425215167e02a2 AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vd80X-000000092dR-18Ge-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-rv86.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Now that a splash client exists, remove the bootsplash task from the TODO list for the DRM subsystem. Signed-off-by: Francesco Valla --- Documentation/gpu/todo.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 9013ced318cb97d6895752d4cfe21c94d0000973..e32b303cca26fa284f795e30dab= 18cf9e9496a9e 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -754,23 +754,6 @@ See drivers/gpu/drm/amd/display/TODO for tasks. =20 Contact: Harry Wentland, Alex Deucher =20 -Bootsplash -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -There is support in place now for writing internal DRM clients making it -possible to pick up the bootsplash work that was rejected because it was w= ritten -for fbdev. - -- [v6,8/8] drm/client: Hack: Add bootsplash example - https://patchwork.freedesktop.org/patch/306579/ - -- [RFC PATCH v2 00/13] Kernel based bootsplash - https://lore.kernel.org/r/20171213194755.3409-1-mstaudt@suse.de - -Contact: Sam Ravnborg - -Level: Advanced - Brightness handling on devices with multiple internal panels =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.52.0