From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Liu Ying" <victor.liu@nxp.com>, "Marek Vasut" <marex@denx.de>,
"Stefan Agner" <stefan@agner.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>, "Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Rob Herring" <robh@kernel.org>,
"Saravana Kannan" <saravanak@kernel.org>
Cc: "Kory Maincent (TI.com)" <kory.maincent@bootlin.com>,
"Hervé Codina" <herve.codina@bootlin.com>,
"Hui Pu" <Hui.Pu@gehealthcare.com>,
"Ian Ray" <ian.ray@gehealthcare.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
dri-devel@lists.freedesktop.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
"Adam Ford" <aford173@gmail.com>,
"Alexander Stein" <alexander.stein@ew.tq-group.com>,
"Anson Huang" <Anson.Huang@nxp.com>,
"Christopher Obbard" <christopher.obbard@linaro.org>,
"Daniel Scally" <dan.scally@ideasonboard.com>,
"Emanuele Ghidoli" <emanuele.ghidoli@toradex.com>,
"Fabio Estevam" <festevam@denx.de>,
"Francesco Dolcini" <francesco.dolcini@toradex.com>,
"Frieder Schrempf" <frieder.schrempf@kontron.de>,
"Gilles Talis" <gilles.talis@gmail.com>,
"Goran Rađenović" <goran.radni@gmail.com>,
"Heiko Schocher" <hs@denx.de>,
"Joao Paulo Goncalves" <joao.goncalves@toradex.com>,
"Josua Mayer" <josua@solid-run.com>,
"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
"Marco Felsch" <m.felsch@pengutronix.de>,
"Martyn Welch" <martyn.welch@collabora.com>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
"Peng Fan" <peng.fan@nxp.com>,
"Philippe Schenker" <philippe.schenker@toradex.com>,
"Richard Hu" <richard.hu@technexion.com>,
"Shengjiu Wang" <shengjiu.wang@nxp.com>,
"Stefan Eichenberger" <stefan.eichenberger@toradex.com>,
"Vitor Soares" <vitor.soares@toradex.com>
Subject: Re: [PATCH 7/8] drm/bridge: imx8mp-hdmi-tx: add an hdmi-connector when missing using a DT overlay at boot time
Date: Mon, 30 Mar 2026 17:47:23 +0200 [thread overview]
Message-ID: <DHG8G8FMXA6C.U6LU563OZ8NR@bootlin.com> (raw)
In-Reply-To: <5f06ea5a-5388-440f-91d6-cebb0bee0a88@nxp.com>
Hello Liu,
On Mon Mar 30, 2026 at 5:02 AM CEST, Liu Ying wrote:
>>>> --- a/drivers/gpu/drm/bridge/imx/Kconfig
>>>> +++ b/drivers/gpu/drm/bridge/imx/Kconfig
>>>> @@ -25,6 +25,23 @@ config DRM_IMX8MP_DW_HDMI_BRIDGE
>>>> Choose this to enable support for the internal HDMI encoder found
>>>> on the i.MX8MP SoC.
>>>>
>>>> +config DRM_IMX8MP_DW_HDMI_BRIDGE_CONNECTOR_FIXUP
>>>> + bool "Support device tree blobs without an hdmi-connector node"
>>>> + default y
>>>
>>> depends on DRM_IMX_LCDIF ?
>>
>> If the imx hdmi-tx is not enabled then HDMI won't work anyway, so users are
>> not affected and the overlay is not needed. Am I missing something?
>
> I meant I'm fine with "default y" and think that this could also depend on
> DRM_IMX_LCDIF, because no display controller driver other than the LCDIF
> driver needs the fixup.
Ah, I see your point. OK, I'll add 'depends on DRM_IMX_LCDIF'.
>>> I see build warnings(W=1):
>>> drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx-connector-fixup.dtso:25.8-37.4: Warning (unit_address_vs_reg): /fragment@0/__overlay__/soc@0: node has a unit name, but no reg or ranges property
>>> drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx-connector-fixup.dtso:26.16-36.5: Warning (unit_address_vs_reg): /fragment@0/__overlay__/soc@0/bus@32c00000: node has a unit name, but no reg or ranges property
>>> drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx-connector-fixup.dtso:27.18-35.6: Warning (unit_address_vs_reg): /fragment@0/__overlay__/soc@0/bus@32c00000/hdmi@32fd8000: node has a unit name, but no reg or ranges property
>>> drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx-connector-fixup.dtso:29.13-33.8: Warning (unit_address_vs_reg): /fragment@0/__overlay__/soc@0/bus@32c00000/hdmi@32fd8000/ports/port@1: node has a unit name, but no reg or ranges property
>>
>> AFAIK the device tree checkes just can't work on overlays. The tools just
>> cannot know on which base tree the overlay can be applied, so they cannot
>> know the existing properties. That might change in the future, but for now
>> my understanding is that it is OK to have overlays which produce such
>> harmless warnings, at least for driver-specific overlays like the tilcdc
>> one [0] which is already in linux-next since a few weeks.
>
> Hmm, not sure a few weeks in linux-next is long enough ;)
> I'd say, I saw the warnings, so simply reported along with a fix to suppress
> them. TBH, build warnings make me nervous, especially this DT overlay is
> under the "DRM DRIVERS FOR FREESCALE IMX BRIDGE" umbrella.
That's fine, I'll add the lines needed to suppress the warnings then.
>>>> + fixup-hdmi-connector {
>>>> + compatible = "hdmi-connector";
>>>> + label = "HDMI";
>>>> + type = "a";
>>>
>>> What if a board uses another type?
>>
>> For boards affected by this patch, currently the connector is created by
>> dw_hdmi_connector_create() which hardcodes type A [0], so there would be no
>> difference.
>
> Yes, that's from driver's PoV. However, userspace may get the type
> from /sys/firmware/devicetree/base/fixup-hdmi-connector/type and use it
> to do something.
I'd say this is incorrect, the device tree is not an API for that. The
connector type might be known to the driver by other means (ACPI, DP MST,
whatever). So I think this is a non-problem.
If userspace needs to know the connector type, that should come from the
ioctl (DRM_IOCTL_MODE_GETCONNECTOR perhaps).
> Maybe, that's trivial.
Not sure I got what you mean here, sorry. What are you referring to?
>> OTOH how can a common module know the specific connector?
>
> Hmm, maybe add a module parameter or let users set the type through Kconfig
I'm afraid none of this would work for distribution kernels, where who
configures the distribution has no idea on how many different hardware it
will run.
> or even define an unknown type to honestly tell users that we don't know it?
This sounds like a potentially valid idea, even though I'm not fully
convinced. Also I suspect it would be a pretty large change, and also
adding "unknown type" in the device tree seems not compliant with the rule
that DT describes the hardware (not the lack of info about the hardware).
But definitely it's not needed for this specific case, because:
* with current code, every imx8mp-hdmi-tx usage adds a type-A connector [0]
* with this patch the correct type will be created when described in DT,
and type-A will be used only as a fallback when the DT is lacking
So after the patch we'd do sometimes better, never worse in this respect.
Based on the above I'm sending v2 soon, but don't hesitate in following up
in case I may be missing something (this topic is tricky).
[0] https://elixir.bootlin.com/linux/v7.0-rc5/source/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c#L2601
>> Boards with a different connector should describe the connector in the
>> device tree, if they need to instantiate the exact type.
I think this is the only valid solution. It's very easy to do, nothing new
to invent.
Maybe on top of that we could add a warning when the overlay is applied,
e.g. "imx8mp-hdmi-tx used without a connector described in device tree;
adding a type A connector as a fallback; please add a valid description to
your device tree". Maybe pointing to a TODO entry in the documentation.
What do you think about this?
Thanks again for your careful review!
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-03-30 15:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 10:46 [PATCH 0/8] drm/mxsfb/lcdif: use DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Luca Ceresoli
2026-03-20 10:46 ` [PATCH 1/8] drm/mxsfb/lcdif: simplify remote pointer management using __free Luca Ceresoli
2026-03-20 11:11 ` Luca Ceresoli
2026-03-26 6:40 ` Liu Ying
2026-03-26 6:48 ` Liu Ying
2026-03-20 10:46 ` [PATCH 2/8] drm/mxsfb/lcdif: don't unnecessarily loop over ports Luca Ceresoli
2026-03-26 6:59 ` Liu Ying
2026-03-27 11:10 ` Luca Ceresoli
2026-03-20 10:46 ` [PATCH 3/8] drm/mxsfb/lcdif: use dev_err_probe() consistently in lcdif_attach_bridge Luca Ceresoli
2026-03-26 7:03 ` Liu Ying
2026-03-20 10:46 ` [PATCH 4/8] drm/bridge: dw-hdmi: document the output_port field Luca Ceresoli
2026-03-26 7:25 ` Liu Ying
2026-03-26 9:15 ` Damon Ding
2026-03-27 11:10 ` Luca Ceresoli
2026-03-30 1:13 ` Damon Ding
2026-03-30 15:10 ` Luca Ceresoli
2026-03-20 10:46 ` [PATCH 5/8] drm/bridge: dw-hdmi: warn on unsupported attach combination Luca Ceresoli
2026-03-26 7:35 ` Liu Ying
2026-03-20 10:46 ` [PATCH 6/8] drm/bridge: dw-hdmi: move next_bridge lookup to attach time Luca Ceresoli
2026-03-26 7:50 ` Liu Ying
2026-03-20 10:46 ` [PATCH 7/8] drm/bridge: imx8mp-hdmi-tx: add an hdmi-connector when missing using a DT overlay at boot time Luca Ceresoli
2026-03-26 8:15 ` Liu Ying
2026-03-27 14:46 ` Luca Ceresoli
2026-03-30 3:02 ` Liu Ying
2026-03-30 15:47 ` Luca Ceresoli [this message]
2026-03-31 3:03 ` Liu Ying
2026-03-31 10:54 ` Luca Ceresoli
2026-04-01 6:45 ` Liu Ying
2026-04-01 7:51 ` Luca Ceresoli
2026-03-26 8:28 ` Laurent Pinchart
2026-03-27 15:17 ` Luca Ceresoli
2026-03-20 10:46 ` [PATCH 8/8] drm/mxsfb/lcdif: use DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Luca Ceresoli
2026-03-26 8:24 ` Liu Ying
2026-03-23 8:46 ` [PATCH 0/8] " Alexander Stein
2026-03-26 17:13 ` Martyn Welch
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=DHG8G8FMXA6C.U6LU563OZ8NR@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Anson.Huang@nxp.com \
--cc=Frank.Li@nxp.com \
--cc=Hui.Pu@gehealthcare.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=andrzej.hajda@intel.com \
--cc=christopher.obbard@linaro.org \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emanuele.ghidoli@toradex.com \
--cc=festevam@denx.de \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=frieder.schrempf@kontron.de \
--cc=gilles.talis@gmail.com \
--cc=goran.radni@gmail.com \
--cc=herve.codina@bootlin.com \
--cc=hs@denx.de \
--cc=ian.ray@gehealthcare.com \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=joao.goncalves@toradex.com \
--cc=jonas@kwiboo.se \
--cc=josua@solid-run.com \
--cc=kernel@pengutronix.de \
--cc=kieran.bingham@ideasonboard.com \
--cc=kory.maincent@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=martyn.welch@collabora.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=o.rempel@pengutronix.de \
--cc=peng.fan@nxp.com \
--cc=philippe.schenker@toradex.com \
--cc=rfoss@kernel.org \
--cc=richard.hu@technexion.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=saravanak@kernel.org \
--cc=shengjiu.wang@nxp.com \
--cc=simona@ffwll.ch \
--cc=stefan.eichenberger@toradex.com \
--cc=stefan@agner.ch \
--cc=thomas.petazzoni@bootlin.com \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
--cc=vitor.soares@toradex.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