linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Roderick Colenbrander <roderick@gaikai.com>
Cc: linux-input@vger.kernel.org, Henrik Rydberg <rydberg@bitmath.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Tim Bird <tim.bird@am.sony.com>,
	Roderick Colenbrander <roderick.colenbrander@sony.com>
Subject: Re: [PATCH] Input: mt: only perform pointer emulation on drivers desiring this functionality
Date: Thu, 27 Oct 2016 16:54:06 -0700	[thread overview]
Message-ID: <20161027235406.GE12312@dtor-ws> (raw)
In-Reply-To: <CANndSKmxgUM-u+jZF611Ko5supENX95-JR2xKp++3YPGZHAJtw@mail.gmail.com>

On Thu, Oct 27, 2016 at 04:46:01PM -0700, Roderick Colenbrander wrote:
> On Thu, Oct 27, 2016 at 4:19 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Thu, Oct 27, 2016 at 02:31:13PM -0700, Roderick Colenbrander wrote:
> >> From: Roderick Colenbrander <roderick.colenbrander@sony.com>
> >>
> >> The input-mt driver pointer emulation from 'input_mt_sync_frame' regardless
> >> of the flags passed in to 'input_mt_init_slots' by device drivers.
> >
> > Right, because needing single-touch (pointer) emulation is not property
> > of device or driver but rather consumer. If we get to the point where
> > everything is ready to accept multi-touch (are we there yet) then we can
> > stop doing pointer emulation altogether.
> >
> >>
> >> Pointer emulation is undesired on drivers, which didn't request this
> >> capability like the hid-sony driver for the Dualshock 4. This gamepad already
> >> reports ABS_X / ABS_Y for gamepad stick purposes. Pointer emulation would
> >> inject touchpad values into these sticks, which is undesired.
> >
> > The driver should not be re-purposing events like that.
> > ABS_MT_POSITION_X and ABS_X should match.
> >
> > Why doesn't driver follow Documentation/input/gamepad.txt?
> >
> 
> The original hid-sony code and the multitouch handling code for the Dualshock 4
> were written by the community. We are stepping in to make the hid-sony driver
> properly handle the Dualshock 4.
> The driver doesn't fully follow the gamepad spec yet, which we will
> try to improve. At
> least the left analog stick is reported as ABS_X and ABS_Y already,
> but the buttons
> are inconsistent and right stick is wrong as well.
> While it would be great to conform to the spec, the conflict with
> multitouch would still
> exist as the Dualshock 4 has both analog sticks and a multitouch touchpad.
> 
> Disabling the pointer emulation feature avoids the conflict. This
> issue was only exposed
> recently by adding of the input_mt_sync_frame call as recommended by Benjamin as
> part of some improvements we did for touchpad handling in hid-sony.

As I mentioned, ABS_MT_POSITION_X and ABS_X should represent the same
data, so the driver's use of them for different sub-devices is not
correct. Maybe the multitouch "touchpad" should be reported as
completely separate input device and userspace should "stitch" it back
into composite device.

In any case, as I mentioned above, the pointer emulation is requirement
of client and thus this patch is not appropriate.

Thanks.

-- 
Dmitry

  reply	other threads:[~2016-10-27 23:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 21:31 [PATCH] Input: mt: only perform pointer emulation on drivers desiring this functionality Roderick Colenbrander
2016-10-27 21:36 ` Bird, Timothy
2016-10-27 22:46 ` Henrik Rydberg
2016-10-27 23:27   ` Roderick Colenbrander
2016-10-27 23:19 ` Dmitry Torokhov
2016-10-27 23:46   ` Roderick Colenbrander
2016-10-27 23:54     ` Dmitry Torokhov [this message]
2016-10-28  0:10       ` Roderick Colenbrander
  -- strict thread matches above, loose matches on Subject: below --
2016-10-30 15:04 Frank Praznik
2016-10-30 18:45 ` Colenbrander, Roelof
2016-11-03 10:43   ` Benjamin Tissoires

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=20161027235406.GE12312@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=roderick.colenbrander@sony.com \
    --cc=roderick@gaikai.com \
    --cc=rydberg@bitmath.org \
    --cc=tim.bird@am.sony.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 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).