drm/radeon/kms: Use the standard VESA timeout for DDC channels
authorJean Delvare <jdelvare@suse.de>
Sat, 28 Jan 2012 10:08:58 +0000 (11:08 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 3 Feb 2012 09:34:32 +0000 (09:34 +0000)
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: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_i2c.c

index b7ec89bf3939f6cfaa855f53acfb5966d464d8aa..c47f222f74420a56f79dc74b38c368380d7e19fd 100644 (file)
@@ -926,9 +926,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
                i2c->algo.bit.getsda = get_data;
                i2c->algo.bit.getscl = get_clock;
                i2c->algo.bit.udelay = 10;
-               /* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always
-                * make this, 2 jiffies is a lot more reliable */
-               i2c->algo.bit.timeout = 2;
+               i2c->algo.bit.timeout = usecs_to_jiffies(2200); /* from VESA */
                i2c->algo.bit.data = i2c;
                ret = i2c_bit_add_bus(&i2c->adapter);
                if (ret) {