From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Marek Vasut" <marek.vasut@mailbox.org>,
<dri-devel@lists.freedesktop.org>,
"Laurentiu Palcu" <laurentiu.palcu@oss.nxp.com>
Cc: "Abel Vesa" <abelvesa@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Fabio Estevam" <festevam@gmail.com>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Liu Ying" <victor.liu@nxp.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Peng Fan" <peng.fan@nxp.com>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Rob Herring" <robh@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
<devicetree@vger.kernel.org>, <imx@lists.linux.dev>,
<linux-arm-kernel@lists.infradead.org>,
<linux-clk@vger.kernel.org>
Subject: Re: [PATCH v2] drm/bridge: fsl-ldb: Parse register offsets from DT
Date: Mon, 03 Nov 2025 16:55:30 +0100 [thread overview]
Message-ID: <DDZ6KCUVYB55.330X4X5ETRXR3@bootlin.com> (raw)
In-Reply-To: <20251102170257.65491-1-marek.vasut@mailbox.org>
Hello Marek,
+Laurentiu Palcu
On Sun Nov 2, 2025 at 6:02 PM CET, Marek Vasut wrote:
> The DT binding for this bridge describe register offsets for the LDB,
> parse the register offsets from DT instead of hard-coding them in the
> driver. No functional change.
>
> Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
I was initially a bit skeptical because normally register offsets are
derived from the compatible string, not from device tree. But then I
realized this is about the LDB which has its two registers in the
MEDIA_BLK. This means all in all this looks somewhat like an integration
aspect (the LDB component uses two resources of the MEDIA_CLK component)
and your patch mekse sense.
So my only remark is that the above may be in the commit message, to make
the "why" clear from the beginning. It took a bit of research for me to
find out.
Laurentiu's patch adding i.MX94 support will conflict with this
one. Whichever gets applied after the other will have to be adapted
accordingly.
[0] https://lore.kernel.org/dri-devel/20251103-dcif-upstreaming-v6-3-76fcecfda919@oss.nxp.com/
> @@ -309,6 +302,27 @@ static int fsl_ldb_probe(struct platform_device *pdev)
> fsl_ldb->dev = &pdev->dev;
> fsl_ldb->bridge.of_node = dev->of_node;
>
> + /* No "reg-names" property likely means single-register LDB */
Uh? If it is "likely" it means we are not sure this code is not introducing
regressions, and that would be bad.
> + idx = of_property_match_string(dev->of_node, "reg-names", "ldb");
> + if (idx < 0) {
> + fsl_ldb->single_ctrl_reg = true;
> + idx = 0;
> + }
From the bindings I understand that having two 'reg' values and no
'reg-names' at all is legal. Your patch implies differently. Who's right
here?
> + ret = of_property_read_reg(dev->of_node, idx, &fsl_ldb->ldb_ctrl, NULL);
> + if (ret)
> + return ret;
> +
> + if (!fsl_ldb->single_ctrl_reg) {
> + idx = of_property_match_string(dev->of_node, "reg-names", "lvds");
> + if (idx < 0)
> + return idx;
> +
> + ret = of_property_read_reg(dev->of_node, idx, &fsl_ldb->lvds_ctrl, NULL);
> + if (ret)
> + return ret;
> + }
> +
Best regards,
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-11-03 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-02 17:02 [PATCH v2] drm/bridge: fsl-ldb: Parse register offsets from DT Marek Vasut
2025-11-03 15:55 ` Luca Ceresoli [this message]
2025-11-03 23:08 ` Marek Vasut
2025-11-05 18:03 ` Luca Ceresoli
2026-01-04 21:39 ` Marek Vasut
2025-11-04 2:39 ` Liu Ying
2025-11-04 3:13 ` Marek Vasut
2025-11-04 5:37 ` Liu Ying
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=DDZ6KCUVYB55.330X4X5ETRXR3@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=abelvesa@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=marek.vasut@mailbox.org \
--cc=peng.fan@nxp.com \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
/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