public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Francesco Valla <francesco@valla.it>
To: Maxime Ripard <mripard@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonathan Corbet <corbet@lwn.net>,
	Jocelyn Falempe <jfalempe@redhat.com>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Mario Limonciello <mario.limonciello@amd.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org
Subject: Re: [PATCH RFC v2 1/3] drm: client: add splash client
Date: Fri, 23 Jan 2026 21:59:47 +0100	[thread overview]
Message-ID: <aXPhQ-KQOBobMBMh@bywater> (raw)
In-Reply-To: <20260122-scallop-of-original-domination-3a554a@houat>

Hi Maxime,

On Thu, Jan 22, 2026 at 02:36:56PM +0100, Maxime Ripard wrote:
> Hi,
> 
> On Tue, Jan 06, 2026 at 03:25:40PM +0100, Francesco Valla wrote:
> > 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=splash.
> > 
> > Signed-off-by: Francesco Valla <francesco@valla.it>
> > ---
> >  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/Kconfig
> > index 6096c623d9d5b1a3d4a40d986c45aad2f8277767..dd8cd6cacd1166932eb3890dd816b9ae2d26330f 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".
> >  
> > +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
> 
> I'm not sure we should consider it a xor choice. If we do, that means
> that it's effectively unusable by distros, since you don't know ahead of
> time if the platform it's going to boot on will have a BGRT or not.
> 
> Trying BGRT, and then falling back to either an image or a solid
> background would be easier to work with.
>

Thanks for the feedback!

Also considering that BGRT requires some logic to work properly, which
is not present in this version (and here I am referring mostly to the
rotation/positioning quirks), I think I'll go down this very route for
the next version and get rid of the function pointer logic.
The idea was to avoid ifdefs _and_ be open for future expansions, but
in the end it would probably look ugly.

> Maxime

Regards,
Francesco


  reply	other threads:[~2026-01-23 21:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 14:25 [PATCH RFC v2 0/3] Add splash DRM client Francesco Valla
2026-01-06 14:25 ` [PATCH RFC v2 1/3] drm: client: add splash client Francesco Valla
2026-01-06 14:47   ` Geert Uytterhoeven
2026-01-06 20:22     ` Francesco Valla
2026-01-06 18:58   ` Mario Limonciello (AMD) (kernel.org)
2026-01-06 20:32     ` Francesco Valla
2026-01-06 20:46       ` Mario Limonciello (AMD) (kernel.org)
2026-01-07  2:40         ` Mario Limonciello (AMD) (kernel.org)
2026-01-07 22:28           ` Francesco Valla
2026-01-22 13:36   ` Maxime Ripard
2026-01-23 20:59     ` Francesco Valla [this message]
2026-01-06 14:25 ` [PATCH RFC v2 2/3] MAINTAINERS: add entry for DRM " Francesco Valla
2026-01-06 14:25 ` [PATCH RFC v2 3/3] drm: docs: remove bootsplash from TODO Francesco Valla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aXPhQ-KQOBobMBMh@bywater \
    --to=francesco@valla.it \
    --cc=airlied@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=mripard@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox