drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
Subsystems (3)
PATCH 1/1 drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
Once EDID is parsed, the monitor HDMI support information is available through drm_display_info.is_hdmi.
This driver calls drm_detect_hdmi_monitor() to receive the same information, which is less efficient.
Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi instead.
--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_hdmi.c +1 -1
@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)if (!edid)return -ENODEV ; - hdata->dvi_mode = !drm_detect_hdmi_monitor (edid); + hdata->dvi_mode = !connector->display_info.is_hdmi;DRM_DEV_DEBUG_KMS (hdata->dev,"%s : width[%d] x height[%d]\n" , (hdata->dvi_mode ?"dvi monitor" :"hdmi monitor" ), edid->width_cm, edid->height_cm);
Signature · 1 line
2.20.1
22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
Quoted 9 lines
Once EDID is parsed, the monitor HDMI support information is available through drm_display_info.is_hdmi.
This driver calls
drm_detect_hdmi_monitor()to receive the same information, which is less efficient.Avoid calling
drm_detect_hdmi_monitor()and use drm_display_info.is_hdmi instead.
Applied.
Thanks,
Inki Dae
Quoted 18 lines
Signed-off-by hongao <[email protected]>--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/exynos/exynos_hdmi.c +1
-1@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)if (!edid)return -ENODEV ; - hdata->dvi_mode = !drm_detect_hdmi_monitor (edid); + hdata->dvi_mode = !connector->display_info.is_hdmi;DRM_DEV_DEBUG_KMS (hdata->dev,"%s : width[%d] x height[%d]\n" , (hdata->dvi_mode ?"dvi monitor" :"hdmi monitor" ), edid->width_cm, edid->height_cm);
Quoted 4 lines · Inki Dae
22. 6. 16. 16:22에 hongao 이(가) 쓴 글:
Quoted 3 lines
Once EDID is parsed, the monitor HDMI support information is available through drm_display_info.is_hdmi.
Quoted 8 lines
Quoted 6 lines
This driver calls
drm_detect_hdmi_monitor()to receive the same information, which is less efficient.Avoid calling
drm_detect_hdmi_monitor()and use drm_display_info.is_hdmi instead.Applied.
Sorry, but this is broken. The commit message contains the clue: "Once EDID is parsed". drm_get_edid() does not parse the EDID, you need to call drm_connector_update_edid_property() first.
This is what I posted some time ago [1] but apparently was working on a different baseline.
BR,
Jani.
Quoted 22 lines
Thanks,
Inki DaeQuoted 18 lines
Signed-off-by hongao <[email protected]>--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/exynos/exynos_hdmi.c +1
-1@@ -893,7 +893,7 @@ static int hdmi_get_modes(struct drm_connector *connector)if (!edid)return -ENODEV ; - hdata->dvi_mode = !drm_detect_hdmi_monitor (edid); + hdata->dvi_mode = !connector->display_info.is_hdmi;DRM_DEV_DEBUG_KMS (hdata->dev,"%s : width[%d] x height[%d]\n" , (hdata->dvi_mode ?"dvi monitor" :"hdmi monitor" ), edid->width_cm, edid->height_cm);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center