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 <[email protected]>
> > ---
> >  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 via email to