From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF54B4071E9 for ; Tue, 13 Oct 2026 09:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791883990; cv=none; b=VtqOk/UfZ44AXsVWYFUcZccsCRhQLhDVF7gAL3G1h7ZMJwZ0NYMRrBEzlj+ZBRXDPWSzJP6bSCRMKvbp/faTpN+89G+2ur5n6saP6uSh4JdlKQAqkvWhklcC0/FVcrVaQ0lDat34y0/tlAAym1wT5YWqDDPLzXPbxpbMDBeVOss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791883990; c=relaxed/simple; bh=XXCAheqEwWEeNXTk2daG4fV+KXtS4FyM/T+IAPa7GmE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HshjEI6UVFv0g31DiwODVJj6iPBBxXFwAv5QmhdpNbcm7zsw3b9Cx/F7kqH5i5I0ZhKh5BfM6SAtfJfvaevm4yQJ08yIQcYODK4Xnz0OEEFbXcUtLVKCby+N4la9DYA51eeZqGsQ74OXFRoDA7+xSCwUv2x9ScU3oTpOrpvsQWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CcZd1h3l; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CcZd1h3l" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-48b001cd92bso1563876f8f.2 for ; Tue, 13 Oct 2026 02:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791883983; x=1792488783; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=SnEkf+SshAJve0553z+hLZ8mY5sSHw5Ad0IiJvmX3q0=; b=CcZd1h3lVFQd+meUKFFn4V679jpUAQeDvPsMEZVdOdJLPK4kIj8g9iLAseVaVK4qgp zbqRxxApNTUfZIYLxESROJf8GQ5/OiucAy6cvtHIkD6xcVfnWDVPVaNEC63dh+iJxkMC gz3vYWqBT6AI3yEVCeuFkA2avZ5AqfuyHSDrt8kOmrcFFAQ2UtGy72RbAHy1EA4mFvFC OTKSNuooX6pzw8hExVIO1ZSR6gMHGIjSRoO2+SmFS1HXPqmdXuJlZp/53VFSaxs+tqnE 6JSgVG1LDFUurAWnYL9KH1P7yEFeZyzc0LMTiJEyigEaJ04uCNOFrwrs13SFUzuPkDJg 51rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791883983; x=1792488783; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SnEkf+SshAJve0553z+hLZ8mY5sSHw5Ad0IiJvmX3q0=; b=2VZcoKfxHSf6U0sUhTm//5NUR/4kRzZNm9JCcy8OnPyfYMkmPagz8/yrWXBSpbzDsY gDjBe+XgLyMRTkBY4U7NWrtrw69oFoV+huK45OwQtROLi3n1tz+6CSDi/oOQ0cGdgBi1 wHVWMG9ES5yJFj2OJSOQY2Mjr5z+GWyutYVaqG2KpVqMC9/mUdexP05vY3NOh8VaqLT0 0s0YIJr4yS3Lz7XUq/eoK1m6qo8+E61gxrOxFGsmFywz4e8pmPovZRrfk9FrGcxF4XSh /oKti6mvTHLFflrqMHjqyQzxdC/qB9mscMJcPS6Ic/VNJZ1ZHzi0uA3+npN2aMcWL+nd sKFg== X-Forwarded-Encrypted: i=1; AKwUvBzKPG+BBDasLmJnz7WOFuVN7HledWoCiwgttO3qIcXAf6e/1JyVU+RYDYvAAmwqoizmW+jeTjpjrNc1@vger.kernel.org X-Gm-Message-State: AFq9FYJ8ur/8WyzHYmYOxlYgtI9zr02DIls5Isgb48Tguf8zsgb4Ggv7 6x7r4EgwhALyCjJ5XHtcua9Uv2GGbxuqBRwKO8F6P5i7RMgzk9tntCwa X-Gm-Gg: AYBFou1xrK5dmza6OrtcI7Ua6UCTxlKqaaUI+/cz/L1B7nQ0PMCLO07WtaScHL9oCSZ vZgmj53k6mLe/daDd2N6lkRAKu2h88cnyWBcLiVAANMQaz6PCOZhsqltTGexkb8jZ7lsitp3x4/ Qx4wQKZ5vH0XcduOO6Cv/69fFj0lMaxsbj+cvu0hFSywJSHT0QiUgJqX2Ph3C+yfc9ZYhqXlrkX EoXboyo84C/EW5B7k7A31BR5QA0NxIWAAqyoHaQ+5mAr4JziUcJpdC98UM/XkqEY/eVcPU2YgOc UaXRMfg+IJJz8zcEJdCFRwKZEjJtOaoRL7sqC95nBVAqh7Gokt2Lsh2zvURJ/1ssUx61sR9Xlxz WhGJGg51L9D7wm4fto8JxlvV/Vc23FEZvI3ZlB6MF2fHlPUbhKYrbufdO69BBOvjuV/ws+OhL3H ciegvolvI0ELK3fKeLccBOpFqSNi7nS5se0ngMuawCe5Wtx+sXFc403XqYgNQXFHwlQjPFUN4WX 6Ek6WfdCww5S6LB/Er2YCh5 X-Received: by 2002:a5d:5f84:0:b0:48b:86:5563 with SMTP id ffacd0b85a97d-48dbaae6f0bmr22382083f8f.27.1791883982560; Tue, 13 Oct 2026 02:33:02 -0700 (PDT) Received: from ingenieria31.oficinasStQ.local ([79.112.15.218]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48de0bc4ec6sm3986774f8f.48.2026.10.13.02.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2026 02:33:02 -0700 (PDT) From: =?UTF-8?q?M=C3=A0xim=20Pedraza=20Padilla?= To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ard Biesheuvel , Jonathan Corbet Cc: Francesco Valla , Jani Nikula , Mario Limonciello , Javier Martinez Canillas , Jocelyn Falempe , Sam Ravnborg , Ilias Apalodimas , Shuah Khan , Randy Dunlap , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 06/13] dt-bindings: display: add a boot logo node under /chosen Date: Tue, 13 Oct 2026 11:32:36 +0200 Message-Id: <20261013093243.505776-7-maximpedraza@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20261013093243.505776-1-maximpedraza@gmail.com> References: <20261013093243.505776-1-maximpedraza@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 "boot-logo" node under /chosen. The node 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 an "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" counts degrees counter clockwise, as for panels, and 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 --- .../bindings/display/boot-logo.yaml | 151 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 152 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..bf4121f24f1b --- /dev/null +++ b/Documentation/devicetree/bindings/display/boot-logo.yaml @@ -0,0 +1,151 @@ +# 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 + - Màxim Pedraza Padilla + +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. + +properties: + $nodename: + const: logo + + compatible: + const: boot-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, so this is meant for small images; 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. + 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. + items: + - description: X displacement + minimum: -65535 + maximum: 65535 + - description: Y displacement + minimum: -65535 + maximum: 65535 + + rotation: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Rotation applied to the image before it is shown, in degrees counter + clockwise, as for the rotation property of panels. It turns the image + and not the screen, so a quarter turn swaps how much room the image + takes up, but logo-position and logo-offset stay in screen pixels + either way. + enum: [0, 90, 180, 270] + default: 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: + - 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: image = /incbin/("logo.bmp"); */ + 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 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