Skip to contentSkip to conversation

Right touchpad button disabled on Dell 7750

REGRESSION Takashi Iwai 5 participants 11 messages Mar 18, 2022 – Mar 20, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Is this check really correct in general? Or do we need some device-specific quirk?

thanks,

Takashi

#1 lore raw

Hi Takashi,

Thanks for reporting the regression here.

Quoted 20 lines · Takashi Iwai

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Quoted 2 lines

Is this check really correct in general? Or do we need some device-specific quirk?

A couple of days ago another user with the same laptop (Dell Precision 7550 or 7750) emailed me to report the issue and I sent him a patch for testing.

I he confirms that the patch works, I'll send it to the mailing list.

I believe that your analysis of the regression is correct and I think that we'd need to add a quirk for the device.

In case you want to have a look to the patch, I added it to this libinput [1] report.

Thanks,
Jose

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726#note_1303623

#2 lore raw
Quoted 33 lines · José Expósito

Hi Takashi,

Thanks for reporting the regression here.

Quoted 20 lines · Takashi Iwai

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Quoted 2 lines

Is this check really correct in general? Or do we need some device-specific quirk?

A couple of days ago another user with the same laptop (Dell Precision 7550 or 7750) emailed me to report the issue and I sent him a patch for testing.

Quoted 7 lines

I he confirms that the patch works, I'll send it to the mailing list.

I believe that your analysis of the regression is correct and I think that we'd need to add a quirk for the device.

In case you want to have a look to the patch, I added it to this libinput [1] report.

Great, I'll try to build and ask the reporter to test with the patch.

Thanks!

Takashi

Quoted 6 lines

Thanks,
Jose

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726#note_1303623

#3 lore raw
Quoted 22 lines · Takashi Iwai
Quoted 19 lines · José Expósito

Hi Takashi,

Thanks for reporting the regression here.

Quoted 13 lines · Takashi Iwai

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Yep, I came to the same conclusion this morning with the reporter of the libinput bug José was mentioning.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Is this check really correct in general? Or do we need some device-specific quirk?

The device firmware is clearly wrong here. It's the first time I see this failing like that and I hope this is just an isolated case. The device advertises itself as a buttonpad, when it's not.

However, the fact that it passed MS certification (even if I doubt Microsoft ever got that touchpad in their own hands) leads me to believe that the certification doesn't enforce that setting too much, and that we might see more devices coming in with that same bug.

To sum up, I am not happy that this commit introduced a regression that we can not work around in userspace: given that BTN_RIGHT gets removed from the device, all of the values are filtered out and userspace can not resolve that situation by itself.

I wish I had a better way of fixing this than having to quirk the device.

Quoted 7 lines
Quoted 7 lines

A couple of days ago another user with the same laptop (Dell Precision 7550 or 7750) emailed me to report the issue and I sent him a patch for testing.

I he confirms that the patch works, I'll send it to the mailing list.

Quoted 8 lines
Quoted 5 lines

I believe that your analysis of the regression is correct and I think that we'd need to add a quirk for the device.

In case you want to have a look to the patch, I added it to this libinput [1] report.

Great, I'll try to build and ask the reporter to test with the patch.

As noticed on the libinput bug, I think the patch is wrong (not by a lot). We should base the class on MT_CLS_WIN8, not MT_CLS_DEFAULT.

The testers might say that it's working, but this might create some corner cases where it's not leading to more and more headaches with your users.

Cheers,
Benjamin

Quoted 11 lines

Thanks!

Takashi

Quoted 6 lines

Thanks,
Jose

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726#note_1303623

#4 lore raw
Quoted 54 lines · Benjamin Tissoires
Quoted 13 lines · Takashi Iwai
Quoted 13 lines
Quoted 13 lines

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Yep, I came to the same conclusion this morning with the reporter of the libinput bug José was mentioning.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Is this check really correct in general? Or do we need some device-specific quirk?

