linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Henrik Rydberg <rydberg@euromail.se>,
	Hans de Goede <hdegoede@redhat.com>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	linux-input <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daniel Kurtz <djkurtz@chromium.org>,
	Chung-yih Wang <cywang@chromium.org>
Subject: Re: [PATCH 1/2] Input: synaptics: Use in-kernel tracking for reporting mt data
Date: Mon, 5 Jan 2015 10:30:07 -0500	[thread overview]
Message-ID: <20150105153007.GE19391@mail.corp.redhat.com> (raw)
In-Reply-To: <20141229222650.GG9565@dtor-ws>

Hi Dmitry,

On Dec 29 2014 or thereabouts, Dmitry Torokhov wrote:
> Hi Benjamin,
> 
> On Mon, Dec 08, 2014 at 01:01:28PM -0500, Benjamin Tissoires wrote:
> > On Thu, Nov 20, 2014 at 2:42 PM, Benjamin Tissoires
> > <benjamin.tissoires@gmail.com> wrote:
> > > On Fri, Oct 31, 2014 at 12:51 PM, Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> > >> On Thu, Oct 30, 2014 at 02:33:06PM -0400, Benjamin Tissoires wrote:
> > >>> The current code tries to consider all states and transitions to properly
> > >>> detect which finger is attached to which slot. The code is quite huge
> > >>> and difficult to read.
> > >>> If the sensor manages to group the touch points but is not reliable in
> > >>> giving tracking ids, we can simply use the kernel tracking method. Note
> > >>> that it is already used by Cr-48 Chromebooks.
> > >>>
> > >>> Incidentaly, this fixes a bug reported by Peter Hutterer:
> > >>> """
> > >>> on the Lenovo T440, run:
> > >>> evemu-record /dev/input/event4 | grep BTN_
> > >>>
> > >>> then put one, two, three, two fingers down
> > >>> when you go from 3 to 2 fingers the driver sends a spurious BTN_TOUCH 0
> > >>> event:
> > >>>
> > >>> E: 0.000000 0001 014a 0001      # EV_KEY / BTN_TOUCH            1
> > >>> E: 0.000000 0001 0145 0001      # EV_KEY / BTN_TOOL_FINGER      1
> > >>> E: 0.770008 0001 0145 0000      # EV_KEY / BTN_TOOL_FINGER      0
> > >>> E: 0.770008 0001 014d 0001      # EV_KEY / BTN_TOOL_DOUBLETAP   1
> > >>> E: 1.924716 0001 014d 0000      # EV_KEY / BTN_TOOL_DOUBLETAP   0
> > >>> E: 1.924716 0001 014e 0001      # EV_KEY / BTN_TOOL_TRIPLETAP   1
> > >>>
> > >>> .. changing from 3 to 2 fingers now
> > >>>
> > >>> E: 3.152641 0001 014a 0000      # EV_KEY / BTN_TOUCH            0
> > >>> E: 3.152641 0001 014d 0001      # EV_KEY / BTN_TOOL_DOUBLETAP   1
> > >>> E: 3.152641 0001 014e 0000      # EV_KEY / BTN_TOOL_TRIPLETAP   0
> > >>> E: 3.176948 0001 014a 0001      # EV_KEY / BTN_TOUCH            1
> > >>>
> > >>> quick look in the kernel shows it's caused by hw.z going to 0 for a packet,
> > >>> so probably a firmware bug. either way, it makes it hard to track BTN_TOUCH
> > >>> as signal that at least one finger is down.
> > >>> """
> > >>>
> > >>> The in-kernel tracking is enough to remove this spurious BTN_TOUCH 0.
> > >>>
> > >>> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> > >>> ---
> > >>>
> > >>> Hi Dmitry,
> > >>>
> > >>> I started working on that for 2 other bug reports
> > >>> https://bugs.freedesktop.org/show_bug.cgi?id=81278
> > >>> and
> > >>> https://bugs.freedesktop.org/show_bug.cgi?id=76722
> > >>>
> > >>> I thought the cursor jumps could be fixed by the in-kernel tracking, but the
> > >>> tracking needs a little bit more work to filter them out (patches to follow soon).
> > >>>
> > >>> From a user perspective, this patch does not change anything to what the user
> > >>> previously had. It also fixes Peter's bug that's why I decide to send this out
> > >>> by itself (removing ~350 lines of code and fixing bugs is always nice).
> > >>>
> > >>> I think the cursor jump fixes will need more bikeshedding in input-mt.c (I am
> > >>> *really* bad at designing APIs), so I'll send it later as an RFC.
> > >>
> > >> Daniel and Chung-yih were working on the driver so let's see if they
> > >> have a moment...
> > >>
> > >
> > > Any news from the chrome team? This is a requirement for fixing the
> > > cursor jumps, and I'd rather have this series in shape before
> > > introducing the changes in input-mt.c.
> > >
> > 
> > ping?
> 
> Looks like a very nice fix and clean up. I queued it for 3.20, sorry for
> the delay.
> 

No worries. It actually gave me more time to focus on other internal
things :)
Now I need to address the input-mt bits to split the touches when the
hardware does not separate two touches... Lots of fun!

Cheers and greetings!
Benjamin


      reply	other threads:[~2015-01-05 15:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 18:33 [PATCH 1/2] Input: synaptics: Use in-kernel tracking for reporting mt data Benjamin Tissoires
2014-10-30 18:33 ` [PATCH 2/2] Input: synaptics: remove duplicated code Benjamin Tissoires
2014-10-31 16:52   ` Dmitry Torokhov
2014-10-31 16:51 ` [PATCH 1/2] Input: synaptics: Use in-kernel tracking for reporting mt data Dmitry Torokhov
2014-11-20 19:42   ` Benjamin Tissoires
2014-12-08 18:01     ` Benjamin Tissoires
2014-12-29 22:26       ` Dmitry Torokhov
2015-01-05 15:30         ` Benjamin Tissoires [this message]

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=20150105153007.GE19391@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=cywang@chromium.org \
    --cc=djkurtz@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --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).