According to upstream, Thinkpad x220t (0xE6) hardware reports too high
a maximum number of touch points. The second of the patches below
makes the driver prefer the hardcoded touch_max value when present.
This modifies the change introduced by
f393ee2b814e Input: wacom - retrieve maximum number of touch points
Both Ping and Chris seemed to consider it the right thing to do, at
least when testing. I have not seen test results without it applied.
The third and fourth patches concern changes introduced by
1963518b9b1b Input: wacom - add 0xE5 (MT device) support
Patch 3 is definitely needed if applying that patch; patch 4 I'm less
convinced about. I'm including them here for reference but don't
think we need them yet.
I think Nils has tested Linus's master + patch 1 + patch 2 + patch 3
and found it to work ok on his laptop. (But keep in mind that the
0xE5 support patch touched code for some other devices, too, so I am
happiest keeping it backed out for now.)
The upshot: sid might need patch 2.
It's hard to say anything since everything seems to be up in the air.
Hopefully something like these patches will be in linux-next soon to
makes matters a little clearer (in particular, with patch descriptions
I didn't make up).
Ping Cheng (4):
wacom: do not crash when retrieving touch_max
wacom: leave touch_max as is if predefined
wacom: do not request tablet data on MT Tablet PC pen interface
wacom: ignore new-style Wacom multi touch packets on MT Tablet PC
Hope that helps,
Jonathan
From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 09:48:03 -0500
Subject: wacom: do not crash when retrieving touch_max
When rep_data was an array
unsigned char rep_data[2];
spelling its address as &rep_data was perfectly valid, but now that
it is dynamically allocated
unsigned char *rep_data = kmalloc(2, GFP_KERNEL);
that expression returns a pointer to the pointer rather than to the
array itself. Regression introduced by commit f393ee2b814e (Input:
wacom - retrieve maximum number of touch points, 2012-04-29).
[jn: from mailing list discussion, with new description.
This change is also available as part of a larger commit in the
input-wacom repository.]
From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:00:29 -0500
Subject: wacom: leave touch_max as is if predefined
Another fixup to f393ee2b814e (Input: wacom - retrieve maximum number
of touch points, 2012-04-29). The 0xE6 tablet in the Thinkpad x220t
reports the wrong value for MAXCONTACTS so the hardcoded value must
take precedence.
[jn: extracted from a larger commit in the input-wacom repository,
with new description]
case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.11.rc3
From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:29:29 -0500
Subject: wacom: do not request tablet data on MT Tablet PC pen interface
When in commit 1963518b9b1b (Input: wacom - add 0xE5 (MT device)
support, 2012-04-29) the driver stopped asking for multitouch tablet
data on the pen interface of a tablet PC, as a side effect we started
executing the "else" to that if statement. Oops.
This is needed for the 0xE6 tablet in the Thinkpad x220t to be usable
again. Meanwhile the 0xE3 works fine without this. Not sure why. -jn
[jn: extracted from a larger commit in the input-wacom repository,
with new description]
From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:44:46 -0500
Subject: wacom: ignore new-style Wacom multi touch packets on MT Tablet PC
Tablets such as 0xE6 (Thinkpad x220t) already worked fine before
adding support for the new packet format, so let's drop the
functionality for such devices for now. Meanwhile 0xE5 can still use
the new packet format.
This should bring the behavior of TABLETPC2FG devices closer to that
from before 1963518b9b1b (Input: wacom - add 0xE5 (MT device) support,
2012-04-29).
[jn: extracted from a larger commit in the input-wacom repository,
with new description]
- case TABLETPC2FG:
case MTSCREEN:
if (features->device_type == BTN_TOOL_FINGER) {
@@ -1559,6 +1558,11 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
for (i = 0; i < features->touch_max; i++)
wacom_wac->slots[i] = -1;
+ }
+ /* fall through */
+
+ case TABLETPC2FG:
+ if (features->device_type == BTN_TOOL_FINGER) {
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
(ben@decadent.co.uk, who he?)
On Mon, 2012-06-25 at 00:22 -0500, Jonathan Nieder wrote:
> Hi Ben,
>
> The attached changes are extracted from the commit at the tip of
>
> git://linuxwacom.git.sourceforge.net/gitroot/linuxwacom/input-wacom
[...]
These all look reasonable to me, even though they're not completely
tested. I've applied them all.
Ben.
--
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway.
06-26-2012, 03:48 AM
Jonathan Nieder
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
Ben Hutchings wrote:
> (ben@decadent.co.uk, who he?)
Sorry about that.
[...]
> These all look reasonable to me, even though they're not completely
> tested. I've applied them all.
Thanks. I think the exposure will be useful for upstream.
Jonathan
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120626034853.GB3010@burratino
06-27-2012, 01:34 PM
Marcus Babzien
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
Hi Jonathan,
I've got an x220t i7 cpu and applied all four patches to the sid 3.2.21 kernel. Without patches the tablet doesn't work. After applying the patches, it's recognized correctly and works fine with touch and pen inputs.
Regards,
Marcus
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEB0BEF.1000403@bnl.gov">http://lists.debian.org/4FEB0BEF.1000403@bnl.gov
06-27-2012, 08:23 PM
Jonathan Nieder
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
tags 677164 - moreinfo
quit
Marcus Babzien wrote:
> Hi Jonathan,
> I've got an x220t i7 cpu and applied all four patches to the sid
> 3.2.21 kernel. Without patches the tablet doesn't work. After
> applying the patches, it's recognized correctly and works fine with
> touch and pen inputs.
Thanks! Marking so.
I'm also vaguely curious about the result if one applies the first
three patches and not the fourth, though that's out of personal
interest rather than for the sake of the Debian package.
Cheers,
Jonathan
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120627202347.GB12774@burratino
07-05-2012, 04:20 AM
Jonathan Nieder
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
Hi,
Jonathan Nieder wrote:
> Hopefully something like these patches will be in linux-next soon to
> makes matters a little clearer (in particular, with patch descriptions
> I didn't make up).
>
> Ping Cheng (4):
> wacom: do not crash when retrieving touch_max
> wacom: leave touch_max as is if predefined
> wacom: do not request tablet data on MT Tablet PC pen interface
> wacom: ignore new-style Wacom multi touch packets on MT Tablet PC
Now they've hit input-next. Patch 3 is one of the more important ones.
The commit message is disappointing, since it makes it sound like a
cleanup. By contrast, patch 4 really is just about avoiding some
complication and waste.
Patch 5 is a new hardware support patch.
Patches 6 and 7 are bugfixes.
Patches 8 and 9 seem to be intended as cleanups.
which lumps together multiple fixes. The "And stop ignoring input
registration failures" part sounds useful, but a quick glance didn't
convince me it was worth the trouble of backporting.
I'd recommend at least taking patches 1-4, 6, and 7. Thoughts of all
kinds welcome, as usual.
Ping Cheng (5):
Input: wacom - fix retrieving touch_max bug
Input: wacom - don't retrieve touch_max when it is predefined
Input: wacom - rearrange type enum
Input: wacom - TPC2FG doesn't store touch id for slots
Input: wacom - add two new devices (0xed and 0xef)
Chris Bagwell (1):
Input: wacom - Bamboo One 1024 pressure fix
Jason Gerecke (2):
Input: wacom - initialize and destroy LEDs for Intuos4 S tablets
Input: wacom - remove code duplication
Ping Cheng (1):
Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type
case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.10.4
From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:14:12 -0700
Subject: Input: wacom - rearrange type enum
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 5adb5326a55b..d8f8847fe4a9 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -442,8 +442,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */
- if (features->type == TABLETPC2FG ||
- features->type == MTSCREEN) {
+ if (features->type > TABLETPC) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
@@ -462,7 +461,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES);
}
- } else if (features->type != TABLETPC &&
+ } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) {
do {
@@ -512,10 +511,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
}
/* only devices that support touch need to retrieve the info */
- if (features->type != TABLETPC &&
- features->type != TABLETPC2FG &&
- features->type != BAMBOO_PT &&
- features->type != MTSCREEN) {
+ if (features->type < BAMBOO_PT) {
goto out;
}
case TABLETPC:
+ case TABLETPCE:
case TABLETPC2FG:
case MTSCREEN:
sync = wacom_tpc_irq(wacom_wac, len);
@@ -1562,6 +1564,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
/* fall through */
case TABLETPC:
+ case TABLETPCE:
__clear_bit(ABS_MISC, input_dev->absbit);
Bamboo One's with ID of 0x6a and 0x6b were added with correct
indication of 1024 pressure levels but the Graphire packet routine
was only looking at 9 bits. Increased to 10 bits.
This bug caused these devices to roll over to zero pressure at half
way mark.
The other devices using this routine only support 256 or 512 range
and look to fix unused bits at zero.
From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:27:53 -0700
Subject: Input: wacom - initialize and destroy LEDs for Intuos4 S tablets
Bug#677164: wacom: Try to fix regressions in 3.2.18-1
(resending with corrected email address. Sorry for the noise.)
Hi,
Jonathan Nieder wrote:
> Hopefully something like these patches will be in linux-next soon to
> makes matters a little clearer (in particular, with patch descriptions
> I didn't make up).
>
> Ping Cheng (4):
> wacom: do not crash when retrieving touch_max
> wacom: leave touch_max as is if predefined
> wacom: do not request tablet data on MT Tablet PC pen interface
> wacom: ignore new-style Wacom multi touch packets on MT Tablet PC
Now they've hit input-next. Patch 3 is one of the more important ones.
The commit message is disappointing, since it makes it sound like a
cleanup. By contrast, patch 4 really is just about avoiding some
complication and waste.
Patch 5 is a new hardware support patch.
Patches 6 and 7 are bugfixes.
Patches 8 and 9 seem to be intended as cleanups.
which lumps together multiple fixes. The "And stop ignoring input
registration failures" part sounds useful, but a quick glance didn't
convince me it was worth the trouble of backporting.
I'd recommend at least taking patches 1-4, 6, and 7. Thoughts of all
kinds welcome, as usual.
Ping Cheng (5):
Input: wacom - fix retrieving touch_max bug
Input: wacom - don't retrieve touch_max when it is predefined
Input: wacom - rearrange type enum
Input: wacom - TPC2FG doesn't store touch id for slots
Input: wacom - add two new devices (0xed and 0xef)
Chris Bagwell (1):
Input: wacom - Bamboo One 1024 pressure fix
Jason Gerecke (2):
Input: wacom - initialize and destroy LEDs for Intuos4 S tablets
Input: wacom - remove code duplication
Ping Cheng (1):
Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type
case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.10.4
From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:14:12 -0700
Subject: Input: wacom - rearrange type enum
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 5adb5326a55b..d8f8847fe4a9 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -442,8 +442,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */
- if (features->type == TABLETPC2FG ||
- features->type == MTSCREEN) {
+ if (features->type > TABLETPC) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
@@ -462,7 +461,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES);
}
- } else if (features->type != TABLETPC &&
+ } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) {
do {
@@ -512,10 +511,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
}
/* only devices that support touch need to retrieve the info */
- if (features->type != TABLETPC &&
- features->type != TABLETPC2FG &&
- features->type != BAMBOO_PT &&
- features->type != MTSCREEN) {
+ if (features->type < BAMBOO_PT) {
goto out;
}
case TABLETPC:
+ case TABLETPCE:
case TABLETPC2FG:
case MTSCREEN:
sync = wacom_tpc_irq(wacom_wac, len);
@@ -1562,6 +1564,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
/* fall through */
case TABLETPC:
+ case TABLETPCE:
__clear_bit(ABS_MISC, input_dev->absbit);
Bamboo One's with ID of 0x6a and 0x6b were added with correct
indication of 1024 pressure levels but the Graphire packet routine
was only looking at 9 bits. Increased to 10 bits.
This bug caused these devices to roll over to zero pressure at half
way mark.
The other devices using this routine only support 256 or 512 range
and look to fix unused bits at zero.
From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:27:53 -0700
Subject: Input: wacom - initialize and destroy LEDs for Intuos4 S tablets