The device firmware is clearly wrong here. It's the first time I see this failing like that and I hope this is just an isolated case. The device advertises itself as a buttonpad, when it's not.

However, the fact that it passed MS certification (even if I doubt Microsoft ever got that touchpad in their own hands) leads me to believe that the certification doesn't enforce that setting too much, and that we might see more devices coming in with that same bug.

To sum up, I am not happy that this commit introduced a regression that we can not work around in userspace: given that BTN_RIGHT gets removed from the device, all of the values are filtered out and userspace can not resolve that situation by itself.

I wish I had a better way of fixing this than having to quirk the device.

Quoted 10 lines
Quoted 10 lines

A couple of days ago another user with the same laptop (Dell Precision 7550 or 7750) emailed me to report the issue and I sent him a patch for testing.

I he confirms that the patch works, I'll send it to the mailing list.

I believe that your analysis of the regression is correct and I think that we'd need to add a quirk for the device.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

In case you want to have a look to the patch, I added it to this libinput [1] report.

Great, I'll try to build and ask the reporter to test with the patch.

As noticed on the libinput bug, I think the patch is wrong (not by a lot). We should base the class on MT_CLS_WIN8, not MT_CLS_DEFAULT.

Thanks for providing the right class Benjamin, I updated the patch:
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726#note_1303724

Jose

#5 lore raw
In reply to Benjamin Tissoires
Quoted 16 lines · Benjamin Tissoires
Quoted 7 lines
Quoted 7 lines

A couple of days ago another user with the same laptop (Dell Precision 7550 or 7750) emailed me to report the issue and I sent him a patch for testing.

I he confirms that the patch works, I'll send it to the mailing list.

Quoted 8 lines
Quoted 5 lines

I believe that your analysis of the regression is correct and I think that we'd need to add a quirk for the device.

In case you want to have a look to the patch, I added it to this libinput [1] report.

Great, I'll try to build and ask the reporter to test with the patch.

Quoted 6 lines

As noticed on the libinput bug, I think the patch is wrong (not by a lot). We should base the class on MT_CLS_WIN8, not MT_CLS_DEFAULT.

The testers might say that it's working, but this might create some corner cases where it's not leading to more and more headaches with your users.

So is it like below? I'll build another kernel with that.

Thanks!

Takashi

-- 8< --
From: José Expósito <[email protected]>
Subject: [PATCH] HID: multitouch: fix Dell Precision 7550 and 7750 button type

The touchpad present in the Dell Precision 7550 and 7750 laptops reports a HID_DG_BUTTONTYPE of type MT_BUTTONTYPE_CLICKPAD. However, the device is not a clickpad, it is a touchpad with physical buttons.

In order to fix this issue, a quirk for the device was introduced in libinput [1] [2] to disable the INPUT_PROP_BUTTONPAD property:

[Precision 7x50 Touchpad]
MatchBus=i2c
MatchUdevType=touchpad MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50* AttrInputPropDisable=INPUT_PROP_BUTTONPAD

However, because of the change introduced in 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") the BTN_RIGHT key bit is not mapped anymore breaking the device right click button.

In order to fix the issue, create a quirk for the device forcing its button type to touchpad regardless of the value reported by the firmware.

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/481
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1868789

[ modified MT_CLS_BUTTONTYPE_TOUCHPAD quirk bits to base on MT_CLS_WIN8
as suggested by Benjamin -- tiwai ]

Fixes 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads")
---
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |   20 ++++++++++++++++++++
 2 files changed, 23 insertions(+)
drivers/hid/hid-ids.h +3 -0
@@ -285,6 +285,9 @@
 
 #define USB_VENDOR_ID_CIDC		0x1677
 
+#define USB_VENDOR_ID_CIRQUE_CORP		0x0488
+#define USB_DEVICE_ID_DELL_PRECISION_7X50	0x120A
+
 #define USB_VENDOR_ID_CJTOUCH		0x24b8
 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020	0x0020
 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040	0x0040
