Skip to contentSkip to conversation

i2c-designware: increase timeout of semaphore transfer

PATCH In review Oliver Neukum 3 participants 4 messages Mar 16, 2017 – Mar 20, 2017

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

PATCH 1/1 i2c-designware: increase timeout of semaphore transfer

Our testing shows the semaphore failing to be transferred on CherryTrail in about 0.5% of all cases. The existing timeout needs to be lengthened to accomodate the worst cases.

---
 drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-baytrail.c +1 -1
index 1590ad0..2d238e3 100644
@@ -21,7 +21,7 @@
 
 #include "i2c-designware-core.h"
 
-#define SEMAPHORE_TIMEOUT	100
+#define SEMAPHORE_TIMEOUT	500
 #define PUNIT_SEMAPHORE		0x7
 #define PUNIT_SEMAPHORE_BIT	BIT(0)
 #define PUNIT_SEMAPHORE_ACQUIRE	BIT(1)
Signature · 1 line
2.10.2
#1 lore raw
Quoted 5 lines · Oliver Neukum

Our testing shows the semaphore failing to be transferred on CherryTrail
in about 0.5% of all cases. The existing timeout needs to be lengthened
to accomodate the worst cases.

I think it's just a semi-hiding of real issue.

Hans?

Quoted 20 lines

---
 drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-baytrail.c +0 -0
index 1590ad0..2d238e3 100644
@@ -21,7 +21,7 @@


 #include "i2c-designware-core.h"

drivers/i2c/busses/i2c-designware-baytrail.c +1 -1
-#define SEMAPHORE_TIMEOUT	100
+#define SEMAPHORE_TIMEOUT	500

 #define PUNIT_SEMAPHORE 0x7
 #define PUNIT_SEMAPHORE_BIT BIT(0)
 #define PUNIT_SEMAPHORE_ACQUIRE BIT(1)

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
Reviewed-by
#2 lore raw

Hi,

Quoted 8 lines · Andy Shevchenko
Quoted 5 lines · Oliver Neukum

Our testing shows the semaphore failing to be transferred on CherryTrail
in about 0.5% of all cases. The existing timeout needs to be lengthened
to accomodate the worst cases.

I think it's just a semi-hiding of real issue.

I would not know what real issue, I've seen the timeout being hit sometimes too, it seems that sometimes the punit just is busy with other stuff for a while before acking the semaphore request, so I think this patch is fine:

Oliver, can you rebase this on top of:

https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail

Which is in -next now, please ? I'm sorta surprised you didn't use this is a base since your commit msg mentions cherrytrail and with that series the semaphore code is broken on cherrytrail.

Regards,

Hans

Quoted 24 lines

Hans?

Quoted 20 lines
---
 drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-baytrail.c +1 -1
index 1590ad0..2d238e3 100644
@@ -21,7 +21,7 @@
 
 #include "i2c-designware-core.h"
 
-#define SEMAPHORE_TIMEOUT	100
+#define SEMAPHORE_TIMEOUT	500
 #define PUNIT_SEMAPHORE		0x7
 #define PUNIT_SEMAPHORE_BIT	BIT(0)
 #define PUNIT_SEMAPHORE_ACQUIRE	BIT(1)
#3 lore raw

Am Freitag, den 17.03.2017, 08:35 +0100 schrieb Hans de Goede:

Quoted 6 lines

Oliver, can you rebase this on top of:

Quoted 6 lines

https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail

Which is in -next now, please ? I'm sorta surprised you didn't use this is a base since your commit msg mentions cherrytrail and with that series the semaphore code is broken on cherrytrail.

Done. I used Linus' tree specifically because it is kind of canonical. The patch is taken from an internal tree which had your patches.

Regards
Oliver