From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Peter Hutterer <peter.hutterer@redhat.com>,
Benjamin Tissoires <btissoir@redhat.com>,
linux-input@vger.kernel.org
Subject: Re: [PATCH] alps: Fix finger jumps on lifting 2 fingers on v7 touchpad
Date: Wed, 20 May 2015 09:40:16 -0700 [thread overview]
Message-ID: <20150520164016.GB23809@dtor-ws> (raw)
In-Reply-To: <1432113413-7007-1-git-send-email-hdegoede@redhat.com>
On Wed, May 20, 2015 at 11:16:53AM +0200, Hans de Goede wrote:
> On v7 touchpads sometimes when 2 fingers are moved down on the touchpad
> until they "fall of" the touchpad, the second touch will report 0 for y
> (max y really since the y axis is inverted) and max x as coordinates,
> rather then reporting 0, 0 as is expected for a non touching finger.
>
> This commit detects this and treats these touches as non touching.
>
> See the evemu-recording here:
> https://bugzilla.redhat.com/attachment.cgi?id=1025058
>
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1221200
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/input/mouse/alps.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 745921f..9bc4343 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -949,6 +949,11 @@ static void alps_get_finger_coordinate_v7(struct input_mt_pos *mt,
> case V7_PACKET_ID_TWO:
> mt[1].x &= ~0x000F;
> mt[1].y |= 0x000F;
> + /* Detect false-postive touches where x & y report max value */
> + if (mt[1].y == 0x7ff && mt[1].x == 0xff0) {
> + mt[1].x = 0;
> + /* y gets set to 0 at the end of this function */
I think this is too fragile; I believe we can spare an assignment and
maybe compiler will optimize it out.
I can fix it up locally unless there are objections to having this extra
assignment.
> + }
> break;
>
> case V7_PACKET_ID_MULTI:
> --
> 2.4.1
>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2015-05-20 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 9:16 [PATCH] alps: Fix finger jumps on lifting 2 fingers on v7 touchpad Hans de Goede
2015-05-20 16:40 ` Dmitry Torokhov [this message]
2015-05-20 17:39 ` Hans de Goede
2015-05-20 18:00 ` Dmitry Torokhov
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=20150520164016.GB23809@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=btissoir@redhat.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.