Skip to contentSkip to conversation

Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver

PATCH Applied Andrew Duggan 4 participants 4 messages Mar 12, 2020 – Mar 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: synaptics-rmi4 - Do not set reduced reporting mode thresholds are not set by the driver

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.

---
 drivers/input/rmi4/rmi_f11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f11.c +2 -2
index 6adea8a3e8fb..ffa39ab153f2 100644
@@ -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;
 	}
Signature · 1 line
2.20.1
#1 lore raw

Hi Andrew,

Quoted 5 lines · Andrew Duggan

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

Quoted 26 lines

This patch checks to see that the driver is modifying the delta X/Y thresholds before modifying the reporting mode.

---
 drivers/input/rmi4/rmi_f11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f11.c +2 -2
index 6adea8a3e8fb..ffa39ab153f2 100644
@@ -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;
 	}
Signature · 1 line
2.20.1
#2 lore raw

Hi Peter,

Quoted 12 lines · Peter Hutterer

Hi Andrew,

Quoted 8 lines · Andrew Duggan

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.

Quoted 4 lines

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

Quoted 34 lines

thanks!

Cheers,
Peter

Quoted 29 lines

This patch checks to see that the driver is modifying the delta X/Y thresholds before modifying the reporting mode.

---
 drivers/input/rmi4/rmi_f11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f11.c +0 -0
index 6adea8a3e8fb..ffa39ab153f2 100644
@@ -1203,8 +1203,8 @@ static int rmi_f11_initialize(struct
 rmi_function *fn)
 	 * If distance threshold values are set, switch to reduced

reporting

drivers/input/rmi4/rmi_f11.c +2 -2
 	 * 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;
 	}
Signature · 1 line
2.20.1
maintainer Applied
#3 lore raw
In reply to Andrew Duggan
Quoted 10 lines · Andrew Duggan

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.

Applied, thank you.

Quoted 22 lines
---
 drivers/input/rmi4/rmi_f11.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f11.c +2 -2
index 6adea8a3e8fb..ffa39ab153f2 100644
@@ -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;
 	}
Signature · 1 line
2.20.1
Signature · 1 line
Dmitry