drivers/hid/hid-multitouch.c +20 -0
@@ -71,6 +71,7 @@ MODULE_LICENSE("GPL");
 #define MT_QUIRK_SEPARATE_APP_REPORT	BIT(19)
 #define MT_QUIRK_FORCE_MULTI_INPUT	BIT(20)
 #define MT_QUIRK_DISABLE_WAKEUP		BIT(21)
+#define MT_QUIRK_BUTTONTYPE_TOUCHPAD	BIT(22)
 
 #define MT_INPUTMODE_TOUCHSCREEN	0x02
 #define MT_INPUTMODE_TOUCHPAD		0x03
@@ -194,6 +195,7 @@ static void mt_post_parse(struct mt_devi
 #define MT_CLS_WIN_8_FORCE_MULTI_INPUT		0x0015
 #define MT_CLS_WIN_8_DISABLE_WAKEUP		0x0016
 #define MT_CLS_WIN_8_NO_STICKY_FINGERS		0x0017
+#define MT_CLS_BUTTONTYPE_TOUCHPAD		0x0018
 
 /* vendor specific classes */
 #define MT_CLS_3M				0x0101
@@ -302,6 +304,15 @@ static const struct mt_class mt_classes[
 			MT_QUIRK_CONTACT_CNT_ACCURATE |
 			MT_QUIRK_WIN8_PTP_BUTTONS,
 		.export_all_inputs = true },
+	{ .name = MT_CLS_BUTTONTYPE_TOUCHPAD,
+		.quirks = MT_QUIRK_ALWAYS_VALID |
+			MT_QUIRK_IGNORE_DUPLICATES |
+			MT_QUIRK_HOVERING |
+			MT_QUIRK_CONTACT_CNT_ACCURATE |
+			MT_QUIRK_STICKY_FINGERS |
+			MT_QUIRK_WIN8_PTP_BUTTONS |,
+			MT_QUIRK_BUTTONTYPE_TOUCHPAD,
+		.export_all_inputs = true },
 
 	/*
 	 * vendor specific classes
@@ -1286,6 +1297,9 @@ static int mt_touch_input_configured(str
 	    (app->buttons_count == 1))
 		td->is_buttonpad = true;
 
+	if (app->quirks & MT_QUIRK_BUTTONTYPE_TOUCHPAD)
+		td->is_buttonpad = false;
+
 	if (td->is_buttonpad)
 		__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
 
@@ -1875,6 +1889,12 @@ static const struct hid_device_id mt_dev
 		MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
 			USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
 
+	/* Cirque Corp (Dell Precision 7550 and 7750 touchpad) */
+	{ .driver_data = MT_CLS_BUTTONTYPE_TOUCHPAD,
+		HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
+			USB_VENDOR_ID_CIRQUE_CORP,
+			USB_DEVICE_ID_DELL_PRECISION_7X50) },
+
 	/* CJTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
 		MT_USB_DEVICE(USB_VENDOR_ID_CJTOUCH,
#10 lore raw

Re: [REGRESSION] Right touchpad button disabled on Dell 7750 #forregzbot

In reply to Takashi Iwai

TWIMC: this mail is primarily send for documentation purposes and for regzbot, my Linux kernel regression tracking bot. These mails usually contain '#forregzbot' in the subject, to make them easy to spot and filter.

Hi, this is your Linux kernel regression tracker. Top-posting for once, to make this easily accessible to everyone.

Seems below regression soon will be getting fixed, but with the nearing final I want to have this in the tracking to make sure everyone is aware of it:

#regzbot ^introduced 37ef4c19b4c659926ce65
#regzbot title HID: multitouch: right touchpad button is disabled on recent kernels
#regzbot ignore-activity
#regzbot link:
https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/726#note_1303623

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them and lack knowledge about most of the areas they concern. I thus unfortunately will sometimes get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.

Quoted 29 lines · Takashi Iwai

Hi,

we received a bug report about the regression of the touchpad on Dell 7750 laptop, the right touchpad button is disabled on recent kernels:
https://bugzilla.suse.com/show_bug.cgi?id=1197243

Note that it's a physical button, not a virtual clickpad button.

The regression seems introduced by the upstream commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") that was backported to stable 5.16.x kernel.

The device is managed by hid-multitouch driver, and the further investigation revealed that it's rather an incorrectly recognized buttonpad property; namely, ID_DG_BUTTONTYPE reports it being 0 = clickable touchpad although it's not. I built a test kernel to ignore this check and it was confirmed to make the right button working again by the reporter.

Is this check really correct in general? Or do we need some device-specific quirk?

thanks,

Takashi

#6 lore raw
In reply to Takashi Iwai
Quoted 106 lines · Takashi Iwai

So is it like below? I'll build another kernel with that.

Thanks!

Takashi

-- 8< --
From: José Expósito <[email protected]>
Subject: [PATCH] HID: multitouch: fix Dell Precision 7550 and 7750 button type

The touchpad present in the Dell Precision 7550 and 7750 laptops reports a HID_DG_BUTTONTYPE of type MT_BUTTONTYPE_CLICKPAD. However, the device is not a clickpad, it is a touchpad with physical buttons.

In order to fix this issue, a quirk for the device was introduced in libinput [1] [2] to disable the INPUT_PROP_BUTTONPAD property:

[Precision 7x50 Touchpad]
MatchBus=i2c
MatchUdevType=touchpad MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50* AttrInputPropDisable=INPUT_PROP_BUTTONPAD

However, because of the change introduced in 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") the BTN_RIGHT key bit is not mapped anymore breaking the device right click button.

In order to fix the issue, create a quirk for the device forcing its button type to touchpad regardless of the value reported by the firmware.

[1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/481
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1868789

[ modified MT_CLS_BUTTONTYPE_TOUCHPAD quirk bits to base on MT_CLS_WIN8
as suggested by Benjamin -- tiwai ]

Fixes 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads")
---
 drivers/hid/hid-ids.h        |    3 +++
 drivers/hid/hid-multitouch.c |   20 ++++++++++++++++++++
 2 files changed, 23 insertions(+)
drivers/hid/hid-ids.h +3 -0
@@ -285,6 +285,9 @@
 
 #define USB_VENDOR_ID_CIDC		0x1677
 
+#define USB_VENDOR_ID_CIRQUE_CORP		0x0488
+#define USB_DEVICE_ID_DELL_PRECISION_7X50	0x120A
+
 #define USB_VENDOR_ID_CJTOUCH		0x24b8
 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020	0x0020
 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040	0x0040
drivers/hid/hid-multitouch.c +14 -0
@@ -71,6 +71,7 @@ MODULE_LICENSE("GPL");
 #define MT_QUIRK_SEPARATE_APP_REPORT	BIT(19)
 #define MT_QUIRK_FORCE_MULTI_INPUT	BIT(20)
 #define MT_QUIRK_DISABLE_WAKEUP		BIT(21)
+#define MT_QUIRK_BUTTONTYPE_TOUCHPAD	BIT(22)
 
 #define MT_INPUTMODE_TOUCHSCREEN	0x02
 #define MT_INPUTMODE_TOUCHPAD		0x03
@@ -194,6 +195,7 @@ static void mt_post_parse(struct mt_devi
 #define MT_CLS_WIN_8_FORCE_MULTI_INPUT		0x0015
 #define MT_CLS_WIN_8_DISABLE_WAKEUP		0x0016
 #define MT_CLS_WIN_8_NO_STICKY_FINGERS		0x0017
+#define MT_CLS_BUTTONTYPE_TOUCHPAD		0x0018
 
 /* vendor specific classes */
 #define MT_CLS_3M				0x0101
