stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gerecke <killertofu@gmail.com>
To: "# v3.17+" <stable@vger.kernel.org>, Sasha Levin <sashal@kernel.org>
Cc: Linux Input <linux-input@vger.kernel.org>,
	Ping Cheng <pinglinux@gmail.com>,
	Aaron Armstrong Skomra <skomra@gmail.com>,
	Jason Gerecke <jason.gerecke@wacom.com>,
	Aaron Armstrong Skomra <aaron.skomra@wacom.com>
Subject: Re: [PATCH 2/2] HID: wacom: Don't report anything prior to the tool entering range
Date: Tue, 11 Jun 2019 12:02:47 -0700	[thread overview]
Message-ID: <CANRwn3RBK41mRJKUPDDptoq_So6_7UxR0toaauZvjT5U=OaHWw@mail.gmail.com> (raw)
In-Reply-To: <20190426163531.9782-1-jason.gerecke@wacom.com>

I haven't been keeping a close eye on this and just noticed that this
patch set doesn't seem to have been merged into stable. There's also a
second patch series (beginning with "[PATCH 1/3] HID: wacom: Send
BTN_TOUCH in response to INTUOSP2_BT eraser contact") that hasn't seen
any stable activity either.

Any idea what's up?

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....
On Fri, Apr 26, 2019 at 9:35 AM Gerecke, Jason <killertofu@gmail.com> wrote:
>
> From: Jason Gerecke <jason.gerecke@wacom.com>
>
> If the tool spends some time in prox before entering range, a series of
> events (e.g. ABS_DISTANCE, MSC_SERIAL) can be sent before we or userspace
> have any clue about the pen whose data is being reported. We need to hold
> off on reporting anything until the pen has entered range. Since we still
> want to report events that occur "in prox" after the pen has *left* range
> we use 'wacom-tool[0]' as the indicator that the pen did at one point
> enter range and provide us/userspace with tool type and serial number
> information.
>
> Fixes: a48324de6d ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range")
> Cc: <stable@vger.kernel.org> # 4.11+
> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
> Reviewed-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
> ---
> Version of patch specifically targeted to stable v4.14.113
>
>  drivers/hid/wacom_wac.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index 03b04bc742dd..e4aeffa56018 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -1271,17 +1271,20 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
>                         input_report_abs(pen_input, ABS_Z, rotation);
>                         input_report_abs(pen_input, ABS_WHEEL, get_unaligned_le16(&frame[11]));
>                 }
> -               input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5]));
> -               input_report_abs(pen_input, ABS_DISTANCE, range ? frame[13] : wacom->features.distance_max);
>
> -               input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x01);
> -               input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02);
> -               input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04);
> +               if (wacom->tool[0]) {
> +                       input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5]));
> +                       input_report_abs(pen_input, ABS_DISTANCE, range ? frame[13] : wacom->features.distance_max);
>
> -               input_report_key(pen_input, wacom->tool[0], prox);
> -               input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]);
> -               input_report_abs(pen_input, ABS_MISC,
> -                                wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */
> +                       input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x01);
> +                       input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02);
> +                       input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04);
> +
> +                       input_report_key(pen_input, wacom->tool[0], prox);
> +                       input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]);
> +                       input_report_abs(pen_input, ABS_MISC,
> +                                        wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */
> +               }
>
>                 wacom->shared->stylus_in_proximity = prox;
>
> --
> 2.21.0
>

  reply	other threads:[~2019-06-11 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 22:12 [PATCH 1/2] HID: wacom: Don't set tool type until we're in range Gerecke, Jason
2019-04-24 22:12 ` [PATCH 2/2] HID: wacom: Don't report anything prior to the tool entering range Gerecke, Jason
     [not found]   ` <20190425121506.7EBEC218B0@mail.kernel.org>
2019-04-25 17:47     ` Jason Gerecke
2019-04-26 16:35       ` Gerecke, Jason
2019-06-11 19:02         ` Jason Gerecke [this message]
2019-06-11 19:22           ` Greg KH
2019-06-11 20:45             ` Jason Gerecke
2019-06-12  7:10               ` Greg KH
2019-06-15 15:32                 ` Greg KH
     [not found] ` <20190425121505.3AD33218AD@mail.kernel.org>
2019-04-25 17:47   ` [PATCH 1/2] HID: wacom: Don't set tool type until we're in range Jason Gerecke
2019-04-26  3:33     ` Sasha Levin
2019-04-26 16:34       ` Gerecke, Jason
2019-05-07 18:43 ` Jason Gerecke
2019-05-17 14:27 ` 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='CANRwn3RBK41mRJKUPDDptoq_So6_7UxR0toaauZvjT5U=OaHWw@mail.gmail.com' \
    --to=killertofu@gmail.com \
    --cc=aaron.skomra@wacom.com \
    --cc=jason.gerecke@wacom.com \
    --cc=linux-input@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    --cc=sashal@kernel.org \
    --cc=skomra@gmail.com \
    --cc=stable@vger.kernel.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).