drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions
Subsystems (3)
PATCH 1/1 drm/bridge: dw-hdmi: Replace calls to deprecated HDMI/audio detection functions
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.
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +3 -14
@@ -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; }
Signature · 1 line
2.51.0
Maxime Ripard
maintainerHi,
Quoted 33 lines · Erick Karanja
Replace calls to the deprecated
drm_detect_hdmi_monitor()anddrm_detect_monitor_audio()functions. Callingdrm_edid_connector_update()updatesconnector->display_info.is_hdmiandconnector->display_info.has_audio. The driver should read these fields fromconnector->display_infoinstead of calling the deprecated functions directly.Signed-off-by Erick Karanja <[email protected]>--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-7@@ -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(). -*/
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi, · line 2486
Quoted 10 lines
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +3
-7- 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
Quoted 51 lines · Maxime Ripard
Hi,
Quoted 48 lines · Erick Karanja
Replace calls to the deprecated
drm_detect_hdmi_monitor()anddrm_detect_monitor_audio()functions. Callingdrm_edid_connector_update()
updatesconnector->display_info.is_hdmiand connector-Quoted 1 line
display_info.has_audio.
The driver should read these fields from
connector->display_infoinstead of
calling the deprecated functions directly.Signed-off-by Erick Karanja <[email protected]>---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +++--------------1 file changed, 3 insertions(+), 14 deletions(-)drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-0@@ -2472,7 +2472,6 @@ static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi,struct
drm_connector*connector)
{
const structdrm_edid*drm_edid;drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-1-const struct edid *edid;
if (!hdmi->ddc)
return NULL;drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-3@@ -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
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-1-* connector->display_info.has_audio from a path that has read the EDID
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0
-8-* 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);
Quoted 8 lines
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c static const struct drm_edid *dw_hdmi_edid_read(struct dw_hdmi *hdmi, · line 2486
Quoted 4 lines
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +3
-1- 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_hdmiandsink_has_audio, and you'll don't
need to call any function anymore, deprecated or otherwise.
Thank you, sending v2
Quoted 2 lines
Maxime