drm/exynos: hdmi: report safe 640x480 mode as a fallback when no EDID found
[linux-2.6-block.git] / drivers / gpu / drm / exynos / exynos_hdmi.c
index e968824a4c728efef3f570280e5044a239fae610..1e26cd4f834798a12145d23b880904f4cd2b3284 100644 (file)
@@ -887,11 +887,11 @@ static int hdmi_get_modes(struct drm_connector *connector)
        int ret;
 
        if (!hdata->ddc_adpt)
-               return 0;
+               goto no_edid;
 
        edid = drm_get_edid(connector, hdata->ddc_adpt);
        if (!edid)
-               return 0;
+               goto no_edid;
 
        hdata->dvi_mode = !connector->display_info.is_hdmi;
        DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
@@ -906,6 +906,9 @@ static int hdmi_get_modes(struct drm_connector *connector)
        kfree(edid);
 
        return ret;
+
+no_edid:
+       return drm_add_modes_noedid(connector, 640, 480);
 }
 
 static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)