@@ -302,6 +304,15 @@ static const struct mt_class mt_classes[
 			MT_QUIRK_CONTACT_CNT_ACCURATE |
 			MT_QUIRK_WIN8_PTP_BUTTONS,
 		.export_all_inputs = true },
+	{ .name = MT_CLS_BUTTONTYPE_TOUCHPAD,
+		.quirks = MT_QUIRK_ALWAYS_VALID |
+			MT_QUIRK_IGNORE_DUPLICATES |
+			MT_QUIRK_HOVERING |
+			MT_QUIRK_CONTACT_CNT_ACCURATE |
+			MT_QUIRK_STICKY_FINGERS |
+			MT_QUIRK_WIN8_PTP_BUTTONS |,
+			MT_QUIRK_BUTTONTYPE_TOUCHPAD,
+		.export_all_inputs = true },
 
 	/*
 	 * vendor specific classes
@@ -1286,6 +1297,9 @@ static int mt_touch_input_configured(str
 	    (app->buttons_count == 1))
 		td->is_buttonpad = true;
 
+	if (app->quirks & MT_QUIRK_BUTTONTYPE_TOUCHPAD)
+		td->is_buttonpad = false;
+
 	if (td->is_buttonpad)
 		__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
 
@@ -1875,6 +1889,12 @@ static const struct hid_device_id mt_dev
 		MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
 			USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },

drivers/hid/hid-multitouch.c static const struct hid_device_id mt_dev · line 1900

Quoted 10 lines
drivers/hid/hid-multitouch.c +6 -0
 
+	/* Cirque Corp (Dell Precision 7550 and 7750 touchpad) */
+	{ .driver_data = MT_CLS_BUTTONTYPE_TOUCHPAD,
+		HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
+			USB_VENDOR_ID_CIRQUE_CORP,
+			USB_DEVICE_ID_DELL_PRECISION_7X50) },
+
 	/* CJTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
 		MT_USB_DEVICE(USB_VENDOR_ID_CJTOUCH,

Yes, that is the correct patch. The original reporter just emailed me and confirmed that the patch works and that the class used by the device is MT_CLS_WIN_8, as Benjamin pointed out.

I'll wait a couple of days before sending the patch to the mailing list so the other users can test it as well.

Thanks for the quick response,
Jose

#7 lore raw

Re: [PATCH] HID: multitouch: fix Dell Precision 7550 and 7750 button type

In reply to Takashi Iwai
I love your patch! Yet something to improve:

Hi Takashi,

I love your patch! Yet something to improve:

[auto build test ERROR on hid/for-next]
[also build test ERROR on v5.17-rc8 next-20220318]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Takashi-Iwai/HID-multitouch-fix-Dell-Precision-7550-and-7750-button-type/20220318-223749
base:   https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220319/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/34d08d524d0942a3242bf820e364dc3f496dbd6c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Takashi-Iwai/HID-multitouch-fix-Dell-Precision-7550-and-7750-button-type/20220318-223749 git checkout 34d08d524d0942a3242bf820e364dc3f496dbd6c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/hid/

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> drivers/hid/hid-multitouch.c:313:31: error: expected expression
                           MT_QUIRK_WIN8_PTP_BUTTONS |,
                                                      ^

1 error generated.

vim +313 drivers/hid/hid-multitouch.c

242
243 static const struct mt_class mt_classes[] = {
244 { .name = MT_CLS_DEFAULT,
245 .quirks = MT_QUIRK_ALWAYS_VALID |
246 MT_QUIRK_CONTACT_CNT_ACCURATE },
247 { .name = MT_CLS_NSMU,
248 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP },
249 { .name = MT_CLS_SERIAL,
250 .quirks = MT_QUIRK_ALWAYS_VALID},
251 { .name = MT_CLS_CONFIDENCE,
252 .quirks = MT_QUIRK_VALID_IS_CONFIDENCE },
253 { .name = MT_CLS_CONFIDENCE_CONTACT_ID,
254 .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
255 MT_QUIRK_SLOT_IS_CONTACTID },
256 { .name = MT_CLS_CONFIDENCE_MINUS_ONE,
257 .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
258 MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE },
259 { .name = MT_CLS_DUAL_INRANGE_CONTACTID,
260 .quirks = MT_QUIRK_VALID_IS_INRANGE |
261 MT_QUIRK_SLOT_IS_CONTACTID,
262 .maxcontacts = 2 },
263 { .name = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,
264 .quirks = MT_QUIRK_VALID_IS_INRANGE |
265 MT_QUIRK_SLOT_IS_CONTACTNUMBER,
266 .maxcontacts = 2 },
267 { .name = MT_CLS_INRANGE_CONTACTNUMBER,
268 .quirks = MT_QUIRK_VALID_IS_INRANGE |
269 MT_QUIRK_SLOT_IS_CONTACTNUMBER },
270 { .name = MT_CLS_WIN_8,
271 .quirks = MT_QUIRK_ALWAYS_VALID |
272 MT_QUIRK_IGNORE_DUPLICATES |
273 MT_QUIRK_HOVERING |
274 MT_QUIRK_CONTACT_CNT_ACCURATE |
275 MT_QUIRK_STICKY_FINGERS |
276 MT_QUIRK_WIN8_PTP_BUTTONS,
277 .export_all_inputs = true },
278 { .name = MT_CLS_EXPORT_ALL_INPUTS,
279 .quirks = MT_QUIRK_ALWAYS_VALID |
280 MT_QUIRK_CONTACT_CNT_ACCURATE,
281 .export_all_inputs = true },
282 { .name = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
283 .quirks = MT_QUIRK_ALWAYS_VALID |
284 MT_QUIRK_IGNORE_DUPLICATES |
285 MT_QUIRK_HOVERING |
286 MT_QUIRK_CONTACT_CNT_ACCURATE |
287 MT_QUIRK_STICKY_FINGERS |
288 MT_QUIRK_WIN8_PTP_BUTTONS |
289 MT_QUIRK_FORCE_MULTI_INPUT,
290 .export_all_inputs = true },
291 { .name = MT_CLS_WIN_8_DISABLE_WAKEUP,
292 .quirks = MT_QUIRK_ALWAYS_VALID |
293 MT_QUIRK_IGNORE_DUPLICATES |
294 MT_QUIRK_HOVERING |
295 MT_QUIRK_CONTACT_CNT_ACCURATE |
296 MT_QUIRK_STICKY_FINGERS |
297 MT_QUIRK_WIN8_PTP_BUTTONS |
298 MT_QUIRK_DISABLE_WAKEUP,
299 .export_all_inputs = true },
300 { .name = MT_CLS_WIN_8_NO_STICKY_FINGERS,
301 .quirks = MT_QUIRK_ALWAYS_VALID |
302 MT_QUIRK_IGNORE_DUPLICATES |
303 MT_QUIRK_HOVERING |
304 MT_QUIRK_CONTACT_CNT_ACCURATE |
305 MT_QUIRK_WIN8_PTP_BUTTONS,
306 .export_all_inputs = true },
307 { .name = MT_CLS_BUTTONTYPE_TOUCHPAD,
308 .quirks = MT_QUIRK_ALWAYS_VALID |
309 MT_QUIRK_IGNORE_DUPLICATES |
310 MT_QUIRK_HOVERING |
311 MT_QUIRK_CONTACT_CNT_ACCURATE |
312 MT_QUIRK_STICKY_FINGERS |

 > 313				MT_QUIRK_WIN8_PTP_BUTTONS |,

314 MT_QUIRK_BUTTONTYPE_TOUCHPAD,
315 .export_all_inputs = true },
316
317 /*
318 * vendor specific classes
319 */
320 { .name = MT_CLS_3M,
321 .quirks = MT_QUIRK_VALID_IS_CONFIDENCE |
322 MT_QUIRK_SLOT_IS_CONTACTID |
323 MT_QUIRK_TOUCH_SIZE_SCALING,
324 .sn_move = 2048,
325 .sn_width = 128,
326 .sn_height = 128,
327 .maxcontacts = 60,
328 },
329 { .name = MT_CLS_EGALAX,
330 .quirks = MT_QUIRK_SLOT_IS_CONTACTID |
331 MT_QUIRK_VALID_IS_INRANGE,
332 .sn_move = 4096,
333 .sn_pressure = 32,
334 },
335 { .name = MT_CLS_EGALAX_SERIAL,
336 .quirks = MT_QUIRK_SLOT_IS_CONTACTID |
337 MT_QUIRK_ALWAYS_VALID,
338 .sn_move = 4096,
339 .sn_pressure = 32,
340 },
341 { .name = MT_CLS_TOPSEED,
342 .quirks = MT_QUIRK_ALWAYS_VALID,
343 .is_indirect = true,
344 .maxcontacts = 2,
345 },
346 { .name = MT_CLS_PANASONIC,
347 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP,
348 .maxcontacts = 4 },
349 { .name = MT_CLS_GENERALTOUCH_TWOFINGERS,
350 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
351 MT_QUIRK_VALID_IS_INRANGE |
352 MT_QUIRK_SLOT_IS_CONTACTID,
353 .maxcontacts = 2
354 },
355 { .name = MT_CLS_GENERALTOUCH_PWT_TENFINGERS,
356 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
357 MT_QUIRK_SLOT_IS_CONTACTID
358 },
359
360 { .name = MT_CLS_FLATFROG,
361 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP |
362 MT_QUIRK_NO_AREA,
363 .sn_move = 2048,
364 .maxcontacts = 40,
365 },
366 { .name = MT_CLS_LG,
367 .quirks = MT_QUIRK_ALWAYS_VALID |
368 MT_QUIRK_FIX_CONST_CONTACT_ID |
369 MT_QUIRK_IGNORE_DUPLICATES |
370 MT_QUIRK_HOVERING |
371 MT_QUIRK_CONTACT_CNT_ACCURATE },
372 { .name = MT_CLS_ASUS,
373 .quirks = MT_QUIRK_ALWAYS_VALID |
374 MT_QUIRK_CONTACT_CNT_ACCURATE |
375 MT_QUIRK_ASUS_CUSTOM_UP },
376 { .name = MT_CLS_VTL,
377 .quirks = MT_QUIRK_ALWAYS_VALID |
378 MT_QUIRK_CONTACT_CNT_ACCURATE |
379 MT_QUIRK_FORCE_GET_FEATURE,
380 },
381 { .name = MT_CLS_GOOGLE,
382 .quirks = MT_QUIRK_ALWAYS_VALID |
383 MT_QUIRK_CONTACT_CNT_ACCURATE |
384 MT_QUIRK_SLOT_IS_CONTACTID |
385 MT_QUIRK_HOVERING
386 },
387 { .name = MT_CLS_RAZER_BLADE_STEALTH,
388 .quirks = MT_QUIRK_ALWAYS_VALID |
389 MT_QUIRK_IGNORE_DUPLICATES |
390 MT_QUIRK_HOVERING |
391 MT_QUIRK_CONTACT_CNT_ACCURATE |
392 MT_QUIRK_WIN8_PTP_BUTTONS,
393 },
394 { .name = MT_CLS_SMART_TECH,
395 .quirks = MT_QUIRK_ALWAYS_VALID |
396 MT_QUIRK_IGNORE_DUPLICATES |
397 MT_QUIRK_CONTACT_CNT_ACCURATE |
398 MT_QUIRK_SEPARATE_APP_REPORT,
399 },
400 { }
401 };
402

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/[email protected]

#8 lore raw
In reply to Benjamin Tissoires
Quoted 7 lines · Benjamin Tissoires

As noticed on the libinput bug, I think the patch is wrong (not by a lot). We should base the class on MT_CLS_WIN8, not MT_CLS_DEFAULT.

The testers might say that it's working, but this might create some corner cases where it's not leading to more and more headaches with your users.

Indeed the first patch caused the wrong button mapping. Jose's revised patch was confirmed to work fine.

thanks,

Takashi