dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Jean Delvare <jdelvare@suse.de>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/kms: Use the standard VESA timeout for DDC channels
Date: Wed, 23 Nov 2011 13:24:33 -0800	[thread overview]
Message-ID: <867h2qedm6.fsf@sumi.keithp.com> (raw)
In-Reply-To: <201110210910.12848.jdelvare@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 647 bytes --]

On Fri, 21 Oct 2011 09:10:12 +0200, Jean Delvare <jdelvare@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@keithp.com>

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2011-11-23 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21  7:10 [PATCH 2/2] drm/kms: Use the standard VESA timeout for DDC channels Jean Delvare
2011-11-23 21:24 ` Keith Packard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867h2qedm6.fsf@sumi.keithp.com \
    --to=keithp@keithp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jdelvare@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox