All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915: Run DDC buses at 50 kbps
@ 2012-03-21 13:29 Jean Delvare
  2012-03-22 20:50 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2012-03-21 13:29 UTC (permalink / raw)
  To: dri-devel; +Cc: Eugeni Dodonov

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)

-- 
Jean Delvare
Suse L3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/i915: Run DDC buses at 50 kbps
  2012-03-21 13:29 [PATCH v2] drm/i915: Run DDC buses at 50 kbps Jean Delvare
@ 2012-03-22 20:50 ` Daniel Vetter
  2012-03-23  9:19   ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2012-03-22 20:50 UTC (permalink / raw)
  To: Jean Delvare; +Cc: dri-devel, Eugeni Dodonov

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

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/i915: Run DDC buses at 50 kbps
  2012-03-22 20:50 ` Daniel Vetter
@ 2012-03-23  9:19   ` Jean Delvare
  0 siblings, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2012-03-23  9:19 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel, Eugeni Dodonov

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.

-- 
Jean Delvare
Suse L3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-23  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 13:29 [PATCH v2] drm/i915: Run DDC buses at 50 kbps Jean Delvare
2012-03-22 20:50 ` Daniel Vetter
2012-03-23  9:19   ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.