Skip to contentSkip to conversation

drm/i915: Run DDC buses at 50 kbps

PATCH In review Jean Delvare 2 participants 3 messages Mar 21, 2012 – Mar 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915: Run DDC buses at 50 kbps

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.

---
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(-)
drivers/gpu/drm/i915/intel_i2c.c +1 -1
@@ -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)
Signature · 2 lines
Jean Delvare
Suse L3
#1 lore raw
Quoted 10 lines · Jean Delvare

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.

Quoted 4 lines

Fyi this already got merged int Dave's tree (the unsplit version) as:

commit 1849ecb22fb3b5d57b65e7369a3957adf9f26f39

Author: Jean Delvare <[email protected]>
Date:   Sat Jan 28 11:07:09 2012 +0100

drm/kms: Make i2c buses faster

Cheers, Daniel

Quoted 27 lines

---
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(-)
drivers/gpu/drm/i915/intel_i2c.c +1 -1
@@ -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)
Signature · 7 lines
-- 
Jean Delvare
Suse L3
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#2 lore raw
Quoted 16 lines · Daniel Vetter
Quoted 10 lines · Jean Delvare

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.

Quoted 4 lines
Quoted 7 lines

Fyi this already got merged int Dave's tree (the unsplit version) as:

commit 1849ecb22fb3b5d57b65e7369a3957adf9f26f39

Author: Jean Delvare <[email protected]>
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.

Signature · 2 lines
Jean Delvare
Suse L3