[PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1833484

[Impact]
Dell machines which uses goodix touchpad IC emit double click event
while touching the touchpad if designware i2c adapter is in runtime
suspend.

Goodix re-assert the interrupt if host doesn't read the data within
100ms and designware takes a longer time to wake up from runtime
suspend. In the case, it got a second interrupt during resuming, so
it thinks it's a double click.

[Fix]
There is no simple way to fix this, it's a firmware issue and goodix
agrees to fix this in their firmware on next release, but this issue is
still affects the machines that don't come with an updated firmware. So,
add a quirk to mark those machines and avoid the designware from entering
runtime suspend.

[Regression Potential]
Low, it only affects the listed machines, and prevent designware from
entering runtime suspend impacts the power consumption little or none
during short or long idle.

[MISC]
This patch contains on going product name, so set it as SAUCE patch,
will submit it to upstream and to Bionic kernel later.

AceLan Kao (1):
  UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk

 drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
 1 file changed, 42 insertions(+), 2 deletions(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 1/1][SRU][D][OEM-OSP1-B] UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk

AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1833484

Dell machines come with goodix touchpad IC suffer from the double click
issue if the Designware I2C adapter enters runtime suspend.

It's because the goodix re-assert the interrupt if host doesn't read the
data within 100ms and desiginware takes a longer time to wake up from
runtime suspend. In the case, it got a second interrupt during
resuming, so it thinks it's a double click.

There is no simple way to fix this, it's a firmware issue and goodix
agrees to fix this in their firmware on next release, but this issue is
still affects the machines that don't come with an updated firmware. So,
add a quirk to mark those machines and avoid the designware to enter
runtime suspend.

Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index bb8e3f149979..6ff73b20dc26 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -9,6 +9,7 @@
  * Copyright (C) 2009 Provigent Ltd.
  */
 #include <linux/delay.h>
+#include <linux/dmi.h>
 #include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/export.h>
@@ -22,6 +23,39 @@
 
 #include "i2c-designware-core.h"
 
+static int no_runtime_pm;
+static const struct dmi_system_id i2c_dw_no_runtime_pm[] = {
+ {
+ .ident = "Dell Inspiron 5390",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5390"),
+ },
+ },
+ {
+ .ident = "Dell Inspiron 5391",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5391"),
+ },
+ },
+ {
+ .ident = "Dell Vostro 5390",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 5390"),
+ },
+ },
+ {
+ .ident = "Dell Vostro 5391",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 5391"),
+ },
+ },
+ { }
+};
+
 static void i2c_dw_configure_fifo_master(struct dw_i2c_dev *dev)
 {
  /* Configure Tx/Rx FIFO threshold levels */
@@ -424,7 +458,8 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
  dev_dbg(dev->dev, "%s: msgs: %d\n", __func__, num);
 
- pm_runtime_get_sync(dev->dev);
+ if (!no_runtime_pm)
+ pm_runtime_get_sync(dev->dev);
 
  if (dev->suspended) {
  dev_err(dev->dev, "Error %s call while suspended\n", __func__);
@@ -502,7 +537,8 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 done_nolock:
  pm_runtime_mark_last_busy(dev->dev);
- pm_runtime_put_autosuspend(dev->dev);
+ if (!no_runtime_pm)
+ pm_runtime_put_autosuspend(dev->dev);
 
  return ret;
 }
@@ -734,6 +770,10 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
  if (ret)
  return ret;
 
+ no_runtime_pm = dmi_check_system(i2c_dw_no_runtime_pm);
+ if (no_runtime_pm)
+ __pm_runtime_disable(dev->dev, true);
+
  /*
  * Increment PM usage count during adapter registration in order to
  * avoid possible spurious runtime suspend when adapter device is
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/APPLIED [OEM-OSP1-B] Re: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

Timo Aaltonen-6
In reply to this post by AceLan Kao
On 20.6.2019 8.06, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1833484
>
> [Impact]
> Dell machines which uses goodix touchpad IC emit double click event
> while touching the touchpad if designware i2c adapter is in runtime
> suspend.
>
> Goodix re-assert the interrupt if host doesn't read the data within
> 100ms and designware takes a longer time to wake up from runtime
> suspend. In the case, it got a second interrupt during resuming, so
> it thinks it's a double click.

applied to osp1 oem-next, thanks


--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/cmt / APPLIED[Unstable]: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

Seth Forshee
In reply to this post by AceLan Kao
On Thu, Jun 20, 2019 at 01:06:58PM +0800, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1833484
>
> [Impact]
> Dell machines which uses goodix touchpad IC emit double click event
> while touching the touchpad if designware i2c adapter is in runtime
> suspend.
>
> Goodix re-assert the interrupt if host doesn't read the data within
> 100ms and designware takes a longer time to wake up from runtime
> suspend. In the case, it got a second interrupt during resuming, so
> it thinks it's a double click.
>
> [Fix]
> There is no simple way to fix this, it's a firmware issue and goodix
> agrees to fix this in their firmware on next release, but this issue is
> still affects the machines that don't come with an updated firmware. So,
> add a quirk to mark those machines and avoid the designware from entering
> runtime suspend.
>
> [Regression Potential]
> Low, it only affects the listed machines, and prevent designware from
> entering runtime suspend impacts the power consumption little or none
> during short or long idle.
>
> [MISC]
> This patch contains on going product name, so set it as SAUCE patch,
> will submit it to upstream and to Bionic kernel later.

I find the implementation kind of clumsy, but it keeps the patch simpler
than it might otherwise be. Limited to specific hardware so regression
potential is low:

Acked-by: Seth Forshee <[hidden email]>

Please remember to include unstable when necessary! Applied to
unstable/master, thanks.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED(D)/cmt: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

Khaled Elmously
In reply to this post by AceLan Kao
Applied to Disco - but thd bug was already set to "Fix committed" for Disco.


On 2019-06-20 13:06:58 , AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1833484
>
> [Impact]
> Dell machines which uses goodix touchpad IC emit double click event
> while touching the touchpad if designware i2c adapter is in runtime
> suspend.
>
> Goodix re-assert the interrupt if host doesn't read the data within
> 100ms and designware takes a longer time to wake up from runtime
> suspend. In the case, it got a second interrupt during resuming, so
> it thinks it's a double click.
>
> [Fix]
> There is no simple way to fix this, it's a firmware issue and goodix
> agrees to fix this in their firmware on next release, but this issue is
> still affects the machines that don't come with an updated firmware. So,
> add a quirk to mark those machines and avoid the designware from entering
> runtime suspend.
>
> [Regression Potential]
> Low, it only affects the listed machines, and prevent designware from
> entering runtime suspend impacts the power consumption little or none
> during short or long idle.
>
> [MISC]
> This patch contains on going product name, so set it as SAUCE patch,
> will submit it to upstream and to Bionic kernel later.
>
> AceLan Kao (1):
>   UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk
>
>  drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
>  1 file changed, 42 insertions(+), 2 deletions(-)
>
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(D)/cmt: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

AceLan Kao
Questions, I thought after I submit the patch, I should set the bug
state to "Fix committed", no?

Khaled Elmously <[hidden email]> 於 2019年6月28日 週五 上午11:50寫道:

>
> Applied to Disco - but thd bug was already set to "Fix committed" for Disco.
>
>
> On 2019-06-20 13:06:58 , AceLan Kao wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1833484
> >
> > [Impact]
> > Dell machines which uses goodix touchpad IC emit double click event
> > while touching the touchpad if designware i2c adapter is in runtime
> > suspend.
> >
> > Goodix re-assert the interrupt if host doesn't read the data within
> > 100ms and designware takes a longer time to wake up from runtime
> > suspend. In the case, it got a second interrupt during resuming, so
> > it thinks it's a double click.
> >
> > [Fix]
> > There is no simple way to fix this, it's a firmware issue and goodix
> > agrees to fix this in their firmware on next release, but this issue is
> > still affects the machines that don't come with an updated firmware. So,
> > add a quirk to mark those machines and avoid the designware from entering
> > runtime suspend.
> >
> > [Regression Potential]
> > Low, it only affects the listed machines, and prevent designware from
> > entering runtime suspend impacts the power consumption little or none
> > during short or long idle.
> >
> > [MISC]
> > This patch contains on going product name, so set it as SAUCE patch,
> > will submit it to upstream and to Bionic kernel later.
> >
> > AceLan Kao (1):
> >   UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk
> >
> >  drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
> >  1 file changed, 42 insertions(+), 2 deletions(-)
> >
> > --
> > 2.17.1
> >
> >
> > --
> > kernel-team mailing list
> > [hidden email]
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(D)/cmt: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

Khaled Elmously
I believe it is considered "fix committed" only once it's applied to the repo, not just submitted to the list.



On 2019-07-01 10:06:01 , AceLan Kao wrote:

> Questions, I thought after I submit the patch, I should set the bug
> state to "Fix committed", no?
>
> Khaled Elmously <[hidden email]> 於 2019年6月28日 週五 上午11:50寫道:
> >
> > Applied to Disco - but thd bug was already set to "Fix committed" for Disco.
> >
> >
> > On 2019-06-20 13:06:58 , AceLan Kao wrote:
> > > BugLink: https://bugs.launchpad.net/bugs/1833484
> > >
> > > [Impact]
> > > Dell machines which uses goodix touchpad IC emit double click event
> > > while touching the touchpad if designware i2c adapter is in runtime
> > > suspend.
> > >
> > > Goodix re-assert the interrupt if host doesn't read the data within
> > > 100ms and designware takes a longer time to wake up from runtime
> > > suspend. In the case, it got a second interrupt during resuming, so
> > > it thinks it's a double click.
> > >
> > > [Fix]
> > > There is no simple way to fix this, it's a firmware issue and goodix
> > > agrees to fix this in their firmware on next release, but this issue is
> > > still affects the machines that don't come with an updated firmware. So,
> > > add a quirk to mark those machines and avoid the designware from entering
> > > runtime suspend.
> > >
> > > [Regression Potential]
> > > Low, it only affects the listed machines, and prevent designware from
> > > entering runtime suspend impacts the power consumption little or none
> > > during short or long idle.
> > >
> > > [MISC]
> > > This patch contains on going product name, so set it as SAUCE patch,
> > > will submit it to upstream and to Bionic kernel later.
> > >
> > > AceLan Kao (1):
> > >   UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk
> > >
> > >  drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
> > >  1 file changed, 42 insertions(+), 2 deletions(-)
> > >
> > > --
> > > 2.17.1
> > >
> > >
> > > --
> > > kernel-team mailing list
> > > [hidden email]
> > > https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(D)/cmt: [PATCH v2 0/1][D][OEM-OSP1-B]Sometimes touchpad automatically trigger double click

Stefan Bader-2
In reply to this post by AceLan Kao
On 01.07.19 04:06, AceLan Kao wrote:
> Questions, I thought after I submit the patch, I should set the bug
> state to "Fix committed", no?

No, we set the "fix committed" status once it has been reviewed and actually
applied to the kernel tree. That is what the APPLIED mails confirm.

-Stefan

>
> Khaled Elmously <[hidden email]> 於 2019年6月28日 週五 上午11:50寫道:
>>
>> Applied to Disco - but thd bug was already set to "Fix committed" for Disco.
>>
>>
>> On 2019-06-20 13:06:58 , AceLan Kao wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1833484
>>>
>>> [Impact]
>>> Dell machines which uses goodix touchpad IC emit double click event
>>> while touching the touchpad if designware i2c adapter is in runtime
>>> suspend.
>>>
>>> Goodix re-assert the interrupt if host doesn't read the data within
>>> 100ms and designware takes a longer time to wake up from runtime
>>> suspend. In the case, it got a second interrupt during resuming, so
>>> it thinks it's a double click.
>>>
>>> [Fix]
>>> There is no simple way to fix this, it's a firmware issue and goodix
>>> agrees to fix this in their firmware on next release, but this issue is
>>> still affects the machines that don't come with an updated firmware. So,
>>> add a quirk to mark those machines and avoid the designware from entering
>>> runtime suspend.
>>>
>>> [Regression Potential]
>>> Low, it only affects the listed machines, and prevent designware from
>>> entering runtime suspend impacts the power consumption little or none
>>> during short or long idle.
>>>
>>> [MISC]
>>> This patch contains on going product name, so set it as SAUCE patch,
>>> will submit it to upstream and to Bionic kernel later.
>>>
>>> AceLan Kao (1):
>>>   UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk
>>>
>>>  drivers/i2c/busses/i2c-designware-master.c | 44 +++++++++++++++++++++-
>>>  1 file changed, 42 insertions(+), 2 deletions(-)
>>>
>>> --
>>> 2.17.1
>>>
>>>
>>> --
>>> kernel-team mailing list
>>> [hidden email]
>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment