From 4ff81b8da582ab00c03ffc67d278ef390ad36f98 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 21 Dec 2012 10:06:55 +0000 Subject: [PATCH] drm/i915: Try to get the EDID using bit-banging if GMBUS fails As a single-shot probe as to whether the EDID exists at all, we can double-check using GPIO. References: https://bugs.freedesktop.org/show_bug.cgi?id=53926 Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_lvds.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index e1c6145..b12ea27 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -1173,6 +1173,12 @@ bool intel_lvds_init(struct drm_device *dev) * preferred mode is the right one. */ edid = drm_get_edid(connector, intel_gmbus_get_adapter(dev_priv, pin)); + if (!edid && !intel_gmbus_is_forced_bit(i2c)) { + DRM_DEBUG_KMS("LVDS GMBUS EDID read failed, retry using GPIO bit-banging\n"); + intel_gmbus_force_bit(i2c, true); + edid = drm_get_edid(connector, i2c); + intel_gmbus_force_bit(i2c, false); + } if (edid) { if (drm_add_edid_modes(connector, edid)) { drm_mode_connector_update_edid_property(connector, -- 1.7.10.4