Backport fixes for synaptic 3 finger tap (rhbz 1212230)
This commit is contained in:
parent
5f515ca357
commit
591c381e9c
|
@ -0,0 +1,43 @@
|
|||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Sun, 5 Apr 2015 13:44:12 -0700
|
||||
Subject: [PATCH] Input: Revert "Revert "synaptics - use dmax in
|
||||
input_mt_assign_slots""
|
||||
|
||||
This reverts commit 09d042a2eb90 ("Revert "Input: synaptics - use dmax in
|
||||
input_mt_assign_slots"")
|
||||
|
||||
Now that balanced slots assignments seem to be fixed, let's re-enable the
|
||||
use in synaptics.c and wait for users to complain if there are still
|
||||
problems.
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Acked-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Henrik Rydberg <rydberg@bitmath.org
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 907ac9bdd763..63f001530d4c 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -67,6 +67,9 @@
|
||||
#define X_MAX_POSITIVE 8176
|
||||
#define Y_MAX_POSITIVE 8176
|
||||
|
||||
+/* maximum ABS_MT_POSITION displacement (in mm) */
|
||||
+#define DMAX 10
|
||||
+
|
||||
/*****************************************************************************
|
||||
* Stuff we need even when we do not want native Synaptics support
|
||||
****************************************************************************/
|
||||
@@ -922,7 +925,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
|
||||
pos[i].y = synaptics_invert_y(hw[i]->y);
|
||||
}
|
||||
|
||||
- input_mt_assign_slots(dev, slot, pos, nsemi, 0);
|
||||
+ input_mt_assign_slots(dev, slot, pos, nsemi, DMAX * priv->x_res);
|
||||
|
||||
for (i = 0; i < nsemi; i++) {
|
||||
input_mt_slot(dev, slot[i]);
|
|
@ -0,0 +1,34 @@
|
|||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Sun, 5 Apr 2015 13:45:04 -0700
|
||||
Subject: [PATCH] Input: synaptics - allocate 3 slots to keep stability in
|
||||
image sensors
|
||||
|
||||
When slowly dropping 1, 2 and then 3 fingers on an image sensor touchpad,
|
||||
we can see that the first finger gets reassigned a new slot while it did
|
||||
not move. This is due to the kernel tracking algorithm which can not assign
|
||||
correctly the 3 touches, being out of slots.
|
||||
|
||||
Declaring that we support 3 slots allows to actually forward:
|
||||
slot 0 -> down, slot 1 -> up, slot 2 -> down
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Acked-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Acked-by: Henrik Rydberg <rydberg@bitmath.org
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 63f001530d4c..41c9facc891b 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -1194,7 +1194,7 @@ static void set_input_params(struct psmouse *psmouse,
|
||||
ABS_MT_POSITION_Y);
|
||||
/* Image sensors can report per-contact pressure */
|
||||
input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
|
||||
- input_mt_init_slots(dev, 2, INPUT_MT_POINTER | INPUT_MT_TRACK);
|
||||
+ input_mt_init_slots(dev, 3, INPUT_MT_POINTER | INPUT_MT_TRACK);
|
||||
|
||||
/* Image sensors can signal 4 and 5 finger clicks */
|
||||
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
|
|
@ -0,0 +1,47 @@
|
|||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Thu, 16 Apr 2015 13:01:46 -0400
|
||||
Subject: [PATCH] Input - synaptics: pin 3 touches when the firmware reports 3
|
||||
fingers
|
||||
|
||||
Synaptics PS/2 touchpad can send only 2 touches in a report. They can
|
||||
detect 4 or 5 and this information is valuable.
|
||||
|
||||
In commit 63c4fda (Input: synaptics - allocate 3 slots to keep stability
|
||||
in image sensors), we allocate 3 slots, but we still continue to report
|
||||
the 2 available fingers. That means that the client sees 2 used slots while
|
||||
there is a total of 3 fingers advertised by BTN_TOOL_TRIPLETAP.
|
||||
|
||||
For old kernels this is not a problem because max_slots was 2 and libinput/
|
||||
xorg-synaptics knew how to deal with that. Now that max_slot is 3, the
|
||||
clients ignore BTN_TOOL_TRIPLETAP and count the actual used slots (so 2).
|
||||
It then gets confused when receiving the BTN_TOOL_TRIPLETAP and DOUBLETAP
|
||||
information, and goes wild.
|
||||
|
||||
We can pin the 3 slots until we get a total number of fingers below 2.
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1212230
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 41c9facc891b..ef91cbd03f92 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -935,6 +935,14 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
|
||||
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
|
||||
}
|
||||
|
||||
+ /* keep (slot count <= num_fingers) by pinning all slots */
|
||||
+ if (num_fingers >= 3) {
|
||||
+ for (i = 0; i < 3; i++) {
|
||||
+ input_mt_slot(dev, i);
|
||||
+ input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
input_mt_drop_unused(dev);
|
||||
|
||||
/* Don't use active slot count to generate BTN_TOOL events. */
|
11
kernel.spec
11
kernel.spec
|
@ -694,6 +694,11 @@ Patch26235: Btrfs-fix-range-cloning-when-same-inode-used-as-sour.patch
|
|||
Patch26236: Btrfs-fix-uninit-variable-in-clone-ioctl.patch
|
||||
Patch26237: Btrfs-fix-regression-in-raid-level-conversion.patch
|
||||
|
||||
#rhbz 1212230
|
||||
Patch26238: Input-Revert-Revert-synaptics-use-dmax-in-input_mt_a.patch
|
||||
Patch26239: Input-synaptics-allocate-3-slots-to-keep-stability-i.patch
|
||||
Patch26240: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
@ -1503,6 +1508,11 @@ ApplyPatch Btrfs-fix-range-cloning-when-same-inode-used-as-sour.patch
|
|||
ApplyPatch Btrfs-fix-uninit-variable-in-clone-ioctl.patch
|
||||
ApplyPatch Btrfs-fix-regression-in-raid-level-conversion.patch
|
||||
|
||||
#rhbz 1212230
|
||||
ApplyPatch Input-Revert-Revert-synaptics-use-dmax-in-input_mt_a.patch
|
||||
ApplyPatch Input-synaptics-allocate-3-slots-to-keep-stability-i.patch
|
||||
ApplyPatch Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
%endif
|
||||
|
@ -2354,6 +2364,7 @@ fi
|
|||
#
|
||||
%changelog
|
||||
* Thu Jun 11 2015 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
- Backport fixes for synaptic 3 finger tap (rhbz 1212230)
|
||||
- Backport btrfs fixes queued for stable (rhbz 1217191)
|
||||
|
||||
* Tue Jun 09 2015 Josh Boyer <jwboyer@fedoraproject.org>
|
||||
|
|
Loading…
Reference in New Issue