drm/exynos: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi
authorhongao <hongao@uniontech.com>
Thu, 16 Jun 2022 07:22:33 +0000 (15:22 +0800)
committerInki Dae <inki.dae@samsung.com>
Mon, 26 Sep 2022 01:12:54 +0000 (10:12 +0900)
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.

Signed-off-by: hongao <hongao@uniontech.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c

index 10b0036..ad56d4e 100644 (file)
@@ -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);