dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] dt-bindings: display: synopsys, dw-hdmi: add ignore-rxsense
@ 2026-09-02 13:01 Ian Ray
  2026-09-02 13:01 ` [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug Ian Ray
  2026-09-02 17:32 ` [PATCH v1 1/3] dt-bindings: display: synopsys,dw-hdmi: add ignore-rxsense Conor Dooley
  0 siblings, 2 replies; 6+ messages in thread
From: Ian Ray @ 2026-09-02 13:01 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lucas Stach
  Cc: Ian Ray, dri-devel, devicetree, linux-kernel

Add a new property to ignore RXSENSE during hotplug events.

Fixes: da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event on link change")
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
---
 .../bindings/display/bridge/synopsys,dw-hdmi.yaml         | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
index 33481381cccc..0f6e4dabe11d 100644
--- a/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
@@ -61,6 +61,14 @@ properties:
   interrupts:
     maxItems: 1
 
+  ignore-rxsense:
+    type: boolean
+    description:
+      Determine the connector status from the HPD signal alone and ignore RX
+      sense. Set this on boards where a downstream device (for example an HDMI
+      to DP converter) keeps the TMDS lines permanently loaded, so that RX
+      sense is always asserted and can never signal a disconnect.
+
 additionalProperties: true
 
 ...
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug
  2026-09-02 13:01 [PATCH v1 1/3] dt-bindings: display: synopsys, dw-hdmi: add ignore-rxsense Ian Ray
@ 2026-09-02 13:01 ` Ian Ray
  2026-09-02 13:16   ` sashiko-bot
  2026-09-02 15:38   ` Jonas Karlman
  2026-09-02 17:32 ` [PATCH v1 1/3] dt-bindings: display: synopsys,dw-hdmi: add ignore-rxsense Conor Dooley
  1 sibling, 2 replies; 6+ messages in thread
From: Ian Ray @ 2026-09-02 13:01 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Lucas Stach
  Cc: Ian Ray, stable, dri-devel, linux-kernel

Commit da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event
on link change") changed the way hotplug is detected to take into
consideration rxsense.

That change is problematic for boards where rxsense is always detected,
such as when an HDMI to DP converter is used.

Introduce an optional property 'ignore-rxsense' to handle such boards.

Fixes: da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event on link change")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 34c5f583e910..a9337d1f4b88 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -171,6 +171,7 @@ struct dw_hdmi {
 	bool disabled;			/* DRM has disabled our bridge */
 	bool bridge_is_on;		/* indicates the bridge is on */
 	bool rxsense;			/* rxsense state */
+	bool ignore_rxsense;		/* use HPD only, ignore rxsense for detect */
 	u8 phy_mask;			/* desired phy int mask settings */
 	u8 mc_clkdis;			/* clock disable register */
 
@@ -3156,6 +3157,9 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
 		if (phy_stat & HDMI_PHY_HPD)
 			status = connector_status_connected;
 
+		if (hdmi->ignore_rxsense)
+			phy_stat &= ~HDMI_PHY_RX_SENSE;
+
 		if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE)))
 			status = connector_status_disconnected;
 	}
@@ -3362,6 +3366,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
 	mutex_init(&hdmi->cec_notifier_mutex);
 	spin_lock_init(&hdmi->audio_lock);
 
