Commit 6ab17a84 authored by Benjamin Tissoires's avatar Benjamin Tissoires Committed by Dmitry Torokhov

Input: synaptics - use dmax in input_mt_assign_slots

When tapping a clickpad with two fingers, there is a chance that the sensor
sees first only one finger, and at the next scan only the second one.  In
this case, the sensors says that there has been only one finger on the
clickpad, which moved really fast between two scans.

We can try to counter this by adding a limit to what an actual finger can
move between 2 scans.  A distance of 1cm between two scans for one finger
seems reasonable.  However, this is not really accurate because the
resolution in X and in Y differs. But heh, that's how the in-kernel
tracking works right now, and its job is quite good, even with this
approximation.

This parameter solves most of the jumps observed, not all of them however.
But this is a hardware defect, and we might not be able to get something
better without much heavier computations.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=76722Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d0542677
...@@ -67,6 +67,9 @@ ...@@ -67,6 +67,9 @@
#define X_MAX_POSITIVE 8176 #define X_MAX_POSITIVE 8176
#define Y_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 * Stuff we need even when we do not want native Synaptics support
****************************************************************************/ ****************************************************************************/
...@@ -809,7 +812,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse, ...@@ -809,7 +812,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
pos[i].y = synaptics_invert_y(hw[i]->y); 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++) { for (i = 0; i < nsemi; i++) {
input_mt_slot(dev, slot[i]); input_mt_slot(dev, slot[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment