From: sashiko-bot@kernel.org
To: "Màxim Pedraza Padilla" <maximpedraza@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, robh@kernel.org
Subject: Re: [PATCH RFC v4 06/13] dt-bindings: display: add a boot logo node under /chosen
Date: Fri, 02 Oct 2026 09:13:38 +0000 [thread overview]
Message-ID: <20261002091338.E12D61F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261001195847.141192-7-maximpedraza@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: display: boot-logo memory zeroing leads to spurious drm_err
--
commit 3ef097b6e764420e6247f9d9dcc28aba1f88538d
Author: Màxim Pedraza Padilla <maximpedraza@gmail.com>
dt-bindings: display: add a boot logo node under /chosen
Products built on the same board often differ only in branding. On UEFI
systems the firmware hands the operating system its boot logo through
the ACPI BGRT; a device tree system has no such table, so today the logo
is built into the kernel, and each product needs its own kernel image.
> diff --git a/Documentation/devicetree/bindings/display/boot-logo.yaml b/Documentation/devicetree/bindings/display/boot-logo.yaml
> new file mode 100644
> index 0000000000000..b540a04deb789
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/boot-logo.yaml
> @@ -0,0 +1,151 @@
[ ... ]
> + memory-region:
> + maxItems: 1
> + description: |
> + Reserved memory region the bootloader loaded the BMP file into, starting
> + at the beginning of the region. The BMP header says how much of the
> + region is image.
> +
> + This keeps the image out of the device tree, so that it can be changed
> + without rebuilding the device tree, for instance by loading it from a
> + partition of its own that userspace can update.
> +
> + Memory keeps its contents across a reset, and may even across a short
> + power cycle, so a bootloader that loads no image into the region has to
> + clear it: the operating system cannot tell a stale image from a fresh
> + one.
[Severity: Medium]
Does clearing the memory region result in the OS trying to parse zeroed memory?
If the bootloader follows this documentation and zeroes the memory region when
there is no image, the kernel will still parse the static /chosen/logo node and
map the memory region.
This causes drm_splash_bmp_to_scanout() in drivers/gpu/drm/clients/drm_splash.c
to read 0x0000 for the magic bytes:
bmp_id = get_unaligned_le16(&file_header->id);
if (bmp_id != BMP_FILE_MAGIC_ID) {
drm_err(client->dev, "splash: invalid BMP magic 0x%04X", bmp_id);
return -EINVAL;
}
Because of this, the kernel will emit a spurious error on every boot where no
splash is provided.
Would it be better for the bootloader to dynamically inject the /chosen/logo
node or the memory-region property only when an image is successfully loaded,
rather than relying on the OS to parse and reject zeroed memory?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001195847.141192-1-maximpedraza@gmail.com?part=6
next prev parent reply other threads:[~2026-10-02 9:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 19:58 [PATCH RFC v4 00/13] Add splash DRM client Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 01/13] drm/clients: Kconfig: indent DRM_CLIENT_DEFAULT with tabs Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 02/13] efi: bgrt: export the BGRT table and image size Màxim Pedraza Padilla
2026-10-02 7:44 ` Ard Biesheuvel
2026-10-02 9:37 ` Jani Nikula
2026-10-02 10:31 ` Màxim Pedraza Padilla
2026-10-02 10:43 ` Ard Biesheuvel
2026-10-01 19:58 ` [PATCH RFC v4 03/13] drm: client: add splash client Màxim Pedraza Padilla
2026-10-02 9:13 ` sashiko-bot
2026-10-02 9:41 ` Jani Nikula
2026-10-01 19:58 ` [PATCH RFC v4 04/13] MAINTAINERS: add entry for DRM " Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 05/13] drm: docs: remove bootsplash from TODO Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 06/13] dt-bindings: display: add a boot logo node under /chosen Màxim Pedraza Padilla
2026-10-02 9:13 ` sashiko-bot [this message]
2026-10-01 19:58 ` [PATCH RFC v4 07/13] drm/client: splash: add a device tree image source Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 08/13] drm/client: splash: place the device tree image where it asks Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 09/13] drm/client: splash: turn the device tree image as " Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 10/13] drm/client: splash: take the background colour from the image source Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 11/13] drm/client: splash: turn the BGRT image on panels mounted turned Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 12/13] drm/client: splash: prefer what the command line asks for Màxim Pedraza Padilla
2026-10-01 19:58 ` [PATCH RFC v4 13/13] drm/client: splash: document the image sources and parameters Màxim Pedraza Padilla
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=20261002091338.E12D61F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=maximpedraza@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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