提交 4f56ce92 编写于 作者: H Henrik Rydberg

Input: synaptics - ignore bogus mt packet

In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes
sends a final main packet with x == 1. Since the normal values are above
1472, this is clearly bogus. At the same time, a two-finger touch is
signaled, even though only one finger was on the pad to begin with. This
patch ignores the packet altogether, removing the problem.
Acked-by: NChris Bagwell <chris@cnpbagwell.com>
Acked-by: NChase Douglas <chase.douglas@canonical.com>
Acked-by: NDmitry Torokhov <dtor@mail.ru>
Signed-off-by: NHenrik Rydberg <rydberg@euromail.se>
上级 fec6e525
...@@ -548,7 +548,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) ...@@ -548,7 +548,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
return; return;
} }
if (hw.z > 0) { if (hw.z > 0 && hw.x > 1) {
num_fingers = 1; num_fingers = 1;
finger_width = 5; finger_width = 5;
if (SYN_CAP_EXTENDED(priv->capabilities)) { if (SYN_CAP_EXTENDED(priv->capabilities)) {
...@@ -582,7 +582,7 @@ static void synaptics_process_packet(struct psmouse *psmouse) ...@@ -582,7 +582,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1); if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0); if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
if (hw.z > 0) { if (num_fingers > 0) {
input_report_abs(dev, ABS_X, hw.x); input_report_abs(dev, ABS_X, hw.x);
input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y); input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册