From: Jason Gerecke Date: Tue, 12 Jun 2018 20:42:46 +0000 (-0700) Subject: HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large X-Git-Tag: Ubuntu-4.15.0-40.43~50 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=553bc6c364e3e393b9a82473124f4ec405e2dade;p=mirror_ubuntu-bionic-kernel.git HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large BugLink: http://bugs.launchpad.net/bugs/1800537 commit d471b6b22d37bf9928c6d0202bdaaf76583b8b61 upstream. The HID descriptor for the 2nd-gen Intuos Pro large (PTH-860) contains a typo which defines an incorrect logical maximum Y value. This causes a small portion of the bottom of the tablet to become unusable (both because the area is below the "bottom" of the tablet and because 'wacom_wac_event' ignores out-of-range values). It also results in a skewed aspect ratio. To fix this, we add a quirk to 'wacom_usage_mapping' which overwrites the data with the correct value. Signed-off-by: Jason Gerecke CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 5b8493c771cc..f551696ab582 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -291,6 +291,14 @@ static void wacom_usage_mapping(struct hid_device *hdev, } } + /* 2nd-generation Intuos Pro Large has incorrect Y maximum */ + if (hdev->vendor == USB_VENDOR_ID_WACOM && + hdev->product == 0x0358 && + WACOM_PEN_FIELD(field) && + wacom_equivalent_usage(usage->hid) == HID_GD_Y) { + field->logical_maximum = 43200; + } + switch (usage->hid) { case HID_GD_X: features->x_max = field->logical_maximum;