linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@bitmath.org>
To: Jiada Wang <jiada_wang@mentor.com>,
	nick@shmanahar.org, dmitry.torokhov@gmail.com, jikos@kernel.org,
	benjamin.tissoires@redhat.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 02/49] Input: introduce input_mt_report_slot_inactive
Date: Tue, 17 Sep 2019 20:25:03 +0200	[thread overview]
Message-ID: <546c8205-ecb7-1c34-3727-b10c7ff86232@bitmath.org> (raw)
In-Reply-To: <20190917093320.18134-3-jiada_wang@mentor.com>

Hi Jiada,

> input_mt_report_slot_state() ignores the tool when the slot is closed.
> which has caused a bit of confusion.
> This patch introduces input_mt_report_slot_inactive() to report slot
> inactive state.
> replaces all input_mt_report_slot_state() with
> input_mt_report_slot_inactive() in case of close of slot.

This patch looks very odd, I am afraid.

When a driver needs to use input_mt functions, it first calls 
input_mt_init_slots() during setup. The MT state then remains in effect 
until the driver is destroyed. Thus, there is no valid case when 
input_mt_report_slot_state() would fail to execute the line

    input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1)

when active == false.

What input_mt_report_slot_state() does do, however, is to ignore the 
event when no MT state has been set, which does happen for some drivers 
handling both normal and MT devices. Changing such a driver in the way 
you suggest would introduce new events in existing, working cases, and 
possibly break userspace. We should try very hard to avoid it.

Thanks,

Henrik

  reply	other threads:[~2019-09-17 18:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  9:32 [PATCH v3 00/49] atmel_mxt_ts misc Jiada Wang
2019-09-17  9:32 ` [PATCH v3 01/49] Input: switch to use return value of input_mt_report_slot_state Jiada Wang
2019-09-17  9:32 ` [PATCH v3 02/49] Input: introduce input_mt_report_slot_inactive Jiada Wang
2019-09-17 18:25   ` Henrik Rydberg [this message]
2019-09-24  7:16     ` Jiada Wang
2019-09-17  9:32 ` [PATCH v3 03/49] Input: atmel_mxt_ts - rework sysfs init/remove Jiada Wang
2019-09-17  9:32 ` [PATCH v3 04/49] Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary Jiada Wang

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=546c8205-ecb7-1c34-3727-b10c7ff86232@bitmath.org \
    --to=rydberg@bitmath.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jiada_wang@mentor.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@shmanahar.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 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).