From: Max Pedraza <maximpedraza@gmail.com>
To: Helge Deller <deller@gmx.de>,
Thomas Zimmermann <tzimmermann@suse.de>,
Simona Vetter <simona@ffwll.ch>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Ripard <mripard@kernel.org>
Cc: linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Max Pedraza <maximpedraza@gmail.com>
Subject: [PATCH v3 5/7] dt-bindings: display: allow the boot logo in a reserved memory region
Date: Wed, 23 Sep 2026 22:10:33 +0200 [thread overview]
Message-ID: <20260923201035.51007-6-maximpedraza@gmail.com> (raw)
In-Reply-To: <20260923201035.51007-1-maximpedraza@gmail.com>
Carrying the image in the device tree ties it to the device tree, but the
image and where it goes on screen are independent axes of variation. One
board sold to several customers wants several device trees that differ in
the logo; one customer with several products built on that board wants the
same logo placed differently on each panel. The second case would otherwise
mean duplicating the same image into every device tree.
Let the node point at a reserved memory region filled in by the bootloader
instead, so one image can be shared by device trees that differ only in
placement. The region starts with a small header carrying a magic number
and the geometry, so the kernel can tell a logo from an empty or stale
region and bounds check everything against the reservation.
A phandle to a declared region is used rather than a bare address: the
reservation is what makes the memory safe to read and what gives the kernel
a size to validate against.
The two ways of supplying the image are mutually exclusive, which is what
the oneOf introduced here says. Until now the image properties were simply
required, since they were the only way to supply one.
Signed-off-by: Max Pedraza <maximpedraza@gmail.com>
---
.../bindings/display/boot-logo-clut224.yaml | 40 +++++++++++++++----
1 file changed, 33 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/boot-logo-clut224.yaml b/Documentation/devicetree/bindings/display/boot-logo-clut224.yaml
index 9dc3471763..a71fc09a7c 100644
--- a/Documentation/devicetree/bindings/display/boot-logo-clut224.yaml
+++ b/Documentation/devicetree/bindings/display/boot-logo-clut224.yaml
@@ -62,12 +62,31 @@ properties:
index into the colour lookup table. The property length must be equal to
width multiplied by height.
+ memory-region:
+ maxItems: 1
+ description: |
+ Reserved memory region holding the logo, as an alternative to carrying
+ it in the width, height, clut and data properties. The bootloader is
+ expected to have placed the image there before starting the kernel.
+
+ This lets one image be shared by several device trees that differ only
+ in where the logo goes, which is what a family of products built on the
+ same board but with different panels needs.
+
+ The region starts with a header of four little endian 32 bit words:
+ the magic number 0x4f474f4c ("LOGO"), the width, the height and the
+ number of palette entries. The palette follows, as consecutive red,
+ green and blue bytes per entry, and then one byte per pixel, each an
+ index into that palette.
+
logo-position:
$ref: /schemas/types.yaml#/definitions/int32-array
description:
- X and Y coordinates, in pixels, of the top left corner of the logo.
- A value of -1 on an axis centres the logo on that axis instead.
- Defaults to the top left corner of the screen.
+ X and Y coordinates, in screen pixels, of the top left corner of the
+ logo once it has been rotated. A value of -1 on an axis centres the
+ logo on that axis instead, which is the only way to say it when the
+ logo size is not known to the device tree, as is the case for the
+ memory-region form. Defaults to the top left corner of the screen.
items:
- description: X coordinate, or -1 to centre horizontally
minimum: -1
@@ -103,10 +122,17 @@ properties:
required:
- compatible
- - width
- - height
- - clut
- - data
+
+# The image either lives in the device tree or in a reserved memory region,
+# never both.
+oneOf:
+ - required:
+ - width
+ - height
+ - clut
+ - data
+ - required:
+ - memory-region
additionalProperties: false
--
2.39.5
next prev parent reply other threads:[~2026-09-23 20:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 20:10 [PATCH v3 0/7] Boot logo supplied by the device tree Max Pedraza
2026-09-23 20:10 ` [PATCH v3 1/7] fbdev: describe where the boot logo goes in one place Max Pedraza
2026-09-24 12:05 ` Thomas Zimmermann
2026-09-23 20:10 ` [PATCH v3 2/7] dt-bindings: display: add a device tree supplied boot logo Max Pedraza
2026-09-24 11:49 ` Rob Herring (Arm)
2026-09-23 20:10 ` [PATCH v3 3/7] video: logo: allow the boot logo to come from the device tree Max Pedraza
2026-09-23 20:10 ` [PATCH v3 4/7] fbdev: honour the device tree boot logo placement properties Max Pedraza
2026-09-23 20:10 ` Max Pedraza [this message]
2026-09-23 20:10 ` [PATCH v3 6/7] video: logo: allow the boot logo to come from a reserved memory region Max Pedraza
2026-09-23 20:10 ` [PATCH v3 7/7] video: logo: add ppmtodtlogo host tool Max Pedraza
2026-09-24 12:21 ` [PATCH v3 0/7] Boot logo supplied by the device tree Thomas Zimmermann
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=20260923201035.51007-6-maximpedraza@gmail.com \
--to=maximpedraza@gmail.com \
--cc=conor+dt@kernel.org \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk+dt@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=robh@kernel.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
all inboxes | Powered by JetHome®