2015-11-20 10:31:32

by Allen Hung

[permalink] [raw]
Subject: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

The usage Confidence is mandary to Windows Precision Touchpad devices. The
appearance of this usage is checked in hidinput_connect but the quirk
MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
rejection for the WIN 8 touchpad devices which have implemented usage
Confidence in its input reports.

Tested on Dell XPS 13 laptop.

Signed-off-by: Allen Hung <[email protected]>
---
drivers/hid/hid-multitouch.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 426b2f1..13aeff9 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -448,6 +448,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
mt_store_field(usage, td, hi);
return 1;
case HID_DG_CONFIDENCE:
+ if (cls->name == MT_CLS_WIN_8 &&
+ field->application == HID_DG_TOUCHPAD) {
+ cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
+ cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
+ }
mt_store_field(usage, td, hi);
return 1;
case HID_DG_TIPSWITCH:
--
1.9.1


2015-11-23 13:49:11

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

On Fri, Nov 20, 2015 at 11:21 AM, Allen Hung <[email protected]> wrote:
> The usage Confidence is mandary to Windows Precision Touchpad devices. The
> appearance of this usage is checked in hidinput_connect but the quirk
> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
> rejection for the WIN 8 touchpad devices which have implemented usage
> Confidence in its input reports.
>
> Tested on Dell XPS 13 laptop.
>
> Signed-off-by: Allen Hung <[email protected]>
> ---

No side effects on non touchpads as reported by my tests.
Reviewed-by: Benjamin Tissoires <[email protected]>

Cheers,
Benjamin

> drivers/hid/hid-multitouch.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 426b2f1..13aeff9 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -448,6 +448,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
> mt_store_field(usage, td, hi);
> return 1;
> case HID_DG_CONFIDENCE:
> + if (cls->name == MT_CLS_WIN_8 &&
> + field->application == HID_DG_TOUCHPAD) {
> + cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
> + cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
> + }
> mt_store_field(usage, td, hi);
> return 1;
> case HID_DG_TIPSWITCH:
> --
> 1.9.1
>

2015-11-26 14:21:52

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

On Fri, 20 Nov 2015, Allen Hung wrote:

> The usage Confidence is mandary to Windows Precision Touchpad devices. The
> appearance of this usage is checked in hidinput_connect but the quirk
> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
> rejection for the WIN 8 touchpad devices which have implemented usage
> Confidence in its input reports.
>
> Tested on Dell XPS 13 laptop.
>
> Signed-off-by: Allen Hung <[email protected]>

Applied to for-4.5/multitouch. Thanks,

--
Jiri Kosina
SUSE Labs

2015-12-17 21:52:41

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

On Thu, Nov 26, 2015 at 3:21 PM, Jiri Kosina <[email protected]> wrote:
> On Fri, 20 Nov 2015, Allen Hung wrote:
>
>> The usage Confidence is mandary to Windows Precision Touchpad devices. The
>> appearance of this usage is checked in hidinput_connect but the quirk
>> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
>> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
>> rejection for the WIN 8 touchpad devices which have implemented usage
>> Confidence in its input reports.
>>
>> Tested on Dell XPS 13 laptop.
>>
>> Signed-off-by: Allen Hung <[email protected]>
>
> Applied to for-4.5/multitouch. Thanks,
>

Allen, looks like the Dell XPS13 2015 (or was it the 2014?) has
problems with your patch:
https://bugzilla.redhat.com/show_bug.cgi?id=1292583 (we backported
this change in the Fedora kernel 4.2.7).

Would you mind checking that this patch does not create regressions on
older series of laptops?

Thanks in advance.

Cheers,
Benjamin

2015-12-21 09:45:16

by Allen Hung

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

On 12/18/2015 05:52 AM, Benjamin Tissoires wrote:
> On Thu, Nov 26, 2015 at 3:21 PM, Jiri Kosina <[email protected]> wrote:
>> On Fri, 20 Nov 2015, Allen Hung wrote:
>>
>>> The usage Confidence is mandary to Windows Precision Touchpad devices. The
>>> appearance of this usage is checked in hidinput_connect but the quirk
>>> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
>>> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
>>> rejection for the WIN 8 touchpad devices which have implemented usage
>>> Confidence in its input reports.
>>>
>>> Tested on Dell XPS 13 laptop.
>>>
>>> Signed-off-by: Allen Hung <[email protected]>
>> Applied to for-4.5/multitouch. Thanks,
>>
> Allen, looks like the Dell XPS13 2015 (or was it the 2014?) has
> problems with your patch:
> https://bugzilla.redhat.com/show_bug.cgi?id=1292583 (we backported
> this change in the Fedora kernel 4.2.7).
>
> Would you mind checking that this patch does not create regressions on
> older series of laptops?
>
> Thanks in advance.
>
> Cheers,
> Benjamin
Hi Benjamin,

It looks like a XPS13 2014 but I can confirm this with my colleagues who are in charge of this product line. I don't mind checking this patch with more older series of laptops. I will do it and let you know the status. Should I also test the machines with Fedora 23, or just go with Ubuntu OS? The XPS machines are shipped with Ubuntu.
Btw, the issue reporter said she/he cannot reproduce the issue (posted on Dec. 18).

Regards,
Allen Hung