+	hdmi->ignore_rxsense = of_property_read_bool(np, "ignore-rxsense");
+
 	ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
 	if (ddc_node) {
 		hdmi->ddc = of_get_i2c_adapter_by_node(ddc_node);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug
  2026-09-02 13:01 ` [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug Ian Ray
@ 2026-09-02 13:16   ` sashiko-bot
  2026-09-02 15:38   ` Jonas Karlman
  1 sibling, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-02 13:16 UTC (permalink / raw)
  To: Ian Ray; +Cc: dri-devel

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `ignore_rxsense` flag is applied too late in the IRQ handler, breaking CEC physical address invalidation and PHY power-down on hotplug disconnect.
- [Low] The commit introduces a new device tree property `ignore-rxsense` without providing the corresponding YAML binding update.
--

commit daf606cf171e0645fecfea5f019e9fab9dd7eb6f
Author: Ian Ray <ian.ray@gehealthcare.com>

drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug

This commit introduces a new optional device tree property 'ignore-rxsense'
to bypass the rxsense state during hotplug detection. It is designed to
handle boards where rxsense is always active, such as when an HDMI to DP
converter is used.

> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 17d5caedb32e0..5e8f56fba8e96 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

[ ... ]

> @@ -3156,6 +3157,9 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
>  		if (phy_stat & HDMI_PHY_HPD)
>  			status = connector_status_connected;
>  
> +		if (hdmi->ignore_rxsense)
> +			phy_stat &= ~HDMI_PHY_RX_SENSE;
> +

[Severity: Medium]
Is this modification applied too late in the interrupt handler?

Earlier in dw_hdmi_irq(), the raw phy_stat is passed to
dw_hdmi_setup_rx_sense():

		dw_hdmi_setup_rx_sense(hdmi,
				       phy_stat & HDMI_PHY_HPD,
				       phy_stat & HDMI_PHY_RX_SENSE);

When the cable is disconnected on a board where RX_SENSE is stuck high,
feeding the unmodified phy_stat into dw_hdmi_setup_rx_sense() prevents
it from clearing hdmi->rxsense, leaving the PHY incorrectly powered on.

Additionally, the raw phy_stat prevents the CEC invalidation block from
executing on disconnect:

		if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) {
			mutex_lock(&hdmi->cec_notifier_mutex);
			cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);

Could the mask be applied to phy_stat earlier in the function, before
it is used by the PHY power management and CEC invalidation logic?

>  		if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE)))
>  			status = connector_status_disconnected;
>  	}

[ ... ]

> @@ -3362,6 +3366,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>  	mutex_init(&hdmi->cec_notifier_mutex);
>  	spin_lock_init(&hdmi->audio_lock);
>  
> +	hdmi->ignore_rxsense = of_property_read_bool(np, "ignore-rxsense");
> +

[Severity: Low]
Is there a corresponding yaml binding update for this new property?

This introduces 'ignore-rxsense' as a new device tree property, but the
commit does not seem to include documentation for it. Missing
documentation makes it difficult for other board developers to know the
property exists and how to use it properly.

>  	ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
>  	if (ddc_node) {
>  		hdmi->ddc = of_get_i2c_adapter_by_node(ddc_node);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260902130117.2731-1-ian.ray@gehealthcare.com?part=2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug
  2026-09-02 13:01 ` [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug Ian Ray
  2026-09-02 13:16   ` sashiko-bot
@ 2026-09-02 15:38   ` Jonas Karlman
  2026-09-02 17:08     ` Ian Ray
  1 sibling, 1 reply; 6+ messages in thread
From: Jonas Karlman @ 2026-09-02 15:38 UTC (permalink / raw)
  To: Ian Ray
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Lucas Stach,
	dri-devel, linux-kernel

Hi Ian,

On 9/2/2026 3:01 PM, Ian Ray wrote:
> Commit da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event
> on link change") changed the way hotplug is detected to take into
> consideration rxsense.
> 
> That change is problematic for boards where rxsense is always detected,
> such as when an HDMI to DP converter is used.

I have a series [1] with a patch [2] that tries to fully remove the
rxsense part from the dw-hdmi driver, any help to test that series is
welcomed. Should likely solve the issue you are trying to workaround
here.

Planning on sending out a v8 next few days now that v7.3-rc1 have landed.

[1] https://lore.kernel.org/all/20260518180206.2480119-1-jonas@kwiboo.se/
[2] https://lore.kernel.org/all/20260518180206.2480119-21-jonas@kwiboo.se/

Regards,
Jonas

> 
> Introduce an optional property 'ignore-rxsense' to handle such boards.
> 
> Fixes: da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event on link change")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 34c5f583e910..a9337d1f4b88 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -171,6 +171,7 @@ struct dw_hdmi {
>  	bool disabled;			/* DRM has disabled our bridge */
>  	bool bridge_is_on;		/* indicates the bridge is on */
>  	bool rxsense;			/* rxsense state */
> +	bool ignore_rxsense;		/* use HPD only, ignore rxsense for detect */
>  	u8 phy_mask;			/* desired phy int mask settings */
>  	u8 mc_clkdis;			/* clock disable register */
>  
> @@ -3156,6 +3157,9 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
>  		if (phy_stat & HDMI_PHY_HPD)
>  			status = connector_status_connected;
>  
> +		if (hdmi->ignore_rxsense)
> +			phy_stat &= ~HDMI_PHY_RX_SENSE;
> +
>  		if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE)))
>  			status = connector_status_disconnected;
>  	}
> @@ -3362,6 +3366,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
>  	mutex_init(&hdmi->cec_notifier_mutex);
>  	spin_lock_init(&hdmi->audio_lock);
>  
> +	hdmi->ignore_rxsense = of_property_read_bool(np, "ignore-rxsense");
> +
>  	ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
>  	if (ddc_node) {
>  		hdmi->ddc = of_get_i2c_adapter_by_node(ddc_node);


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug
  2026-09-02 15:38   ` Jonas Karlman
@ 2026-09-02 17:08     ` Ian Ray
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Ray @ 2026-09-02 17:08 UTC (permalink / raw)
  To: Jonas Karlman
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Lucas Stach,
	dri-devel, linux-kernel

On Wed, Sep 02, 2026 at 05:38:34PM +0200, Jonas Karlman wrote:
> Hi Ian,
> 
> On 9/2/2026 3:01 PM, Ian Ray wrote:
> > Commit da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event
> > on link change") changed the way hotplug is detected to take into
> > consideration rxsense.
> >
> > That change is problematic for boards where rxsense is always detected,
> > such as when an HDMI to DP converter is used.
> 
> I have a series [1] with a patch [2] that tries to fully remove the
> rxsense part from the dw-hdmi driver, any help to test that series is
> welcomed. Should likely solve the issue you are trying to workaround
> here.
> 
> Planning on sending out a v8 next few days now that v7.3-rc1 have landed.
> 
> [1] https://lore.kernel.org/all/20260518180206.2480119-1-jonas@kwiboo.se/
> [2] https://lore.kernel.org/all/20260518180206.2480119-21-jonas@kwiboo.se/

Thank you -- your series does indeed solve my problem.
I will reply to [2] with a Tested-by: tag.


> 
> Regards,
> Jonas
> 
> >
> > Introduce an optional property 'ignore-rxsense' to handle such boards.
> >
> > Fixes: da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event on link change")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> > ---
> >  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > index 34c5f583e910..a9337d1f4b88 100644
> > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > @@ -171,6 +171,7 @@ struct dw_hdmi {
> >       bool disabled;                  /* DRM has disabled our bridge */
> >       bool bridge_is_on;              /* indicates the bridge is on */
> >       bool rxsense;                   /* rxsense state */
> > +     bool ignore_rxsense;            /* use HPD only, ignore rxsense for detect */
> >       u8 phy_mask;                    /* desired phy int mask settings */
> >       u8 mc_clkdis;                   /* clock disable register */
> >
> > @@ -3156,6 +3157,9 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
> >               if (phy_stat & HDMI_PHY_HPD)
> >                       status = connector_status_connected;
> >
> > +             if (hdmi->ignore_rxsense)
> > +                     phy_stat &= ~HDMI_PHY_RX_SENSE;
> > +
> >               if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE)))
> >                       status = connector_status_disconnected;
> >       }
> > @@ -3362,6 +3366,8 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
> >       mutex_init(&hdmi->cec_notifier_mutex);
> >       spin_lock_init(&hdmi->audio_lock);
> >
> > +     hdmi->ignore_rxsense = of_property_read_bool(np, "ignore-rxsense");
> > +
> >       ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
> >       if (ddc_node) {
> >               hdmi->ddc = of_get_i2c_adapter_by_node(ddc_node);
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/3] dt-bindings: display: synopsys,dw-hdmi: add ignore-rxsense
  2026-09-02 13:01 [PATCH v1 1/3] dt-bindings: display: synopsys, dw-hdmi: add ignore-rxsense Ian Ray
  2026-09-02 13:01 ` [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug Ian Ray
@ 2026-09-02 17:32 ` Conor Dooley
  1 sibling, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2026-09-02 17:32 UTC (permalink / raw)
  To: Ian Ray
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lucas Stach,
	dri-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

On Wed, Sep 02, 2026 at 04:01:13PM +0300, Ian Ray wrote:
> Add a new property to ignore RXSENSE during hotplug events.
> 
> Fixes: da09daf88108 ("drm: bridge: dw_hdmi: only trigger hotplug event on link change")
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> ---
>  .../bindings/display/bridge/synopsys,dw-hdmi.yaml         | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
> index 33481381cccc..0f6e4dabe11d 100644
> --- a/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/synopsys,dw-hdmi.yaml
> @@ -61,6 +61,14 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  ignore-rxsense:
> +    type: boolean
> +    description:
> +      Determine the connector status from the HPD signal alone and ignore RX
> +      sense. Set this on boards where a downstream device (for example an HDMI
> +      to DP converter) keeps the TMDS lines permanently loaded, so that RX
> +      sense is always asserted and can never signal a disconnect.

I'm not very familiar at all with these kinds of devices, but this seems
like something pretty generic that not only this IP would need. Are
there other examples of this?

Additionally, you're missing a vendor prefix in the case that this does
remain limited to this one device.

pw-bot: changes-requested

Thanks,
Conor.

> +
>  additionalProperties: true
>  
>  ...
> -- 
> 2.47.3
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-03  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 13:01 [PATCH v1 1/3] dt-bindings: display: synopsys, dw-hdmi: add ignore-rxsense Ian Ray
2026-09-02 13:01 ` [PATCH v1 2/3] drm/bridge: dw-hdmi: optionally ignore rxsense when detecting hotplug Ian Ray
2026-09-02 13:16   ` sashiko-bot
2026-09-02 15:38   ` Jonas Karlman
2026-09-02 17:08     ` Ian Ray
2026-09-02 17:32 ` [PATCH v1 1/3] dt-bindings: display: synopsys,dw-hdmi: add ignore-rxsense Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox