mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damon Ding <damon.ding@rock-chips.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>,
	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 4/8] drm/bridge: dw-hdmi: document the output_port field
Date: Mon, 30 Mar 2026 09:13:28 +0800	[thread overview]
Message-ID: <4396e94d-7b88-4599-a938-3c1932a2f9cb@rock-chips.com> (raw)
In-Reply-To: <DHDIOSVSDG9W.B7BW87297KT3@bootlin.com>

On 3/27/2026 7:10 PM, Luca Ceresoli wrote:
> Hello Damon,
> 
> On Thu Mar 26, 2026 at 10:15 AM CET, Damon Ding wrote:
>> On 3/26/2026 3:25 PM, Liu Ying wrote:
>>> Hi Luca,
>>>
>>> On Fri, Mar 20, 2026 at 11:46:15AM +0100, Luca Ceresoli wrote:
>>>> The meaning of this flag may not be obvious at first sight.
>>>>
>>>> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
>>>> ---
>>>>    include/drm/bridge/dw_hdmi.h | 5 +++++
>>>>    1 file changed, 5 insertions(+)
>>>>
>>
>> First of all, these changes related to the DW HDMI controller work well
>> when tested on RK3399 HDMI.
> 
> Great!
> 
> You'd be welcome to send your Tested-by: tag if you tested the series on
> hardware, that would be useful.
> 
> However at this point I suggest to wait for v2, which I'm sending soon, and
> test that. I added you in Cc for it.
> 
>>>> diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
>>>> index 336f062e1f9d..45f6ba1a8ee1 100644
>>>> --- a/include/drm/bridge/dw_hdmi.h
>>>> +++ b/include/drm/bridge/dw_hdmi.h
>>>> @@ -126,6 +126,11 @@ struct dw_hdmi_phy_ops {
>>>>    struct dw_hdmi_plat_data {
>>>>    	struct regmap *regm;
>>>>
>>>> +	/*
>>>> +	 * The HDMI output port number (which must be 1) if it is described
>>>
>>> I'd rephrase:
>>> The HDMI output port number must be 1 ...
>>>
>>
>> Yes, the output port number should be 1, but I found that the output
>> port number in the Rockchip-side dw-hdmi driver remains 0.
> 
> Really? I checked all the bindings in
> Documentation/devicetree/bindings/display/rockchip/*hdmi* and all mention
> port@1 as the output port number. Can you point to code using port@0 as the
> output port?
> 
> Should it be true, that would be unfortunate because the output_port
> variable does not handle this case. It's used as a sort of bool-or-int
> variable:
> 
>   * as a bool [0] to find out whether the DT is supposed to describe the
>     output port
>   * as an integer to tell the port number to parse in DT [1]
> 
> So saying "please parse port 0" is impossible.
> 
> [0] https://elixir.bootlin.com/linux/v7.0-rc5/source/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c#L3310
> [1] https://elixir.bootlin.com/linux/v7.0-rc5/source/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c#L3315
> 

Aha, my description might be a little misleading. The 
&dw_hdmi_plat_data.output_port is 0 on the Rockchip side, so the next 
bridge will not be parsed for it.

Then I think the &dw_hdmi_plat_data.output_port should be 1, as this 
helps support the hdmi-connector and other bridge chips.

>> Therefore, it may be better to adapt the dw-hdmi drivers across all
>> platforms to the bridge-connector architecture simultaneously.
>>
>> This would allow removing &dw_hdmi_plat_data.output_port and unify the
>> setting of DRM_BRIDGE_ATTACH_NO_CONNECTOR during the attach stage.
>> (Just as the Analogix DP driver does [0])
>>
>> [0]
>> https://lore.kernel.org/all/20260319071452.1961274-1-damon.ding@rock-chips.com/
> 
> I agree converting all users is a good goal, but I disagree it should be
> done simultaneously. There are various users of dw-hdmi, and converting one
> having the hardware to test it was painful enough for me. Converting all of
> them without testing on hardware would be a hell.
> 
> However I might be wrong. Having a precise list of all users, which ones
> need to be converted, and whether they have any special detail to be taken
> care of would be good to estimate the work to convert all users. Without
> that I'd rather let users convert one by one and hopefully get rid of
> legacy code eventually.
> 

Yes, I've noticed that there are quite a few drivers associated with the 
DW HDMI controller. It would be a better idea to let users handle this 
themselves.

BTW: The Rockchip side dw-hdmi patches for bridge connector support will 
be updated as a follow-up to your patch series. :-)

Best regards,
Damon


  reply	other threads:[~2026-03-30  1:18 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 [this message]
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
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=4396e94d-7b88-4599-a938-3c1932a2f9cb@rock-chips.com \
    --to=damon.ding@rock-chips.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=luca.ceresoli@bootlin.com \
    --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

Powered by JetHome