Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Fabio Estevam" <festevam@gmail.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH] arm64: dts: rockchip: Drop data-mapping from Engicam PX30 Core
Date: Mon, 27 Jul 2026 18:06:26 +0000	[thread overview]
Message-ID: <20260727180626.9F1C81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727175502.2585290-1-festevam@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

New issues:
- [High] Removing the `data-mapping` property causes a regression in the Rockchip LVDS controller, silently defaulting the PHY format to 18-bit VESA instead of 24-bit VESA.

Pre-existing issues:
- [High] The `px30_lvds_grf_config` function incorrectly passes a dynamic value as the mask to `regmap_update_bits`, preventing it from clearing format configuration bits.
--

--- Patch [1]: [PATCH] arm64: dts: rockchip: Drop data-mapping from Engicam PX30 Core ---
commit 9e01384e585886fe7dfe0bda8fec7f830eade509
Author: Fabio Estevam <festevam@gmail.com>

arm64: dts: rockchip: Drop data-mapping from Engicam PX30 Core

The commit removes the data-mapping property from the panel node to satisfy
the panel-simple DT schema. The commit message states this has no functional
effect because the DRM OF helpers translate the bus format, falling back to
the descriptor's format when the property is absent.

> diff --git a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-ctouch2-of10.dts b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-ctouch2-of10.dts
> index 47aa30505a42e..aa636ce45e3a9 100644
> --- a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-ctouch2-of10.dts
> +++ b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-ctouch2-of10.dts
> @@ -28,7 +28,6 @@ panel {
>  		compatible = "ampire,am-1280800n3tzqw-t00h";
>  		backlight = <&backlight>;
>  		power-supply = <&vcc3v3_lcd>;
> -		data-mapping = "vesa-24";

[Severity: High]
Does removing this property inadvertently break the host LVDS controller
configuration?

The commit message assumes only the panel-simple driver uses this property,
but the rockchip LVDS host controller driver bypasses the framework and
reads it directly from the remote panel device tree node:

drivers/gpu/drm/rockchip/rockchip_lvds.c:rockchip_lvds_bind() {
    ...
    if (of_property_read_string(remote, "data-mapping", &name))
        /* default set it as format vesa 18 */
        lvds->format = LVDS_VESA_18;
    ...
}

By removing the property, will this fallback to LVDS_VESA_18 be triggered,
causing a mismatch with the 24-bit VESA panel and corrupting the display
output?

[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the rockchip
LVDS driver's format configuration, I noticed a potential issue with how
the register bits are cleared:

drivers/gpu/drm/rockchip/rockchip_lvds.c:px30_lvds_grf_config() {
    ...
    return regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
                              PX30_LVDS_FORMAT(lvds->format),
                              PX30_LVDS_FORMAT(lvds->format));
}

Does this incorrectly pass the dynamic value PX30_LVDS_FORMAT(lvds->format)
as both the mask and the value?

Because regmap_update_bits() uses the mask argument to determine which
bits to clear in the lower 16 bits, passing the value as the mask means any
0-bits in the format will be 0 in the mask and ignored instead of cleared. 

If the bootloader left the format in a different state (e.g., LVDS_JEIDA_18),
will the kernel fail to clear the necessary bits to switch it to LVDS_VESA_24?

>  
>  		port {
>  			panel_in_lvds: endpoint {

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260727175502.2585290-1-festevam@gmail.com?part=1

      reply	other threads:[~2026-07-27 18:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 17:55 [PATCH] arm64: dts: rockchip: Drop data-mapping from Engicam PX30 Core Fabio Estevam
2026-07-27 18:06 ` sashiko-bot [this message]

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=20260727180626.9F1C81F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@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