linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: intel-lpss: Remove D3cold delay
@ 2019-07-05  4:55 Kai-Heng Feng
  2019-07-09 11:46 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kai-Heng Feng @ 2019-07-05  4:55 UTC (permalink / raw)
  To: lee.jones
  Cc: jarkko.nikula, mika.westerberg, andriy.shevchenko, linux-kernel,
	Kai-Heng Feng

Goodix touchpad may drop its first couple input events when
i2c-designware-platdrv and intel-lpss it connects to took too long to
runtime resume from runtime suspended state.

This issue happens becuase the touchpad has a rather small buffer to
store up to 13 input events, so if the host doesn't read those events in
time (i.e. runtime resume takes too long), events are dropped from the
touchpad's buffer.

The bottleneck is D3cold delay it waits when transitioning from D3cold
to D0, hence remove the delay to make the resume faster. I've tested
some systems with intel-lpss and haven't seen any regression.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202683
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/mfd/intel-lpss-pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index aed2c0447966..3c271b14e7c6 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -35,6 +35,8 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
 	info->mem = &pdev->resource[0];
 	info->irq = pdev->irq;
 
+	pdev->d3cold_delay = 0;
+
 	/* Probably it is enough to set this for iDMA capable devices only */
 	pci_set_master(pdev);
 	pci_try_set_mwi(pdev);
-- 
2.17.1


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

* Re: [PATCH] mfd: intel-lpss: Remove D3cold delay
  2019-07-05  4:55 [PATCH] mfd: intel-lpss: Remove D3cold delay Kai-Heng Feng
@ 2019-07-09 11:46 ` Andy Shevchenko
  2019-07-25 12:05   ` Lee Jones
  2019-07-25 13:43 ` Andy Shevchenko
  2019-08-12  8:12 ` Lee Jones
  2 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2019-07-09 11:46 UTC (permalink / raw)
  To: Kai-Heng Feng; +Cc: lee.jones, jarkko.nikula, mika.westerberg, linux-kernel

On Fri, Jul 05, 2019 at 12:55:03PM +0800, Kai-Heng Feng wrote:
> Goodix touchpad may drop its first couple input events when
> i2c-designware-platdrv and intel-lpss it connects to took too long to
> runtime resume from runtime suspended state.
> 
> This issue happens becuase the touchpad has a rather small buffer to
> store up to 13 input events, so if the host doesn't read those events in
> time (i.e. runtime resume takes too long), events are dropped from the
> touchpad's buffer.
> 
> The bottleneck is D3cold delay it waits when transitioning from D3cold
> to D0, hence remove the delay to make the resume faster. I've tested
> some systems with intel-lpss and haven't seen any regression.

Thank you for the patch. I took it to our internal testing and will tell
the result within couple of weeks.

> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202683
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/mfd/intel-lpss-pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
> index aed2c0447966..3c271b14e7c6 100644
> --- a/drivers/mfd/intel-lpss-pci.c
> +++ b/drivers/mfd/intel-lpss-pci.c
> @@ -35,6 +35,8 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
>  	info->mem = &pdev->resource[0];
>  	info->irq = pdev->irq;
>  
> +	pdev->d3cold_delay = 0;
> +
>  	/* Probably it is enough to set this for iDMA capable devices only */
>  	pci_set_master(pdev);
>  	pci_try_set_mwi(pdev);
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] mfd: intel-lpss: Remove D3cold delay
  2019-07-09 11:46 ` Andy Shevchenko
@ 2019-07-25 12:05   ` Lee Jones
  2019-07-25 13:42     ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2019-07-25 12:05 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Kai-Heng Feng, jarkko.nikula, mika.westerberg, linux-kernel

On Tue, 09 Jul 2019, Andy Shevchenko wrote:

> On Fri, Jul 05, 2019 at 12:55:03PM +0800, Kai-Heng Feng wrote:
> > Goodix touchpad may drop its first couple input events when
> > i2c-designware-platdrv and intel-lpss it connects to took too long to
> > runtime resume from runtime suspended state.
> > 
> > This issue happens becuase the touchpad has a rather small buffer to
> > store up to 13 input events, so if the host doesn't read those events in
> > time (i.e. runtime resume takes too long), events are dropped from the
> > touchpad's buffer.
> > 
> > The bottleneck is D3cold delay it waits when transitioning from D3cold
> > to D0, hence remove the delay to make the resume faster. I've tested
> > some systems with intel-lpss and haven't seen any regression.
> 
> Thank you for the patch. I took it to our internal testing and will tell
> the result within couple of weeks.

Any news?

> > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202683
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >  drivers/mfd/intel-lpss-pci.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
> > index aed2c0447966..3c271b14e7c6 100644
> > --- a/drivers/mfd/intel-lpss-pci.c
> > +++ b/drivers/mfd/intel-lpss-pci.c
> > @@ -35,6 +35,8 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
> >  	info->mem = &pdev->resource[0];
> >  	info->irq = pdev->irq;
> >  
> > +	pdev->d3cold_delay = 0;
> > +
> >  	/* Probably it is enough to set this for iDMA capable devices only */
> >  	pci_set_master(pdev);
> >  	pci_try_set_mwi(pdev);
> 

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: intel-lpss: Remove D3cold delay
  2019-07-25 12:05   ` Lee Jones
@ 2019-07-25 13:42     ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2019-07-25 13:42 UTC (permalink / raw)
  To: Lee Jones; +Cc: Kai-Heng Feng, jarkko.nikula, mika.westerberg, linux-kernel

On Thu, Jul 25, 2019 at 01:05:54PM +0100, Lee Jones wrote:
> On Tue, 09 Jul 2019, Andy Shevchenko wrote:
> 
> > On Fri, Jul 05, 2019 at 12:55:03PM +0800, Kai-Heng Feng wrote:
> > > Goodix touchpad may drop its first couple input events when
> > > i2c-designware-platdrv and intel-lpss it connects to took too long to
> > > runtime resume from runtime suspended state.
> > > 
> > > This issue happens becuase the touchpad has a rather small buffer to
> > > store up to 13 input events, so if the host doesn't read those events in
> > > time (i.e. runtime resume takes too long), events are dropped from the
> > > touchpad's buffer.
> > > 
> > > The bottleneck is D3cold delay it waits when transitioning from D3cold
> > > to D0, hence remove the delay to make the resume faster. I've tested
> > > some systems with intel-lpss and haven't seen any regression.
> > 
> > Thank you for the patch. I took it to our internal testing and will tell
> > the result within couple of weeks.
> 
> Any news?

No bug reports, no negative feedback, I think we may proceed with it.
Thanks!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] mfd: intel-lpss: Remove D3cold delay
  2019-07-05  4:55 [PATCH] mfd: intel-lpss: Remove D3cold delay Kai-Heng Feng
  2019-07-09 11:46 ` Andy Shevchenko
@ 2019-07-25 13:43 ` Andy Shevchenko
  2019-08-12  8:12 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2019-07-25 13:43 UTC (permalink / raw)
  To: Kai-Heng Feng; +Cc: lee.jones, jarkko.nikula, mika.westerberg, linux-kernel

On Fri, Jul 05, 2019 at 12:55:03PM +0800, Kai-Heng Feng wrote:
> Goodix touchpad may drop its first couple input events when
> i2c-designware-platdrv and intel-lpss it connects to took too long to
> runtime resume from runtime suspended state.
> 
> This issue happens becuase the touchpad has a rather small buffer to
> store up to 13 input events, so if the host doesn't read those events in
> time (i.e. runtime resume takes too long), events are dropped from the
> touchpad's buffer.
> 
> The bottleneck is D3cold delay it waits when transitioning from D3cold
> to D0, hence remove the delay to make the resume faster. I've tested
> some systems with intel-lpss and haven't seen any regression.
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202683
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/mfd/intel-lpss-pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
> index aed2c0447966..3c271b14e7c6 100644
> --- a/drivers/mfd/intel-lpss-pci.c
> +++ b/drivers/mfd/intel-lpss-pci.c
> @@ -35,6 +35,8 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
>  	info->mem = &pdev->resource[0];
>  	info->irq = pdev->irq;
>  
> +	pdev->d3cold_delay = 0;
> +
>  	/* Probably it is enough to set this for iDMA capable devices only */
>  	pci_set_master(pdev);
>  	pci_try_set_mwi(pdev);
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] mfd: intel-lpss: Remove D3cold delay
  2019-07-05  4:55 [PATCH] mfd: intel-lpss: Remove D3cold delay Kai-Heng Feng
  2019-07-09 11:46 ` Andy Shevchenko
  2019-07-25 13:43 ` Andy Shevchenko
@ 2019-08-12  8:12 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2019-08-12  8:12 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: jarkko.nikula, mika.westerberg, andriy.shevchenko, linux-kernel

On Fri, 05 Jul 2019, Kai-Heng Feng wrote:

> Goodix touchpad may drop its first couple input events when
> i2c-designware-platdrv and intel-lpss it connects to took too long to
> runtime resume from runtime suspended state.
> 
> This issue happens becuase the touchpad has a rather small buffer to
> store up to 13 input events, so if the host doesn't read those events in
> time (i.e. runtime resume takes too long), events are dropped from the
> touchpad's buffer.
> 
> The bottleneck is D3cold delay it waits when transitioning from D3cold
> to D0, hence remove the delay to make the resume faster. I've tested
> some systems with intel-lpss and haven't seen any regression.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202683
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/mfd/intel-lpss-pci.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2019-08-12  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05  4:55 [PATCH] mfd: intel-lpss: Remove D3cold delay Kai-Heng Feng
2019-07-09 11:46 ` Andy Shevchenko
2019-07-25 12:05   ` Lee Jones
2019-07-25 13:42     ` Andy Shevchenko
2019-07-25 13:43 ` Andy Shevchenko
2019-08-12  8:12 ` Lee Jones

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).