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@suse.de Acked-by: Eugeni Dodonov eugeni.dodonov@intel.com Cc: Dave Airlie airlied@gmail.com Cc: Keith Packard keithp@keithp.com --- Changes since v1: * Split per driver to make merging easier. * Make the subject line more accurate.
drivers/gpu/drm/i915/intel_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-3.4-rc0.orig/drivers/gpu/drm/i915/intel_i2c.c 2012-03-21 13:43:33.750915151 +0100 +++ linux-3.4-rc0/drivers/gpu/drm/i915/intel_i2c.c 2012-03-21 13:44:05.923915628 +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)
On Wed, Mar 21, 2012 at 02:29:47PM +0100, Jean Delvare wrote:
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@suse.de Acked-by: Eugeni Dodonov eugeni.dodonov@intel.com Cc: Dave Airlie airlied@gmail.com Cc: Keith Packard keithp@keithp.com
Fyi this already got merged int Dave's tree (the unsplit version) as:
commit 1849ecb22fb3b5d57b65e7369a3957adf9f26f39 Author: Jean Delvare jdelvare@suse.de Date: Sat Jan 28 11:07:09 2012 +0100
drm/kms: Make i2c buses faster
Cheers, Daniel
Changes since v1:
- Split per driver to make merging easier.
- Make the subject line more accurate.
drivers/gpu/drm/i915/intel_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-3.4-rc0.orig/drivers/gpu/drm/i915/intel_i2c.c 2012-03-21 13:43:33.750915151 +0100 +++ linux-3.4-rc0/drivers/gpu/drm/i915/intel_i2c.c 2012-03-21 13:44:05.923915628 +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)
-- Jean Delvare Suse L3 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
On Thursday 22 March 2012 09:50:23 pm Daniel Vetter wrote:
On Wed, Mar 21, 2012 at 02:29:47PM +0100, Jean Delvare wrote:
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@suse.de Acked-by: Eugeni Dodonov eugeni.dodonov@intel.com Cc: Dave Airlie airlied@gmail.com Cc: Keith Packard keithp@keithp.com
Fyi this already got merged int Dave's tree (the unsplit version) as:
commit 1849ecb22fb3b5d57b65e7369a3957adf9f26f39 Author: Jean Delvare jdelvare@suse.de Date: Sat Jan 28 11:07:09 2012 +0100
drm/kms: Make i2c buses faster
Thanks Daniel, I just noticed this as it got merged into Linus tree last night. I had not received any ack from Dave and the git repository mentioned in MAINTAINERS is wrong so I couldn't check whether my patches were already applied or not.
Anyway, the important thing is that they are in Linus' tree now.
dri-devel@lists.freedesktop.org