From: Marek Vasut <marek.vasut@mailbox.org>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>,
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: Sun, 4 Jan 2026 22:39:00 +0100 [thread overview]
Message-ID: <11e63b0a-57fe-40ce-b211-e502e8e20329@mailbox.org> (raw)
In-Reply-To: <DE0YJPERKME9.2CYGFAPULFMZV@bootlin.com>
On 11/5/25 7:03 PM, Luca Ceresoli wrote:
Hello Luca,
sorry for the late reply.
>>> 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.
>>
>> Actually, the LDB was always meant to parse the 'reg' offsets out of the
>> DT, it then went somewhat ... wrong ... and we ended up with hard-coded
>> reg<->compatible mapping. It was never intended to be that way. That is
>> all there is to it, there isn't any deeper reason behind it.
>>
>> What would you add into the commit message ?
>
> The above paragraph is a good draft of what I woudl add.
>
>>> [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.
>>
>> I can drop the 'likely' part.
>
> If you are sure it's not "likely" but "sure", then OK. However it all
> depends on the bindings, which leads to the below question.
Fixed in V3
>>>> + 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?
>> I think if you have two two reg values, you should have reg-names , so
>> the binding should be updated ?
>
> If the bindings are unclear or ambiguous (or wrong) then they should be
> fixed in the first place. With bad bindings we can either have a bad but
> compliant implementation or a good but non-compliant implementation.
Binding update sent:
https://lore.kernel.org/dri-devel/20260104213457.128734-1-marek.vasut@mailbox.org/
next prev parent reply other threads:[~2026-01-04 21:40 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
2025-11-03 23:08 ` Marek Vasut
2025-11-05 18:03 ` Luca Ceresoli
2026-01-04 21:39 ` Marek Vasut [this message]
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=11e63b0a-57fe-40ce-b211-e502e8e20329@mailbox.org \
--to=marek.vasut@mailbox.org \
--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=luca.ceresoli@bootlin.com \
--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