public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions
@ 2026-02-25  9:30 Erick Karanja
  2026-02-25 10:11 ` Maxime Ripard
  0 siblings, 1 reply; 3+ messages in thread
From: Erick Karanja @ 2026-02-25  9:30 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Liu Ying,
	Dmitry Baryshkov, Luca Ceresoli, Shengjiu Wang, Andy Yan,
	dri-devel, linux-kernel, Erick Karanja

Replace calls to the deprecated drm_detect_hdmi_monitor() and
drm_detect_monitor_audio() functions. Calling drm_edid_connector_update()
updates connector->display_info.is_hdmi and connector->display_info.has_audio.
The driver should read these fields from connector->display_info instead of
calling the deprecated functions directly.

Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 3b77e73ac0ea..ddc4ae40d94e 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2472,7 +2472,6 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
 						struct drm_connector *connector)
 {
 	const struct drm_edid *drm_edid;
-	const struct edid *edid;
 
 	if (!hdmi->ddc)
 		return NULL;
@@ -2482,19 +2481,9 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
 		dev_dbg(hdmi->dev, "failed to get edid\n");
 		return NULL;
 	}
-
-	/*
-	 * FIXME: This should use connector->display_info.is_hdmi and
-	 * connector->display_info.has_audio from a path that has read the EDID
-	 * and called drm_edid_connector_update().
-	 */
-	edid = drm_edid_raw(drm_edid);
-
-	dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
-		edid->width_cm, edid->height_cm);
-
-	hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
-	hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
+	drm_edid_connector_update(connector, drm_edid);
+	hdmi->sink_is_hdmi = connector->display_info.is_hdmi;
+	hdmi->sink_has_audio = connector->display_info.has_audio;
 
 	return drm_edid;
 }
-- 
2.51.0


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

* Re: [PATCH RFT] drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions
  2026-02-25  9:30 [PATCH RFT] drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions Erick Karanja
@ 2026-02-25 10:11 ` Maxime Ripard
  2026-02-25 18:40   ` Erick Karanja
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2026-02-25 10:11 UTC (permalink / raw)
  To: Erick Karanja
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
	Thomas Zimmermann, David Airlie, Simona Vetter, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Liu Ying, Dmitry Baryshkov,
	Luca Ceresoli, Shengjiu Wang, Andy Yan, dri-devel, linux-kernel

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

Hi,

On Wed, Feb 25, 2026 at 12:30:50PM +0300, Erick Karanja wrote:
> Replace calls to the deprecated drm_detect_hdmi_monitor() and
> drm_detect_monitor_audio() functions. Calling drm_edid_connector_update()
> updates connector->display_info.is_hdmi and connector->display_info.has_audio.
> The driver should read these fields from connector->display_info instead of
> calling the deprecated functions directly.
> 
> Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++--------------
>  1 file changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 3b77e73ac0ea..ddc4ae40d94e 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2472,7 +2472,6 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
>  						struct drm_connector *connector)
>  {
>  	const struct drm_edid *drm_edid;
> -	const struct edid *edid;
>  
>  	if (!hdmi->ddc)
>  		return NULL;
> @@ -2482,19 +2481,9 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
>  		dev_dbg(hdmi->dev, "failed to get edid\n");
>  		return NULL;
>  	}
> -
> -	/*
> -	 * FIXME: This should use connector->display_info.is_hdmi and
> -	 * connector->display_info.has_audio from a path that has read the EDID
> -	 * and called drm_edid_connector_update().
> -	 */
> -	edid = drm_edid_raw(drm_edid);
> -
> -	dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
> -		edid->width_cm, edid->height_cm);
> -
> -	hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
> -	hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
> +	drm_edid_connector_update(connector, drm_edid);
> +	hdmi->sink_is_hdmi = connector->display_info.is_hdmi;
> +	hdmi->sink_has_audio = connector->display_info.has_audio;

You should get rid of sink_is_hdmi and sink_has_audio, and you'll don't
need to call any function anymore, deprecated or otherwise.

Maxime

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

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

* Re: [PATCH RFT] drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions
  2026-02-25 10:11 ` Maxime Ripard
@ 2026-02-25 18:40   ` Erick Karanja
  0 siblings, 0 replies; 3+ messages in thread
From: Erick Karanja @ 2026-02-25 18:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
	Thomas Zimmermann, David Airlie, Simona Vetter, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Liu Ying, Dmitry Baryshkov,
	Luca Ceresoli, Shengjiu Wang, Andy Yan, dri-devel, linux-kernel

On Wed, 2026-02-25 at 11:11 +0100, Maxime Ripard wrote:
> Hi,
> 
> On Wed, Feb 25, 2026 at 12:30:50PM +0300, Erick Karanja wrote:
> > Replace calls to the deprecated drm_detect_hdmi_monitor() and
> > drm_detect_monitor_audio() functions. Calling
> > drm_edid_connector_update()
> > updates connector->display_info.is_hdmi and connector-
> > >display_info.has_audio.
> > The driver should read these fields from connector->display_info
> > instead of
> > calling the deprecated functions directly.
> > 
> > Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> > ---
> >  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++--------------
> >  1 file changed, 3 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > index 3b77e73ac0ea..ddc4ae40d94e 100644
> > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> > @@ -2472,7 +2472,6 @@ static const struct drm_edid
> > *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
> >  						struct
> > drm_connector *connector)
> >  {
> >  	const struct drm_edid *drm_edid;
> > -	const struct edid *edid;
> >  
> >  	if (!hdmi->ddc)
> >  		return NULL;
> > @@ -2482,19 +2481,9 @@ static const struct drm_edid
> > *dw_hdmi_edid_read(struct dw_hdmi *hdmi,
> >  		dev_dbg(hdmi->dev, "failed to get edid\n");
> >  		return NULL;
> >  	}
> > -
> > -	/*
> > -	 * FIXME: This should use connector->display_info.is_hdmi
> > and
> > -	 * connector->display_info.has_audio from a path that has
> > read the EDID
> > -	 * and called drm_edid_connector_update().
> > -	 */
> > -	edid = drm_edid_raw(drm_edid);
> > -
> > -	dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
> > -		edid->width_cm, edid->height_cm);
> > -
> > -	hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
> > -	hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
> > +	drm_edid_connector_update(connector, drm_edid);
> > +	hdmi->sink_is_hdmi = connector->display_info.is_hdmi;
> > +	hdmi->sink_has_audio = connector->display_info.has_audio;
> 
> You should get rid of sink_is_hdmi and sink_has_audio, and you'll
> don't
> need to call any function anymore, deprecated or otherwise.
Thank you, sending v2
> 
> Maxime

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

end of thread, other threads:[~2026-02-25 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25  9:30 [PATCH RFT] drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions Erick Karanja
2026-02-25 10:11 ` Maxime Ripard
2026-02-25 18:40   ` Erick Karanja

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