All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	vlad.babchuk@gmail.com, linux-kernel@vger.kernel.org,
	andrii.anisov@gmail.com, olekstysh@gmail.com, al1img@gmail.com,
	xen-devel@lists.xenproject.org, joculator@gmail.com
Subject: Re: [PATCH v1] xen/input: add multi-touch support
Date: Thu, 29 Jun 2017 12:24:42 -0700	[thread overview]
Message-ID: <75F63113-9756-4A21-930B-CDE24871BCA3__10414.3970799216$1498764353$gmane$org@gmail.com> (raw)
In-Reply-To: <af52c632-2041-01c6-6e02-1e57ee9dc466@gmail.com>

On June 29, 2017 11:40:30 AM PDT, Oleksandr Andrushchenko <andr2000@gmail.com> wrote:
>Hi, Dmitry!
>
>First of all thank you for both the comments and the patch
>
>On 06/29/2017 11:17 AM, Dmitry Torokhov wrote:
>> Hi Oleksandr,
>>
>> On Fri, Jun 23, 2017 at 09:09:55AM +0300, Oleksandr Andrushchenko
>wrote:
>>> +			switch (event->mtouch.event_type) {
>>> +			case XENKBD_MT_EV_DOWN:
>>> +				input_mt_report_slot_state(dev, MT_TOOL_FINGER,
>>> +							   true);
>>> +				input_event(dev, EV_ABS, ABS_MT_POSITION_X,
>>> +					    event->mtouch.u.pos.abs_x);
>>> +				input_event(dev, EV_ABS, ABS_MT_POSITION_Y,
>>> +					    event->mtouch.u.pos.abs_y);
>>> +				input_event(dev, EV_ABS, ABS_X,
>>> +					    event->mtouch.u.pos.abs_x);
>>> +				input_event(dev, EV_ABS, ABS_Y,
>>> +					    event->mtouch.u.pos.abs_y);
>> I was looking at this and realized that this breaks the single touch
>> emulation for MT interface: for ST you are supposed to report the
>oldest
>> contact, here you report data for all of them. Luckily
>> input_mt_report_pointer_emulation() that is called as part of
>> input_mt_sync_frame() reports the correct ABS_X/ABS_Y data and fixes
>> that for you.
>>
>> We should simply remove reporting ABS_X/ABS_Y here and in
>> XENKBD_MT_EV_MOTION as well.
>>
>>> +
>>> +		input_set_capability(mtouch, EV_KEY, BTN_TOUCH);
>>> +		input_set_abs_params(mtouch, ABS_X,
>>> +				     0, width, 0, 0);
>>> +		input_set_abs_params(mtouch, ABS_Y,
>>> +				     0, height, 0, 0);
>>> +		input_set_abs_params(mtouch, ABS_PRESSURE,
>>> +				     0, 255, 0, 0);
>> This is done automatically by input_mt_init_slots() when called with
>> INPUT_MT_DIRECT (as in your case) or INPUT_MT_POINTER, so this can be
>> removed as well.
>Great, I was not actually convinced that ABS is really needed
>to be put here while dealing with MT devices,
>so the above can be removed
>> Does the patch below (on top of yours) work for you?
>Unfortunately I didn't have time to test the patch today, but will try
>to do so tomorrow.
>
>Beside that, do you think that the removals above should go into my
>patch
>and the rest of yours (it looks like needed refactoring to me) should
>go 
>into
>a separate one, not named "MT support fixups", but rather "Xen input
>driver refactoring"? Because part of the changes seems to be MT
>relevant
>and part is pure refactoring.
>If so, do you want me to rework your patch with these changes and add
>on
>top of mine (I will put your signed off) or you will handle it on your
>own?

I was planning on simply folding my changes into your patch and calling it a day, unless your testing would show there is an issue. It wasn't intended to be a separate patch in it's own right, I simply sent it out this way to show what exactly I was changing.


Thanks.

-- 
Dmitry

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-06-29 19:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23  6:09 [PATCH v1] xen/input: add multi-touch support Oleksandr Andrushchenko
2017-06-29  5:52 ` Oleksandr Andrushchenko
2017-06-29  5:52 ` Oleksandr Andrushchenko
2017-06-29  8:17 ` Dmitry Torokhov
2017-06-29  8:17 ` Dmitry Torokhov
2017-06-29 18:40   ` Oleksandr Andrushchenko
2017-06-29 18:40   ` Oleksandr Andrushchenko
2017-06-29 19:24     ` Dmitry Torokhov [this message]
2017-06-29 19:24     ` Dmitry Torokhov
2017-06-30  7:41       ` Oleksandr Andrushchenko
2017-06-30  7:41       ` Oleksandr Andrushchenko
2017-06-23  6:09 Oleksandr Andrushchenko

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='75F63113-9756-4A21-930B-CDE24871BCA3__10414.3970799216$1498764353$gmane$org@gmail.com' \
    --to=dmitry.torokhov@gmail.com \
    --cc=al1img@gmail.com \
    --cc=andr2000@gmail.com \
    --cc=andrii.anisov@gmail.com \
    --cc=joculator@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=olekstysh@gmail.com \
    --cc=vlad.babchuk@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.