diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-28 11:41:32 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-28 11:47:00 -0400 |
commit | b8232e906381dcba2bb26f0d849d4c25cc9b1368 (patch) | |
tree | e3b90d6c19db323debd075c6c62b07f95c04178f /drivers/gpu/drm/i915 | |
parent | e0e41598b433c0216814d54c62e7c1834f464d9b (diff) |
drm/i915: Disable LVDS i2c probing when using GPIO bit banging
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>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 0bb255331764..0ce76a82a675 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1108,6 +1108,10 @@ extern int intel_setup_gmbus(struct drm_device *dev); | |||
1108 | extern void intel_teardown_gmbus(struct drm_device *dev); | 1108 | extern void intel_teardown_gmbus(struct drm_device *dev); |
1109 | extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed); | 1109 | extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed); |
1110 | extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit); | 1110 | extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit); |
1111 | extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter) | ||
1112 | { | ||
1113 | return container_of(adapter, struct intel_gmbus, adapter)->force_bit; | ||
1114 | } | ||
1111 | extern void intel_i2c_reset(struct drm_device *dev); | 1115 | extern void intel_i2c_reset(struct drm_device *dev); |
1112 | 1116 | ||
1113 | /* intel_opregion.c */ | 1117 | /* intel_opregion.c */ |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 98172bcf485f..f1a649990ea9 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -827,6 +827,9 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin) | |||
827 | }, | 827 | }, |
828 | }; | 828 | }; |
829 | struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter; | 829 | struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter; |
830 | /* XXX this only appears to work when using GMBUS */ | ||
831 | if (intel_gmbus_is_forced_bit(i2c)) | ||
832 | return true; | ||
830 | return i2c_transfer(i2c, msgs, 1) == 1; | 833 | return i2c_transfer(i2c, msgs, 1) == 1; |
831 | } | 834 | } |
832 | 835 | ||