[SRU] [B/D/E/Unstable] [PATCH 0/5] Fix Goodix touchpad may drop first input event

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

[SRU] [B/D/E/Unstable] [PATCH 0/5] Fix Goodix touchpad may drop first input event

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

[Impact]
If a touchpad is connected to Intel LPSS PCI device, sometimes the first
tap event can be dropped. Goodix touchpad has a rather small buffer so
the time its parent devices spend in resuming need to be small.

[Fix]
Remove Intel LPSS D3cold delay, which is the bottleneck of the
situation.

[Test]
Intel had tested the patch and the result is positive.

[Regression Potential]
Low. Intel internally tested this so it should be rather safe.

Kai-Heng Feng (5):
  Revert "UBUNTU: SAUCE: i2c: designware: add G3 3590 into i2c quirk"
  Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron 7591 into i2c
    quirk"
  Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron/Vostro 7590 into
    i2c quirk"
  Revert "UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk"
  mfd: intel-lpss: Remove D3cold delay

 drivers/i2c/busses/i2c-designware-master.c | 72 +---------------------
 drivers/mfd/intel-lpss-pci.c               |  2 +
 2 files changed, 4 insertions(+), 70 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
|

[E/Unstable] [PATCH 1/5] Revert "UBUNTU: SAUCE: i2c: designware: add G3 3590 into i2c quirk"

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

This reverts commit 6874d7c3765401ca27de5859e9c578ea703a44ba.

Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/i2c/busses/i2c-designware-master.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index af761475da7a..46b62af8b3b2 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -74,13 +74,6 @@ static const struct dmi_system_id i2c_dw_no_runtime_pm[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 7590"),
  },
  },
- {
- .ident = "Dell G3 3590",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "G3 3590"),
- },
- },
  { }
 };
 
--
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
|

[E/Unstable] [PATCH 2/5] Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron 7591 into i2c quirk"

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

This reverts commit 25947a1872c38c5066c0ca7e9edc27da6479cd6c.

Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/i2c/busses/i2c-designware-master.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 46b62af8b3b2..199412c9ac4b 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -46,13 +46,6 @@ static const struct dmi_system_id i2c_dw_no_runtime_pm[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7590"),
  },
  },
- {
- .ident = "Dell Inspiron 7591",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7591"),
- },
- },
  {
  .ident = "Dell Vostro 5390",
  .matches = {
--
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
|

[D/E/Unstable] [PATCH 3/5] Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron/Vostro 7590 into i2c quirk"

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

This reverts commit fdfff857ee0613c3a6fae86bf634fbabf0cfea1a.

Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/i2c/busses/i2c-designware-master.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 199412c9ac4b..2b0f47b20b63 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -39,13 +39,6 @@ static const struct dmi_system_id i2c_dw_no_runtime_pm[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5391"),
  },
  },
- {
- .ident = "Dell Inspiron 7590",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7590"),
- },
- },
  {
  .ident = "Dell Vostro 5390",
  .matches = {
@@ -60,13 +53,6 @@ static const struct dmi_system_id i2c_dw_no_runtime_pm[] = {
  DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 5391"),
  },
  },
- {
- .ident = "Dell Vostro 7590",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 7590"),
- },
- },
  { }
 };
 
--
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
|

[D/E/Unstable] [PATCH 4/5] Revert "UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk"

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

This reverts commit e2fedb6fddb6b1e886976cf8e97e575459fd7613.

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

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 2b0f47b20b63..d464799e40a3 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -9,7 +9,6 @@
  * 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>
@@ -23,39 +22,6 @@
 
 #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 */
@@ -458,8 +424,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
  dev_dbg(dev->dev, "%s: msgs: %d\n", __func__, num);
 
- if (!no_runtime_pm)
- pm_runtime_get_sync(dev->dev);
+ pm_runtime_get_sync(dev->dev);
 
  if (dev_WARN_ONCE(dev->dev, dev->suspended, "Transfer while suspended\n")) {
  ret = -ESHUTDOWN;
@@ -536,8 +501,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 done_nolock:
  pm_runtime_mark_last_busy(dev->dev);
- if (!no_runtime_pm)
- pm_runtime_put_autosuspend(dev->dev);
+ pm_runtime_put_autosuspend(dev->dev);
 
  return ret;
 }
@@ -769,10 +733,6 @@ 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
|

[B/D/E/Unstable] [PATCH 5/5] mfd: intel-lpss: Remove D3cold delay

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1840075

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 <[hidden email]>
Reviewed-by: Andy Shevchenko <[hidden email]>
Signed-off-by: Lee Jones <[hidden email]>
(cherry picked from commit 76380a607ba0b28627c9b4b55cd47a079a59624b linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 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 ade6e1ce5a98..e3a04929aaa3 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


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

ACK: [SRU] [B/D/E/Unstable] [PATCH 0/5] Fix Goodix touchpad may drop first input event

Connor Kuehl
In reply to this post by Kai-Heng Feng
On 8/13/19 11:56 AM, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1840075
>
> [Impact]
> If a touchpad is connected to Intel LPSS PCI device, sometimes the first
> tap event can be dropped. Goodix touchpad has a rather small buffer so
> the time its parent devices spend in resuming need to be small.
>
> [Fix]
> Remove Intel LPSS D3cold delay, which is the bottleneck of the
> situation.
>
> [Test]
> Intel had tested the patch and the result is positive.
>
> [Regression Potential]
> Low. Intel internally tested this so it should be rather safe.
>
> Kai-Heng Feng (5):
>   Revert "UBUNTU: SAUCE: i2c: designware: add G3 3590 into i2c quirk"
>   Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron 7591 into i2c
>     quirk"
>   Revert "UBUNTU: SAUCE: i2c: designware: add Inpiron/Vostro 7590 into
>     i2c quirk"
>   Revert "UBUNTU: SAUCE: i2c: designware: Add disable runtime pm quirk"
>   mfd: intel-lpss: Remove D3cold delay
>
>  drivers/i2c/busses/i2c-designware-master.c | 72 +---------------------
>  drivers/mfd/intel-lpss-pci.c               |  2 +
>  2 files changed, 4 insertions(+), 70 deletions(-)
>

With positive test results and less quirks

Acked-by: Connor Kuehl <[hidden email]>

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

ACK / APPLIED[E/Unstable]: [SRU] [B/D/E/Unstable] [PATCH 0/5] Fix Goodix touchpad may drop first input event

Seth Forshee
In reply to this post by Kai-Heng Feng
On Wed, Aug 14, 2019 at 02:56:49AM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1840075
>
> [Impact]
> If a touchpad is connected to Intel LPSS PCI device, sometimes the first
> tap event can be dropped. Goodix touchpad has a rather small buffer so
> the time its parent devices spend in resuming need to be small.
>
> [Fix]
> Remove Intel LPSS D3cold delay, which is the bottleneck of the
> situation.
>
> [Test]
> Intel had tested the patch and the result is positive.
>
> [Regression Potential]
> Low. Intel internally tested this so it should be rather safe.

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

Applied to eoan/master-next and unstable/master, thanks!

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