dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] drm/radeon/kms: Use the standard VESA timeout for DDC channels
Date: Sat, 28 Jan 2012 11:08:58 +0100	[thread overview]
Message-ID: <201201281108.58888.jdelvare@suse.de> (raw)

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>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
---
Already sent on: 2011-10-21.

 drivers/gpu/drm/radeon/radeon_i2c.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--- linux-3.3-rc1.orig/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-28 10:37:51.722069517 +0100
+++ linux-3.3-rc1/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-28 10:39:26.996070929 +0100
@@ -925,9 +925,7 @@ struct radeon_i2c_chan *radeon_i2c_creat
 		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) {

-- 
Jean Delvare
Suse L3

             reply	other threads:[~2012-01-28 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-28 10:08 Jean Delvare [this message]
2012-01-28 14:46 ` [PATCH 2/2] drm/radeon/kms: Use the standard VESA timeout for DDC channels Alex Deucher
2012-01-29  1:34 ` Keith Packard
2012-03-21 12:22   ` Jean Delvare

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=201201281108.58888.jdelvare@suse.de \
    --to=jdelvare@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    /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