1 Subject: [3/3] drm/i915: Ignore LVDS EDID when it is unavailabe or invalid
2 Date: Thu, 04 Mar 2010 08:17:31 -0000
3 From: Zhenyu Wang <zhenyuw@linux.intel.com>
5 References: https://patchwork.kernel.org/patch/83556/, BMC# 331
7 From: Zhao Yakui <yakui.zhao@intel.com>
9 In course of probing the display mode for LVDS, we will firstly try to
10 check the EDID for LVDS panel. But on some laptops the EDID is invalid for
11 the LVDS panel. In such case it will complain the invalida EDID warning
12 message and print the EDID raw data every time when probing the LVDS mode.
14 https://bugs.freedesktop.org/show_bug.cgi?id=23099
15 https://bugs.freedesktop.org/show_bug.cgi?id=26395
17 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
18 Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
19 Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
20 Acked-by: Yin Kangkai <kangkai.yin@intel.com>
23 drivers/gpu/drm/i915/i915_drv.h | 2 ++
24 drivers/gpu/drm/i915/intel_lvds.c | 13 +++++++++----
25 2 files changed, 11 insertions(+), 4 deletions(-)
27 --- a/drivers/gpu/drm/i915/i915_drv.h
28 +++ b/drivers/gpu/drm/i915/i915_drv.h
29 @@ -581,6 +581,8 @@ typedef struct drm_i915_private {
30 /* Reclocking support */
31 bool render_reclock_avail;
32 bool lvds_downclock_avail;
33 + /* indicate whether the LVDS EDID is OK */
35 /* indicates the reduced downclock for LVDS*/
37 struct work_struct idle_work;
38 --- a/drivers/gpu/drm/i915/intel_lvds.c
39 +++ b/drivers/gpu/drm/i915/intel_lvds.c
40 @@ -680,10 +680,13 @@ static int intel_lvds_get_modes(struct d
41 struct drm_i915_private *dev_priv = dev->dev_private;
44 - ret = intel_ddc_get_modes(intel_output);
45 + if (dev_priv->lvds_edid_ok) {
46 + ret = intel_ddc_get_modes(intel_output);
52 + dev_priv->lvds_edid_ok = false;
55 /* Didn't get an EDID, so
56 * Set wide sync ranges so we get all modes
57 @@ -1097,7 +1100,9 @@ void intel_lvds_init(struct drm_device *
58 * Attempt to get the fixed panel mode from DDC. Assume that the
59 * preferred mode is the right one.
61 - intel_ddc_get_modes(intel_output);
62 + dev_priv->lvds_edid_ok = true;
63 + if (!intel_ddc_get_modes(intel_output))
64 + dev_priv->lvds_edid_ok = false;
66 list_for_each_entry(scan, &connector->probed_modes, head) {
67 mutex_lock(&dev->mode_config.mutex);