All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i2c: tda998x: potentially faster polling for edid
@ 2014-03-03 18:01 Russell King
  2014-03-06 19:32 ` Jean-Francois Moine
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2014-03-03 18:01 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: dri-devel

One of Jean-Francois patches changed the EDID polling to once every
10ms for 10 interations, whereas the original code did 1ms for 100
interations.  This appears to cause boot-time detection to take
slightly - but noticably - longer.  Revert this change.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
Jean,

I'm not sure why you made the change along with adding IRQ support in
"drm/i2c: tda998x: use irq for connection status and EDID read" - you
didn't include any commentry as to why you made this change.  However,
we shouldn't write code assuming HZ=100 - where this kind of thing
matters, we should come up with better solutions (eg, using jiffy-based
timeouts if we want to timeout after a set period of time.)

I'm not sure whether one or other really is faster, it's just a
perception I have.  Anyway, let's just revert back to the original
code for the non-IRQ case, and maybe improve it later.

 drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 40c4f658abfb..956d857ee2c9 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1041,8 +1041,8 @@ static int read_edid_block(struct tda998x_priv *priv, uint8_t *buf, int blk)
 			return i;
 		}
 	} else {
-		for (i = 10; i > 0; i--) {
-			msleep(10);
+		for (i = 100; i > 0; i--) {
+			msleep(1);
 			ret = reg_read(priv, REG_INT_FLAGS_2);
 			if (ret < 0)
 				return ret;
-- 
1.8.3.1

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

* Re: [PATCH] drm/i2c: tda998x: potentially faster polling for edid
  2014-03-03 18:01 [PATCH] drm/i2c: tda998x: potentially faster polling for edid Russell King
@ 2014-03-06 19:32 ` Jean-Francois Moine
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Francois Moine @ 2014-03-06 19:32 UTC (permalink / raw)
  To: Russell King; +Cc: dri-devel

On Mon, 03 Mar 2014 18:01:34 +0000
Russell King <rmk+kernel@arm.linux.org.uk> wrote:

> One of Jean-Francois patches changed the EDID polling to once every
> 10ms for 10 interations, whereas the original code did 1ms for 100
> interations.  This appears to cause boot-time detection to take
> slightly - but noticably - longer.  Revert this change.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> Jean,
> 
> I'm not sure why you made the change along with adding IRQ support in
> "drm/i2c: tda998x: use irq for connection status and EDID read" - you
> didn't include any commentry as to why you made this change.  However,
> we shouldn't write code assuming HZ=100 - where this kind of thing
> matters, we should come up with better solutions (eg, using jiffy-based
> timeouts if we want to timeout after a set period of time.)
> 
> I'm not sure whether one or other really is faster, it's just a
> perception I have.  Anyway, let's just revert back to the original
> code for the non-IRQ case, and maybe improve it later.

Russell,

Sorry for the problem. I was thinking that, if you want to read quickly
the EDID , you may use the IRQ, but, if you don't use the IRQ, maybe you
have real-time constraints, and, so, reducing the wait loop could help
you.

Acked-by: Jean-Francois Moine <moinejf@free.fr>

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2014-03-06 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 18:01 [PATCH] drm/i2c: tda998x: potentially faster polling for edid Russell King
2014-03-06 19:32 ` Jean-Francois Moine

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.