Commit 90489557 authored by Jean Delvare's avatar Jean Delvare Committed by Dave Airlie

drm/radeon/kms: Use the standard VESA timeout for DDC channels

The VESA specification suggests a 2.2 ms timeout on DDC channels.
Use exactly that (as the i915 driver does) instead of hard-coding a
jiffy count.
Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
Reviewed-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1849ecb2
...@@ -926,9 +926,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, ...@@ -926,9 +926,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
i2c->algo.bit.getsda = get_data; i2c->algo.bit.getsda = get_data;
i2c->algo.bit.getscl = get_clock; i2c->algo.bit.getscl = get_clock;
i2c->algo.bit.udelay = 10; i2c->algo.bit.udelay = 10;
/* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always i2c->algo.bit.timeout = usecs_to_jiffies(2200); /* from VESA */
* make this, 2 jiffies is a lot more reliable */
i2c->algo.bit.timeout = 2;
i2c->algo.bit.data = i2c; i2c->algo.bit.data = i2c;
ret = i2c_bit_add_bus(&i2c->adapter); ret = i2c_bit_add_bus(&i2c->adapter);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment