From: "Màxim Pedraza Padilla" <maximpedraza@gmail.com>
To: 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>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Helge Deller <deller@gmx.de>,
Peter Jones <pjones@redhat.com>
Cc: Francesco Valla <francesco@valla.it>,
Jani Nikula <jani.nikula@linux.intel.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Jocelyn Falempe <jfalempe@redhat.com>,
Sam Ravnborg <sam@ravnborg.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-efi@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v6 07/15] dt-bindings: display: add a boot logo node under /chosen
Date: Tue, 27 Oct 2026 14:53:34 +0100 [thread overview]
Message-ID: <20261027135342.2003632-8-maximpedraza@gmail.com> (raw)
In-Reply-To: <20261027135342.2003632-1-maximpedraza@gmail.com>
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.
With U-Boot's Falcon mode the device tree is the only thing that reaches
the kernel, so it is also the only place the logo can come from.
Add a "logo" node, compatible "boot-logo", under /chosen. It lives
there because a logo is configuration handed over by firmware rather
than a description of the hardware, as simple-framebuffer nodes already
are.
The image is a BMP with 24 bits per pixel and no compression, the
format of the BGRT image, so that one file serves the firmware splash,
a BMP loaded as firmware and this node alike. It is carried either in
a "logo-image" property, which dtc fills in from the file with /incbin/,
or in a reserved memory region the bootloader loaded it into, named by
"memory-region". Exactly one of the two must be present.
"logo-position" takes -1 on an axis to mean centre on that axis, which
is the only way to say it when the device tree does not know the image
size, and "logo-offset" is added afterwards. "rotation" is the one of
panel-common.yaml, degrees counter clockwise, but turns the image rather
than the screen, so position and offset stay in screen pixels. The
optional "background-color" goes with the image, since a logo designed
for one background looks wrong on another.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Màxim Pedraza Padilla <maximpedraza@gmail.com>
---
.../bindings/display/boot-logo.yaml | 156 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 157 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/boot-logo.yaml
diff --git a/Documentation/devicetree/bindings/display/boot-logo.yaml b/Documentation/devicetree/bindings/display/boot-logo.yaml
new file mode 100644
index 000000000000..9cd4b2565112
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/boot-logo.yaml
@@ -0,0 +1,156 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/boot-logo.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Boot logo supplied by the device tree
+
+maintainers:
+ - Francesco Valla <francesco@valla.it>
+ - Màxim Pedraza Padilla <maximpedraza@gmail.com>
+
+description: |
+ An image for the operating system to show on the display while it boots,
+ handed over by the firmware together with where and how to show it.
+
+ Products built on the same board often differ only in branding. Carrying
+ the logo in the device tree lets a single kernel image serve all of them,
+ each booting with its own device tree, and it works where the device tree
+ is the only thing that reaches the kernel, as with U-Boot's Falcon mode.
+ It plays the part the ACPI BGRT plays on UEFI systems.
+
+ Since a logo is configuration rather than a description of the hardware,
+ the node lives under /chosen, next to the other things firmware hands to
+ the operating system.
+
+ The image is a BMP file with a 40 byte BITMAPINFOHEADER, 24 bits per pixel
+ and no compression, the format of the BGRT image. It is carried either in
+ the node itself or in a reserved memory region the bootloader loaded it
+ into, never both.
+
+allOf:
+ - $ref: panel/panel-common.yaml#
+
+properties:
+ $nodename:
+ const: logo
+
+ compatible:
+ const: boot-logo
+
+ logo-image:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ description:
+ The BMP file itself, byte for byte, which dtc can fill in from the file
+ with /incbin/. The device tree stays in memory for as long as the
+ system runs, and some architectures limit its size (arm64 to 2 MB), so
+ this is meant for small images; at three bytes per pixel, larger ones
+ belong in a reserved memory region.
+
+ 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, and the operating system cannot tell a stale image from a
+ fresh one. A bootloader that loads no image into the region therefore
+ disables the node (status = "disabled") or removes it.
+
+ logo-position:
+ $ref: /schemas/types.yaml#/definitions/int32-array
+ description:
+ X and Y coordinates, in screen pixels, of the top left corner of the
+ image once it has been rotated. A value of -1 on an axis centres the
+ image on that axis instead, which is the only way to say it when the
+ device tree does not know the image size, as with a memory region.
+ Defaults to centring on both axes.
+ default: [-1, -1]
+ items:
+ - description: X coordinate, or -1 to centre horizontally
+ minimum: -1
+ maximum: 65535
+ - description: Y coordinate, or -1 to centre vertically
+ minimum: -1
+ maximum: 65535
+
+ logo-offset:
+ $ref: /schemas/types.yaml#/definitions/int32-array
+ description:
+ X and Y displacement, in screen pixels, applied after the image has been
+ placed. Mostly useful together with a centred axis, to land the image
+ somewhere other than the middle of a panel whose visible area is not
+ the middle of the mode. Defaults to no displacement.
+ default: [0, 0]
+ items:
+ - description: X displacement
+ minimum: -65535
+ maximum: 65535
+ - description: Y displacement
+ minimum: -65535
+ maximum: 65535
+
+ rotation:
+ description:
+ Rotation applied to the image as the screen is seen, in degrees counter
+ clockwise, as for the rotation property of panels. It turns the image
+ and not the screen; a panel mounted turned is described by its own
+ rotation property, which is made up for first, so this means the same
+ whichever way the panel is mounted. A quarter turn swaps how much room
+ the image takes up, but logo-position and logo-offset stay in pixels of
+ the screen as seen either way. Defaults to 0.
+
+ background-color:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Colour of the rest of the screen, as 0xRRGGBB. When absent, the
+ operating system uses its own default.
+ maximum: 0xffffff
+
+required:
+ - compatible
+
+# The image lives either in the node or in a reserved memory region,
+# never both and never neither.
+oneOf:
+ - required:
+ - logo-image
+ - required:
+ - memory-region
+
+additionalProperties: false
+
+examples:
+ - |
+ // A 2x1 image, red and blue, centred and 120 pixels below the middle
+ / {
+ compatible = "foo";
+ model = "foo";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ chosen {
+ logo {
+ compatible = "boot-logo";
+ /* Normally: logo-image = /incbin/("logo.bmp"); */
+ logo-image = /bits/ 8 <0x42 0x4d 0x3e 0x00 0x00 0x00 0x00 0x00
+ 0x00 0x00 0x36 0x00 0x00 0x00 0x28 0x00
+ 0x00 0x00 0x02 0x00 0x00 0x00 0x01 0x00
+ 0x00 0x00 0x01 0x00 0x18 0x00 0x00 0x00
+ 0x00 0x00 0x08 0x00 0x00 0x00 0x13 0x0b
+ 0x00 0x00 0x13 0x0b 0x00 0x00 0x00 0x00
+ 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
+ 0xff 0xff 0x00 0x00 0x00 0x00>;
+ logo-position = <(-1) (-1)>;
+ logo-offset = <0 120>;
+ background-color = <0x1e1e28>;
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 321ecb9f5b5b..0d1decaedde0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9174,6 +9174,7 @@ M: Màxim Pedraza Padilla <maximpedraza@gmail.com>
L: dri-devel@lists.freedesktop.org
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
+F: Documentation/devicetree/bindings/display/boot-logo.yaml
F: drivers/gpu/drm/clients/drm_splash.c
DRM TTM SUBSYSTEM
--
2.39.5
next prev parent reply other threads:[~2026-10-27 13:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 13:53 [PATCH v6 00/15] Add splash DRM client Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 01/15] drm/clients: Kconfig: indent DRM_CLIENT_DEFAULT with tabs Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 02/15] efi: bgrt: add accessors for the boot graphics Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 03/15] fbdev: efifb: move the BMP headers to <video/bmp.h> Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 04/15] drm: client: add splash client Màxim Pedraza Padilla
2026-10-27 14:19 ` sashiko-bot
2026-10-27 13:53 ` [PATCH v6 05/15] MAINTAINERS: add entry for DRM " Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 06/15] drm: docs: remove bootsplash from TODO Màxim Pedraza Padilla
2026-10-27 13:53 ` Màxim Pedraza Padilla [this message]
2026-10-27 18:59 ` [PATCH v6 07/15] dt-bindings: display: add a boot logo node under /chosen Rob Herring (Arm)
2026-10-27 13:53 ` [PATCH v6 08/15] drm/client: splash: pick the image source in one place Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 09/15] drm/client: splash: add a device tree image source Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 10/15] drm/client: splash: place the device tree image where it asks Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 11/15] drm/client: splash: turn the device tree image as " Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 12/15] drm/client: splash: take the background colour from the image source Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 13/15] drm/client: splash: turn the BGRT image on panels mounted turned Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 14/15] drm/client: splash: follow the connector's orientation Màxim Pedraza Padilla
2026-10-27 13:53 ` [PATCH v6 15/15] drm/client: splash: document the image sources 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=20261027135342.2003632-8-maximpedraza@gmail.com \
--to=maximpedraza@gmail.com \
--cc=airlied@gmail.com \
--cc=ardb@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=francesco@valla.it \
--cc=ilias.apalodimas@linaro.org \
--cc=jani.nikula@linux.intel.com \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-fbdev@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=pjones@redhat.com \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.