]> git.kernelconcepts.de Git - mv-sheeva.git/commitdiff
drm/i915: Disable LVDS i2c probing when using GPIO bit banging
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Sep 2010 15:41:32 +0000 (16:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Sep 2010 15:47:00 +0000 (16:47 +0100)
This check only appears to succeed when using GMBUS, so we need to skip
it if we have fallen back to using GPIO bit banging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_lvds.c

index 0bb2553317640f17e220fb0d0132a5d31883d416..0ce76a82a6755e650c2766bca482fb285a690981 100644 (file)
@@ -1108,6 +1108,10 @@ extern int intel_setup_gmbus(struct drm_device *dev);
 extern void intel_teardown_gmbus(struct drm_device *dev);
 extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
 extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
+extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
+{
+       return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
+}
 extern void intel_i2c_reset(struct drm_device *dev);
 
 /* intel_opregion.c */
index 98172bcf485ff9b7fcecfadeaec846e918732869..f1a649990ea9e61d5f7ff6f8b15e127d6fcc2f17 100644 (file)
@@ -827,6 +827,9 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
                },
        };
        struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter;
+       /* XXX this only appears to work when using GMBUS */
+       if (intel_gmbus_is_forced_bit(i2c))
+               return true;
        return i2c_transfer(i2c, msgs, 1) == 1;
 }