From: Francesco Valla <francesco@valla.it>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
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: Tue, 6 Jan 2026 21:22:13 +0100 [thread overview]
Message-ID: <aV1u9QBxfWyDcqKB@bywater> (raw)
In-Reply-To: <CAMuHMdUtsx1gQffk9c-U9UkeqG_Dopv5vXNrp72ewh0EQQgwjQ@mail.gmail.com>
Hi Geert,
On Tue, Jan 06, 2026 at 03:47:49PM +0100, Geert Uytterhoeven wrote:
> Hi Franceso,
>
> On Tue, 6 Jan 2026 at 15:26, Francesco Valla <francesco@valla.it> 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>
>
> Thanks for your patch!
>
> > --- /dev/null
> > +++ b/drivers/gpu/drm/clients/drm_splash.c
>
> > +#if IS_ENABLED(CONFIG_DRM_CLIENT_SPLASH_BMP_SUPPORT)
>
> There is no need to protect this block with #if, as it does not generate
> any code.
>
This was left here when I moved some code along - I'll remove the
guards.
> > +#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
>
> As per [1], all these values are little-endian. Hence they should
> be declared as such using le16 or le32, and accessed using
> get_unalined_le{16,32}().
>
> [1] https://en.wikipedia.org/wiki/BMP_file_format#File_structure
>
This is obviously right, I'll use proper accessors in next version.
I wonder why this is done precisely this way inside the efifb driver,
but that's maybe because all EFI platforms are little-endian?
> Gr{oetje,eeting}s,
>
> Geert
>
Thank you!
Reagrds,
Francesco
next prev parent reply other threads:[~2026-01-06 20:22 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 [this message]
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
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=aV1u9QBxfWyDcqKB@bywater \
--to=francesco@valla.it \
--cc=airlied@gmail.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.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