* [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver
@ 2020-03-12 0:55 Andrew Duggan
2020-03-12 3:14 ` Peter Hutterer
2020-03-24 22:45 ` Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Duggan @ 2020-03-12 0:55 UTC (permalink / raw)
To: linux-input, linux-kernel
Cc: Andrew Duggan, Dmitry Torokhov, Paul Hollinsky,
Christopher Heiny, Lucas Stach, kernel, patchwork-lst
The previous patch "c5ccf2ad3d33 (Input: synaptics-rmi4 - switch to
reduced reporting mode)" enabled reduced reporting mode unintentionally
on some devices, if the firmware was configured with default Delta X/Y
threshold values. The result unintentionally degrade the performance of
some touchpads.
This patch checks to see that the driver is modifying the delta X/Y
thresholds before modifying the reporting mode.
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
---
drivers/input/rmi4/rmi_f11.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
index 6adea8a3e8fb..ffa39ab153f2 100644
--- a/drivers/input/rmi4/rmi_f11.c
+++ b/drivers/input/rmi4/rmi_f11.c
@@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct rmi_function *fn)
* If distance threshold values are set, switch to reduced reporting
* mode so they actually get used by the controller.
*/
- if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
- ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
+ if (sensor->axis_align.delta_x_threshold ||
+ sensor->axis_align.delta_y_threshold) {
ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver
2020-03-12 0:55 [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver Andrew Duggan
@ 2020-03-12 3:14 ` Peter Hutterer
2020-03-12 10:11 ` Lucas Stach
2020-03-24 22:45 ` Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Peter Hutterer @ 2020-03-12 3:14 UTC (permalink / raw)
To: Andrew Duggan
Cc: linux-input, linux-kernel, Dmitry Torokhov, Paul Hollinsky,
Christopher Heiny, Lucas Stach, kernel, patchwork-lst
Hi Andrew,
On Wed, Mar 11, 2020 at 05:55:49PM -0700, Andrew Duggan wrote:
> The previous patch "c5ccf2ad3d33 (Input: synaptics-rmi4 - switch to
> reduced reporting mode)" enabled reduced reporting mode unintentionally
> on some devices, if the firmware was configured with default Delta X/Y
> threshold values. The result unintentionally degrade the performance of
> some touchpads.
could this be the cause of a stuttering cursor on a P50 as well?
A recording in the issue below shows the cursor moving by ~25 units per
event, regardless of the time between those events.
https://gitlab.freedesktop.org/libinput/libinput/issues/448
thanks!
Cheers,
Peter
> This patch checks to see that the driver is modifying the delta X/Y
> thresholds before modifying the reporting mode.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
> ---
> drivers/input/rmi4/rmi_f11.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> index 6adea8a3e8fb..ffa39ab153f2 100644
> --- a/drivers/input/rmi4/rmi_f11.c
> +++ b/drivers/input/rmi4/rmi_f11.c
> @@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct rmi_function *fn)
> * If distance threshold values are set, switch to reduced reporting
> * mode so they actually get used by the controller.
> */
> - if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
> - ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
> + if (sensor->axis_align.delta_x_threshold ||
> + sensor->axis_align.delta_y_threshold) {
> ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
> ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
> }
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver
2020-03-12 3:14 ` Peter Hutterer
@ 2020-03-12 10:11 ` Lucas Stach
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2020-03-12 10:11 UTC (permalink / raw)
To: Peter Hutterer, Andrew Duggan
Cc: linux-input, linux-kernel, Dmitry Torokhov, Paul Hollinsky,
Christopher Heiny, kernel, patchwork-lst
Hi Peter,
On Do, 2020-03-12 at 13:14 +1000, Peter Hutterer wrote:
> Hi Andrew,
>
> On Wed, Mar 11, 2020 at 05:55:49PM -0700, Andrew Duggan wrote:
> > The previous patch "c5ccf2ad3d33 (Input: synaptics-rmi4 - switch to
> > reduced reporting mode)" enabled reduced reporting mode
> > unintentionally
> > on some devices, if the firmware was configured with default Delta
> > X/Y
> > threshold values. The result unintentionally degrade the
> > performance of
> > some touchpads.
>
> could this be the cause of a stuttering cursor on a P50 as well?
> A recording in the issue below shows the cursor moving by ~25 units per
> event, regardless of the time between those events.
> https://gitlab.freedesktop.org/libinput/libinput/issues/448
Yes, that's very much possible, as reduced reporting mode is about only
reporting events once they cross a predefined movement threshold.
Regards,
Lucas
> thanks!
>
> Cheers,
> Peter
>
> > This patch checks to see that the driver is modifying the delta X/Y
> > thresholds before modifying the reporting mode.
> >
> > Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
> > ---
> > drivers/input/rmi4/rmi_f11.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/input/rmi4/rmi_f11.c
> > b/drivers/input/rmi4/rmi_f11.c
> > index 6adea8a3e8fb..ffa39ab153f2 100644
> > --- a/drivers/input/rmi4/rmi_f11.c
> > +++ b/drivers/input/rmi4/rmi_f11.c
> > @@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct
> > rmi_function *fn)
> > * If distance threshold values are set, switch to reduced
> > reporting
> > * mode so they actually get used by the controller.
> > */
> > - if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
> > - ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
> > + if (sensor->axis_align.delta_x_threshold ||
> > + sensor->axis_align.delta_y_threshold) {
> > ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
> > ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
> > }
> > --
> > 2.20.1
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver
2020-03-12 0:55 [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver Andrew Duggan
2020-03-12 3:14 ` Peter Hutterer
@ 2020-03-24 22:45 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2020-03-24 22:45 UTC (permalink / raw)
To: Andrew Duggan
Cc: linux-input, linux-kernel, Paul Hollinsky, Christopher Heiny,
Lucas Stach, kernel, patchwork-lst
On Wed, Mar 11, 2020 at 05:55:49PM -0700, Andrew Duggan wrote:
> The previous patch "c5ccf2ad3d33 (Input: synaptics-rmi4 - switch to
> reduced reporting mode)" enabled reduced reporting mode unintentionally
> on some devices, if the firmware was configured with default Delta X/Y
> threshold values. The result unintentionally degrade the performance of
> some touchpads.
>
> This patch checks to see that the driver is modifying the delta X/Y
> thresholds before modifying the reporting mode.
>
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Applied, thank you.
> ---
> drivers/input/rmi4/rmi_f11.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> index 6adea8a3e8fb..ffa39ab153f2 100644
> --- a/drivers/input/rmi4/rmi_f11.c
> +++ b/drivers/input/rmi4/rmi_f11.c
> @@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct rmi_function *fn)
> * If distance threshold values are set, switch to reduced reporting
> * mode so they actually get used by the controller.
> */
> - if (ctrl->ctrl0_11[RMI_F11_DELTA_X_THRESHOLD] ||
> - ctrl->ctrl0_11[RMI_F11_DELTA_Y_THRESHOLD]) {
> + if (sensor->axis_align.delta_x_threshold ||
> + sensor->axis_align.delta_y_threshold) {
> ctrl->ctrl0_11[0] &= ~RMI_F11_REPORT_MODE_MASK;
> ctrl->ctrl0_11[0] |= RMI_F11_REPORT_MODE_REDUCED;
> }
> --
> 2.20.1
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-24 22:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 0:55 [PATCH] Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver Andrew Duggan
2020-03-12 3:14 ` Peter Hutterer
2020-03-12 10:11 ` Lucas Stach
2020-03-24 22:45 ` Dmitry Torokhov
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).