struct drm_encoder *encoder;
        struct sti_hdmi *hdmi;
        struct drm_property *colorspace_property;
-       struct drm_property *hdmi_mode_property;
 };
 
 #define to_sti_hdmi_connector(x) \
 
        /* Select encryption type and the framing mode */
        conf |= HDMI_CFG_ESS_NOT_OESS;
-       if (hdmi->hdmi_mode == HDMI_MODE_HDMI)
+       if (hdmi->hdmi_monitor)
                conf |= HDMI_CFG_HDMI_NOT_DVI;
 
        /* Set Hsync polarity */
        if (!edid)
                goto fail;
 
+       hdmi->hdmi_monitor = drm_detect_hdmi_monitor(edid);
+       DRM_DEBUG_KMS("%s : %dx%d cm\n",
+                     (hdmi->hdmi_monitor ? "hdmi monitor" : "dvi monitor"),
+                     edid->width_cm, edid->height_cm);
+
        count = drm_add_edid_modes(connector, edid);
        drm_mode_connector_update_edid_property(connector, edid);
        drm_edid_to_eld(connector, edid);
        }
        hdmi_connector->colorspace_property = prop;
        drm_object_attach_property(&connector->base, prop, hdmi->colorspace);
-
-       /* hdmi_mode property */
-       hdmi->hdmi_mode = DEFAULT_HDMI_MODE;
-       prop = drm_property_create_enum(drm_dev, 0, "hdmi_mode",
-                                       hdmi_mode_names,
-                                       ARRAY_SIZE(hdmi_mode_names));
-       if (!prop) {
-               DRM_ERROR("fails to create colorspace property\n");
-               return;
-       }
-       hdmi_connector->hdmi_mode_property = prop;
-       drm_object_attach_property(&connector->base, prop, hdmi->hdmi_mode);
-
 }
 
 static int
                return 0;
        }
 
-       if (property == hdmi_connector->hdmi_mode_property) {
-               hdmi->hdmi_mode = val;
-               return 0;
-       }
-
        DRM_ERROR("failed to set hdmi connector property\n");
        return -EINVAL;
 }
                return 0;
        }
 
-       if (property == hdmi_connector->hdmi_mode_property) {
-               *val = hdmi->hdmi_mode;
-               return 0;
-       }
-
        DRM_ERROR("failed to get hdmi connector property\n");
        return -EINVAL;
 }
 
        struct hdmi_audio_infoframe cea;
 };
 
-/* values for the framing mode property */
-enum sti_hdmi_modes {
-       HDMI_MODE_HDMI,
-       HDMI_MODE_DVI,
-};
-
-static const struct drm_prop_enum_list hdmi_mode_names[] = {
-       { HDMI_MODE_HDMI, "hdmi" },
-       { HDMI_MODE_DVI, "dvi" },
-};
-
-#define DEFAULT_HDMI_MODE HDMI_MODE_HDMI
-
 static const struct drm_prop_enum_list colorspace_mode_names[] = {
        { HDMI_COLORSPACE_RGB, "rgb" },
        { HDMI_COLORSPACE_YUV422, "yuv422" },
  * @reset: reset control of the hdmi phy
  * @ddc_adapt: i2c ddc adapter
  * @colorspace: current colorspace selected
- * @hdmi_mode: select framing for HDMI or DVI
+ * @hdmi_monitor: true if HDMI monitor detected else DVI monitor assumed
  * @audio_pdev: ASoC hdmi-codec platform device
  * @audio: hdmi audio parameters.
  * @drm_connector: hdmi connector
        struct reset_control *reset;
        struct i2c_adapter *ddc_adapt;
        enum hdmi_colorspace colorspace;
-       enum sti_hdmi_modes hdmi_mode;
+       bool hdmi_monitor;
        struct platform_device *audio_pdev;
        struct hdmi_audio_params audio;
        struct drm_connector *drm_connector;