From: Chris Bagwell <chris@cnpbagwell.com>
To: Henrik Rydberg <rydberg@euromail.se>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
Chase Douglas <chase.douglas@canonical.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] Input: synaptics - ignore bogus mt packet
Date: Sat, 18 Dec 2010 11:05:08 -0600 [thread overview]
Message-ID: <AANLkTinso7BZB4GxgsQshaGeka+CcjUtjB9Agdj3qFnz@mail.gmail.com> (raw)
In-Reply-To: <1292683981-6908-3-git-send-email-rydberg@euromail.se>
On Sat, Dec 18, 2010 at 8:52 AM, Henrik Rydberg <rydberg@euromail.se> wrote:
> 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.
I've seen this behavior as well although I thought it always came when
hw.z == 0 so was masked. I guess its not to surprising its sneaking
threw with low pressures.
>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> drivers/input/mouse/synaptics.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 8a769e9..4744064 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -526,7 +526,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
> return;
> }
>
> - if (hw.z > 0) {
> + if (hw.z > 0 && hw.x > 1) {
> num_fingers = 1;
> finger_width = 5;
> if (SYN_CAP_EXTENDED(priv->capabilities)) {
> @@ -558,7 +558,7 @@ static void synaptics_process_packet(struct psmouse *psmouse)
> 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 > 0) {
> + if (hw.z > 0 && hw.x > 1) {
> input_report_abs(dev, ABS_X, hw.x);
> input_report_abs(dev, ABS_Y, YMAX_NOMINAL + YMIN_NOMINAL - hw.y);
> }
This might read better if we change to "if (num_fingers) {" and then
we do not need to repeat the hw work around logic twice.
Also, this snippet shows I may be seeing it as well but the
BTN_TOUCH=0 when < 25 is probably masking it for most cases.
Either way:
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-12-18 17:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 14:52 [PATCH 0/4] Input: synaptics - add semi-mt support Henrik Rydberg
2010-12-18 14:52 ` [PATCH 1/4] Input: synaptics - add multitouch packet support Henrik Rydberg
2010-12-18 16:55 ` Chris Bagwell
2010-12-18 16:56 ` Chris Bagwell
2010-12-18 17:06 ` Henrik Rydberg
2010-12-18 17:54 ` Henrik Rydberg
2010-12-18 20:44 ` Chris Bagwell
2010-12-21 16:45 ` Chase Douglas
2010-12-19 8:16 ` Dmitry Torokhov
2010-12-19 9:36 ` Henrik Rydberg
2010-12-18 14:52 ` [PATCH 2/4] Input: synaptics - ignore bogus mt packet Henrik Rydberg
2010-12-18 17:05 ` Chris Bagwell [this message]
2010-12-18 14:53 ` [PATCH 3/4] Input: synaptics - report clickpad property Henrik Rydberg
2010-12-18 14:53 ` [PATCH 4/4] Input: synaptics - emit multitouch data Henrik Rydberg
2010-12-18 17:11 ` Chris Bagwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinso7BZB4GxgsQshaGeka+CcjUtjB9Agdj3qFnz@mail.gmail.com \
--to=chris@cnpbagwell.com \
--cc=chase.douglas@canonical.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@euromail.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).