Subject: [Patch] drm/i915: Don't read the EDID for LVDS when the LVDS_EDID is unsupported in VBT From: Zhao Yakui Don't read the EDID for LVDS when the LVDS_EDID is unsupported in VBT. Signed-off-by: Zhao Yakui --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 1 + drivers/gpu/drm/i915/intel_lvds.c | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/gpu/drm/i915/intel_bios.c =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/intel_bios.c 2009-09-27 13:40:34.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/intel_bios.c 2009-09-27 13:51:06.000000000 +0800 @@ -124,6 +124,7 @@ return; dev_priv->lvds_dither = lvds_options->pixel_dither; + dev_priv->lvds_edid = lvds_options->lvds_edid; if (lvds_options->panel_type == 0xff) return; Index: linux-2.6/drivers/gpu/drm/i915/i915_drv.h =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/i915_drv.h 2009-09-27 13:45:16.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/i915_drv.h 2009-09-27 13:51:53.000000000 +0800 @@ -253,6 +253,7 @@ unsigned int int_crt_support:1; unsigned int lvds_use_ssc:1; unsigned int edp_support:1; + unsigned int lvds_edid:1; int lvds_ssc_freq; struct notifier_block lid_notifier; Index: linux-2.6/drivers/gpu/drm/i915/intel_lvds.c =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/intel_lvds.c 2009-09-27 13:40:34.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/intel_lvds.c 2009-09-27 13:58:33.000000000 +0800 @@ -630,7 +630,13 @@ struct drm_i915_private *dev_priv = dev->dev_private; int ret = 0; - ret = intel_ddc_get_modes(intel_output); + /* + * Only when the LVDS_edid bit is enabled, we will try to + * read the EDID for integrated LVDS. + * Otherwise it is unncessary to read the EDID for LVDS. + */ + if (dev_priv->lvds_edid) + ret = intel_ddc_get_modes(intel_output); if (ret) return ret; @@ -992,7 +998,11 @@ * Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ - intel_ddc_get_modes(intel_output); + /* Only when the LVDS_EDID bit is effective, we will try to + * read the EDID for integrated LVDS + */ + if (dev_priv->lvds_edid) + intel_ddc_get_modes(intel_output); list_for_each_entry(scan, &connector->probed_modes, head) { mutex_lock(&dev->mode_config.mutex);