aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c13
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b7cb4aadd059..6960849522f8 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -611,6 +611,8 @@ typedef struct drm_i915_private {
611 /* Reclocking support */ 611 /* Reclocking support */
612 bool render_reclock_avail; 612 bool render_reclock_avail;
613 bool lvds_downclock_avail; 613 bool lvds_downclock_avail;
614 /* indicate whether the LVDS EDID is OK */
615 bool lvds_edid_good;
614 /* indicates the reduced downclock for LVDS*/ 616 /* indicates the reduced downclock for LVDS*/
615 int lvds_downclock; 617 int lvds_downclock;
616 struct work_struct idle_work; 618 struct work_struct idle_work;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 8238b408644e..527cfa2626bf 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -638,10 +638,12 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
638 struct drm_i915_private *dev_priv = dev->dev_private; 638 struct drm_i915_private *dev_priv = dev->dev_private;
639 int ret = 0; 639 int ret = 0;
640 640
641 ret = intel_ddc_get_modes(intel_encoder); 641 if (dev_priv->lvds_edid_good) {
642 ret = intel_ddc_get_modes(intel_encoder);
642 643
643 if (ret) 644 if (ret)
644 return ret; 645 return ret;
646 }
645 647
646 /* Didn't get an EDID, so 648 /* Didn't get an EDID, so
647 * Set wide sync ranges so we get all modes 649 * Set wide sync ranges so we get all modes
@@ -1062,7 +1064,10 @@ void intel_lvds_init(struct drm_device *dev)
1062 * Attempt to get the fixed panel mode from DDC. Assume that the 1064 * Attempt to get the fixed panel mode from DDC. Assume that the
1063 * preferred mode is the right one. 1065 * preferred mode is the right one.
1064 */ 1066 */
1065 intel_ddc_get_modes(intel_encoder); 1067 dev_priv->lvds_edid_good = true;
1068
1069 if (!intel_ddc_get_modes(intel_encoder))
1070 dev_priv->lvds_edid_good = false;
1066 1071
1067 list_for_each_entry(scan, &connector->probed_modes, head) { 1072 list_for_each_entry(scan, &connector->probed_modes, head) {
1068 mutex_lock(&dev->mode_config.mutex); 1073 mutex_lock(&dev->mode_config.mutex);