[PATCH 2/2] drm/kms: Use the standard VESA timeout for DDC channels

Keith Packard keithp at keithp.com
Wed Nov 23 13:24:33 PST 2011


On Fri, 21 Oct 2011 09:10:12 +0200, Jean Delvare <jdelvare at suse.de> wrote:

> -		/* 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 */

From my reading of the usecs_to_jiffies code, it always returns a time
at least as long as requested, so this will ensure that you're waiting
at least 2.2ms, unlike 2 jiffies which is some random amount of time
depending on the HZ setting in the kernel.

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20111123/22a61357/attachment.pgp>


More information about the dri-devel mailing list