[PATCH 1/2] drm/kms: Make i2c buses faster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A udelay value of 20 leads to an I2C bus running at only 25 kbps. I2C
devices can typically operate faster than this, 50 kbps should be fine
for all devices (and compliant devices can always stretch the clock if
needed.)

FWIW, the vast majority of framebuffer drivers set udelay to 10
already. So set it to 10 in DRM drivers too, this will make EDID block
reads faster. We might even lower the udelay value later if no problem
is reported.

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
Acked-by: Eugeni Dodonov <eugeni.dodonov@xxxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxxx>
Cc: Keith Packard <keithp@xxxxxxxxxx>
Cc: Alex Deucher <alexdeucher@xxxxxxxxx>
---
Already sent on: 2011-10-21.

 drivers/gpu/drm/i915/intel_i2c.c    |    2 +-
 drivers/gpu/drm/radeon/radeon_i2c.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- linux-3.3-rc1.orig/drivers/gpu/drm/i915/intel_i2c.c	2012-01-28 10:12:16.554480007 +0100
+++ linux-3.3-rc1/drivers/gpu/drm/i915/intel_i2c.c	2012-01-28 10:28:16.884668894 +0100
@@ -37,7 +37,7 @@
 
 /* Intel GPIO access functions */
 
-#define I2C_RISEFALL_TIME 20
+#define I2C_RISEFALL_TIME 10
 
 static inline struct intel_gmbus *
 to_intel_gmbus(struct i2c_adapter *i2c)
--- linux-3.3-rc1.orig/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-28 10:12:16.555480007 +0100
+++ linux-3.3-rc1/drivers/gpu/drm/radeon/radeon_i2c.c	2012-01-28 10:28:16.886668894 +0100
@@ -924,7 +924,7 @@ struct radeon_i2c_chan *radeon_i2c_creat
 		i2c->algo.bit.setscl = set_clock;
 		i2c->algo.bit.getsda = get_data;
 		i2c->algo.bit.getscl = get_clock;
-		i2c->algo.bit.udelay = 20;
+		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;

-- 
Jean Delvare
Suse L3
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux