linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c-designware: increase timeout of semaphore transfer
@ 2017-03-16 16:24 Oliver Neukum
  2017-03-16 16:35 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2017-03-16 16:24 UTC (permalink / raw)
  To: jarkko.nikula, andriy.shevchenko, mika.westerberg, linux-i2c,
	hdegoede
  Cc: 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.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c b/drivers/i2c/busses/i2c-designware-baytrail.c
index 1590ad0..2d238e3 100644
--- a/drivers/i2c/busses/i2c-designware-baytrail.c
+++ b/drivers/i2c/busses/i2c-designware-baytrail.c
@@ -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)
-- 
2.10.2

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-16 16:24 [PATCH] i2c-designware: increase timeout of semaphore transfer Oliver Neukum
@ 2017-03-16 16:35 ` Andy Shevchenko
  2017-03-17  7:35   ` Hans de Goede
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-03-16 16:35 UTC (permalink / raw)
  To: Oliver Neukum, jarkko.nikula, mika.westerberg, linux-i2c,
	hdegoede

On Thu, 2017-03-16 at 17:24 +0100, Oliver Neukum wrote:
> 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?

> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
>  drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c
> b/drivers/i2c/busses/i2c-designware-baytrail.c
> index 1590ad0..2d238e3 100644
> --- a/drivers/i2c/busses/i2c-designware-baytrail.c
> +++ b/drivers/i2c/busses/i2c-designware-baytrail.c
> @@ -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)

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-16 16:35 ` Andy Shevchenko
@ 2017-03-17  7:35   ` Hans de Goede
  2017-03-20 13:39     ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Hans de Goede @ 2017-03-17  7:35 UTC (permalink / raw)
  To: Andy Shevchenko, Oliver Neukum, jarkko.nikula, mika.westerberg,
	linux-i2c, Wolfram Sang

Hi,

On 16-03-17 17:35, Andy Shevchenko wrote:
> On Thu, 2017-03-16 at 17:24 +0100, Oliver Neukum wrote:
>> 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:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

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



>
> Hans?
>
>>
>> Signed-off-by: Oliver Neukum <oneukum@suse.com>
>> ---
>>  drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c
>> b/drivers/i2c/busses/i2c-designware-baytrail.c
>> index 1590ad0..2d238e3 100644
>> --- a/drivers/i2c/busses/i2c-designware-baytrail.c
>> +++ b/drivers/i2c/busses/i2c-designware-baytrail.c
>> @@ -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)
>

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

* [PATCH] i2c-designware: increase timeout of semaphore transfer
@ 2017-03-20 13:37 Oliver Neukum
  2017-03-20 13:39 ` Hans de Goede
  2017-03-22  8:48 ` Wolfram Sang
  0 siblings, 2 replies; 8+ messages in thread
From: Oliver Neukum @ 2017-03-20 13:37 UTC (permalink / raw)
  To: jarkko.nikula, andriy.shevchenko, mika.westerberg, linux-i2c,
	hdegoede
  Cc: 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.

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

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c b/drivers/i2c/busses/i2c-designware-baytrail.c
index 1749a0f..c0e7c88 100644
--- a/drivers/i2c/busses/i2c-designware-baytrail.c
+++ b/drivers/i2c/busses/i2c-designware-baytrail.c
@@ -22,7 +22,7 @@
 
 #include "i2c-designware-core.h"
 
-#define SEMAPHORE_TIMEOUT	100
+#define SEMAPHORE_TIMEOUT	500
 #define PUNIT_SEMAPHORE		0x7
 #define PUNIT_SEMAPHORE_CHT	0x10e
 #define PUNIT_SEMAPHORE_BIT	BIT(0)
-- 
2.10.2

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-17  7:35   ` Hans de Goede
@ 2017-03-20 13:39     ` Oliver Neukum
  0 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2017-03-20 13:39 UTC (permalink / raw)
  To: Hans de Goede, Andy Shevchenko, jarkko.nikula, mika.westerberg,
	Wolfram Sang, linux-i2c

Am Freitag, den 17.03.2017, 08:35 +0100 schrieb Hans de Goede:
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> 
> 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.

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

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-20 13:37 Oliver Neukum
@ 2017-03-20 13:39 ` Hans de Goede
  2017-03-20 13:52   ` Jarkko Nikula
  2017-03-22  8:48 ` Wolfram Sang
  1 sibling, 1 reply; 8+ messages in thread
From: Hans de Goede @ 2017-03-20 13:39 UTC (permalink / raw)
  To: Oliver Neukum, jarkko.nikula, andriy.shevchenko, mika.westerberg,
	linux-i2c

Hi,

On 20-03-17 14:37, Oliver Neukum wrote:
> 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.
>
> V2: Rebased on https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail
>
> Signed-off-by: Oliver Neukum <oneukum@suse.com>

Looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>  drivers/i2c/busses/i2c-designware-baytrail.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-baytrail.c b/drivers/i2c/busses/i2c-designware-baytrail.c
> index 1749a0f..c0e7c88 100644
> --- a/drivers/i2c/busses/i2c-designware-baytrail.c
> +++ b/drivers/i2c/busses/i2c-designware-baytrail.c
> @@ -22,7 +22,7 @@
>
>  #include "i2c-designware-core.h"
>
> -#define SEMAPHORE_TIMEOUT	100
> +#define SEMAPHORE_TIMEOUT	500
>  #define PUNIT_SEMAPHORE		0x7
>  #define PUNIT_SEMAPHORE_CHT	0x10e
>  #define PUNIT_SEMAPHORE_BIT	BIT(0)
>

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-20 13:39 ` Hans de Goede
@ 2017-03-20 13:52   ` Jarkko Nikula
  0 siblings, 0 replies; 8+ messages in thread
From: Jarkko Nikula @ 2017-03-20 13:52 UTC (permalink / raw)
  To: Hans de Goede, Oliver Neukum, andriy.shevchenko, mika.westerberg,
	linux-i2c

On 03/20/17 15:39, Hans de Goede wrote:
> Hi,
>
> On 20-03-17 14:37, Oliver Neukum wrote:
>> 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.
>>
>> V2: Rebased on
>> https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail
>>
>>
>> Signed-off-by: Oliver Neukum <oneukum@suse.com>
>
> Looks good to me:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

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

* Re: [PATCH] i2c-designware: increase timeout of semaphore transfer
  2017-03-20 13:37 Oliver Neukum
  2017-03-20 13:39 ` Hans de Goede
@ 2017-03-22  8:48 ` Wolfram Sang
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2017-03-22  8:48 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: jarkko.nikula, andriy.shevchenko, mika.westerberg, linux-i2c,
	hdegoede

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

On Mon, Mar 20, 2017 at 02:37:30PM +0100, Oliver Neukum wrote:
> 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.
> 
> V2: Rebased on https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>

Fixed this checkpatch issue:

WARNING: 'accomodate' may be misspelled - perhaps 'accommodate'?

and applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-03-22  8:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 16:24 [PATCH] i2c-designware: increase timeout of semaphore transfer Oliver Neukum
2017-03-16 16:35 ` Andy Shevchenko
2017-03-17  7:35   ` Hans de Goede
2017-03-20 13:39     ` Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2017-03-20 13:37 Oliver Neukum
2017-03-20 13:39 ` Hans de Goede
2017-03-20 13:52   ` Jarkko Nikula
2017-03-22  8:48 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).