Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345297
b: refs/heads/master
c: f2ce9fa
h: refs/heads/master
i:
  345295: f6c7bdf
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Nov 13, 2012
1 parent c5e2c96 commit 96c462a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f94982b0022f474d3c9285447d9a33b7a324e771
refs/heads/master: f2ce9fafc1d443d49a0d1988f524a5da6e086e2c
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ struct intel_fbc_work;

struct intel_gmbus {
struct i2c_adapter adapter;
bool force_bit;
u32 force_bit;
u32 reg0;
u32 gpio_reg;
struct i2c_algo_bit_data bit_algo;
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
I915_WRITE(GMBUS0 + reg_offset, 0);

/* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */
bus->force_bit = true;
bus->force_bit = 1;
ret = i2c_bit_algo.master_xfer(adapter, msgs, num);

out:
Expand Down Expand Up @@ -491,7 +491,7 @@ int intel_setup_gmbus(struct drm_device *dev)

/* gmbus seems to be broken on i830 */
if (IS_I830(dev))
bus->force_bit = true;
bus->force_bit = 1;

intel_gpio_setup(bus, port);

Expand Down Expand Up @@ -532,7 +532,10 @@ void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
{
struct intel_gmbus *bus = to_intel_gmbus(adapter);

bus->force_bit = force_bit;
bus->force_bit += force_bit ? 1 : -1;
DRM_DEBUG_KMS("%sabling bit-banging on %s. force bit now %d\n",
force_bit ? "en" : "dis", adapter->name,
bus->force_bit);
}

void intel_teardown_gmbus(struct drm_device *dev)
Expand Down

0 comments on commit 96c462a

Please sign in to comment.