From 1dc13b4ea6a031926a8c69d1e5c7a93407aa45de Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:23:09 +0000 Subject: import xorg-x11-drv-wacom-0.34.2-4.el7 --- diff --git a/SOURCES/0001-Remove-the-device-s-fd-from-the-select-set-when-we-g.patch b/SOURCES/0001-Remove-the-device-s-fd-from-the-select-set-when-we-g.patch new file mode 100644 index 0000000..f79506f --- /dev/null +++ b/SOURCES/0001-Remove-the-device-s-fd-from-the-select-set-when-we-g.patch @@ -0,0 +1,84 @@ +From 84e81636b29cca6dc1a5423e76ac2ab2c636eb86 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 18 Jul 2017 08:41:37 +1000 +Subject: [PATCH] Remove the device's fd from the select() set when we get + ENODEV + +If the device is unplugged, the fd triggers in select/poll/... but comes back +with ENODEV. This triggers a lot of error messages in the log until finally +the udev code catches up with us and the device is removed properly. + +Catch that case by removing the fd from the select() set so we don't get +triggered to call read_input on it anymore. + +https://sourceforge.net/p/linuxwacom/bugs/337/ + +Signed-off-by: Peter Hutterer +Tested-by: crocket +Reviewed-by: Ping Cheng +(cherry picked from commit 912611608b3ba892a7c26d1be81209f4e5b009d5) +--- + src/xf86Wacom.c | 12 +++++++++--- + src/xf86Wacom.h | 2 +- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c +index 90ce793..896a8c1 100644 +--- a/src/xf86Wacom.c ++++ b/src/xf86Wacom.c +@@ -632,7 +632,8 @@ static void wcmDevReadInput(InputInfoPtr pInfo) + if (!wcmReady(pInfo)) break; + + /* dispatch */ +- wcmReadPacket(pInfo); ++ if (!wcmReadPacket(pInfo)) ++ break; + } + + #ifdef DEBUG +@@ -649,7 +650,7 @@ static void wcmDevReadInput(InputInfoPtr pInfo) + #endif + } + +-void wcmReadPacket(InputInfoPtr pInfo) ++Bool wcmReadPacket(InputInfoPtr pInfo) + { + WacomDevicePtr priv = (WacomDevicePtr)pInfo->private; + WacomCommonPtr common = priv->common; +@@ -672,7 +673,10 @@ void wcmReadPacket(InputInfoPtr pInfo) + if (errno != EAGAIN && errno != EINTR) + LogMessageVerbSigSafe(X_ERROR, 0, + "%s: Error reading wacom device : %s\n", pInfo->name, strerror(errno)); +- return; ++ if (errno == ENODEV) ++ xf86RemoveEnabledDevice(pInfo); ++ ++ return FALSE; + } + + /* account for new data */ +@@ -704,6 +708,8 @@ void wcmReadPacket(InputInfoPtr pInfo) + } + + common->bufpos = len; ++ ++ return TRUE; + } + + int wcmDevChangeControl(InputInfoPtr pInfo, xDeviceCtl * control) +diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h +index afb4e9e..ccc2d56 100644 +--- a/src/xf86Wacom.h ++++ b/src/xf86Wacom.h +@@ -120,7 +120,7 @@ char *wcmEventAutoDevProbe (InputInfoPtr pInfo); + int wcmInitTablet(InputInfoPtr pInfo, const char* id, float version); + + /* standard packet handler */ +-void wcmReadPacket(InputInfoPtr pInfo); ++Bool wcmReadPacket(InputInfoPtr pInfo); + + /* handles suppression, filtering, and dispatch. */ + void wcmEvent(WacomCommonPtr common, unsigned int channel, const WacomDeviceState* ds); +-- +2.13.6 + diff --git a/SOURCES/0001-Support-recent-display-devices-on-older-kernels.patch b/SOURCES/0001-Support-recent-display-devices-on-older-kernels.patch new file mode 100644 index 0000000..92be110 --- /dev/null +++ b/SOURCES/0001-Support-recent-display-devices-on-older-kernels.patch @@ -0,0 +1,58 @@ +From 8db05e73d6fc0f9aeb74fbe2ba109a7205d3819e Mon Sep 17 00:00:00 2001 +From: Aaron Armstrong Skomra +Date: Tue, 2 May 2017 09:48:56 -0700 +Subject: [PATCH 1/4] Support recent display devices on older kernels + +Older kernels like 2.6.30 will end up with touches +interpreted as relative events unless these devices +are explicitly added. + +Signed-off-by: Aaron Armstrong Skomra +Reviewed-by: Peter Hutterer +(cherry picked from commit 0318b1cda79261d73f04676dd662f98c84711747) +--- + src/wcmUSB.c | 8 ++++++++ + src/wcmValidateDevice.c | 8 ++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/src/wcmUSB.c b/src/wcmUSB.c +index 2f9d93f..295286a 100644 +--- a/src/wcmUSB.c ++++ b/src/wcmUSB.c +@@ -287,6 +287,14 @@ static struct WacomModelDesc + { WACOM_VENDOR_ID, 0x57, 200000, 200000, &usbCintiqV5, "DTK2241" }, + { WACOM_VENDOR_ID, 0x59, 200000, 200000, &usbCintiqV5, "DTH2242" }, + { WACOM_VENDOR_ID, 0x5B, 200000, 200000, &usbCintiqV5, "Cintiq 22HDT" }, ++ { WACOM_VENDOR_ID, 0x34A, 200000, 200000, &usbCintiqV5, "Mobilestudio Pro 13" }, /* Touch */ ++ { WACOM_VENDOR_ID, 0x34B, 200000, 200000, &usbCintiqV5, "MobileStudio Pro 16" }, /* Touch */ ++ { WACOM_VENDOR_ID, 0x34D, 200000, 200000, &usbCintiqV5, "MobileStudio Pro 13" }, ++ { WACOM_VENDOR_ID, 0x34E, 200000, 200000, &usbCintiqV5, "MobileStudio Pro 16" }, ++ { WACOM_VENDOR_ID, 0x34F, 200000, 200000, &usbCintiqV5, "Cintiq 13 FHD Pro" }, ++ { WACOM_VENDOR_ID, 0x350, 200000, 200000, &usbCintiqV5, "Cintiq 16 UHD Pro" }, ++ { WACOM_VENDOR_ID, 0x353, 200000, 200000, &usbCintiqV5, "Cintiq 13 FHD Pro" }, /* Touch */ ++ { WACOM_VENDOR_ID, 0x354, 200000, 200000, &usbCintiqV5, "Cintiq 16 UHD Pro" }, /* Touch */ + + { WACOM_VENDOR_ID, 0x90, 100000, 100000, &usbTabletPC, "TabletPC 0x90" }, + { WACOM_VENDOR_ID, 0x93, 100000, 100000, &usbTabletPC, "TabletPC 0x93" }, +diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c +index fd27264..0da5076 100644 +--- a/src/wcmValidateDevice.c ++++ b/src/wcmValidateDevice.c +@@ -309,6 +309,14 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) + case 0x5D: /* DTH2242 Touch */ + case 0x5E: /* Cintiq 22HDT Touch */ + case 0x304:/* Cintiq 13HD */ ++ case 0x34A:/* MobileStudio Pro 13 Touch */ ++ case 0x34B:/* MobileStudio Pro 16 Touch */ ++ case 0x34D:/* MobileStudio Pro 13 */ ++ case 0x34E:/* MobileStudio Pro 13 */ ++ case 0x34F:/* Cintiq Pro 13 FHD */ ++ case 0x350:/* Cintiq Pro 16 UHD */ ++ case 0x353:/* Cintiq Pro 13 FHD Touch */ ++ case 0x354:/* Cintiq Pro 13 UHD Touch */ + TabletSetFeature(priv->common, WCM_LCD); + break; + } +-- +2.13.6 + diff --git a/SOURCES/0001-conf-add-Dell-Canvas-27-touch.patch b/SOURCES/0001-conf-add-Dell-Canvas-27-touch.patch new file mode 100644 index 0000000..97e8717 --- /dev/null +++ b/SOURCES/0001-conf-add-Dell-Canvas-27-touch.patch @@ -0,0 +1,38 @@ +From 48c2cd83ccf797fe618a48a743afee35883aecf9 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Fri, 3 Nov 2017 15:19:24 +0100 +Subject: [PATCH] conf: add Dell Canvas 27 touch + +The Dell canvas 27 is an external monitor with pen and touch, but the +pen is provided by Wacom, and the touch by Advanced Silicon. +To have proper touch arbitration, we need to force xf86-input-wacom +to also handle the touch part. + +Signed-off-by: Benjamin Tissoires +Reviewed-By: Jason Gerecke +Reviewed-by: Peter Hutterer +Signed-off-by: Peter Hutterer +--- + conf/70-wacom.conf | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/conf/70-wacom.conf b/conf/70-wacom.conf +index a20e3a3..86a3f90 100644 +--- a/conf/70-wacom.conf ++++ b/conf/70-wacom.conf +@@ -101,3 +101,12 @@ Section "InputClass" + Driver "wacom" + Option "Button2" "3" + EndSection ++ ++# Dell Canvas 27 (touch part is an Advanced Silicon, pen part a Wacom) ++Section "InputClass" ++ Identifier "Dell Canvas 27 Touch" ++ MatchUSBID "2575:0204" ++ MatchDevicePath "/dev/input/event*" ++ MatchIsTouchscreen "true" ++ Driver "wacom" ++EndSection +-- +2.13.6 + diff --git a/SOURCES/0002-Support-DTH-1152-on-older-kernels.patch b/SOURCES/0002-Support-DTH-1152-on-older-kernels.patch new file mode 100644 index 0000000..71a5913 --- /dev/null +++ b/SOURCES/0002-Support-DTH-1152-on-older-kernels.patch @@ -0,0 +1,51 @@ +From eeb5d7456248cda28ba62fe2e4978bc25ff6086a Mon Sep 17 00:00:00 2001 +From: Aaron Armstrong Skomra +Date: Thu, 13 Jul 2017 12:08:03 -0700 +Subject: [PATCH 2/4] Support DTH-1152 on older kernels + +Signed-off-by: Aaron Armstrong Skomra +Reviewed-by: Peter Hutterer +(cherry picked from commit b0a055425dfb983163b1d3c673a36aebf9536430) +--- + src/wcmUSB.c | 4 +++- + src/wcmValidateDevice.c | 2 ++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/wcmUSB.c b/src/wcmUSB.c +index 295286a..0b5ec57 100644 +--- a/src/wcmUSB.c ++++ b/src/wcmUSB.c +@@ -91,7 +91,7 @@ DEFINE_MODEL(usbGraphire4, "USB Graphire4", 4); + DEFINE_MODEL(usbBamboo, "USB Bamboo", 4); + DEFINE_MODEL(usbBamboo1, "USB Bamboo1", 4); + DEFINE_MODEL(usbBambooFun, "USB BambooFun", 4); +-DEFINE_MODEL(usbCintiq, "USB PL/Cintiq", 4); ++DEFINE_MODEL(usbCintiq, "USB PL/Cintiq/DTU", 4); + DEFINE_MODEL(usbCintiqPartner, "USB CintiqPartner", 4); + DEFINE_MODEL(usbIntuos, "USB Intuos1", 5); + DEFINE_MODEL(usbIntuos2, "USB Intuos2", 5); +@@ -232,6 +232,8 @@ static struct WacomModelDesc + { WACOM_VENDOR_ID, 0xC7, 100000, 100000, &usbCintiq, "DTU1931" }, + { WACOM_VENDOR_ID, 0xCE, 100000, 100000, &usbCintiq, "DTU2231" }, + { WACOM_VENDOR_ID, 0xF0, 100000, 100000, &usbCintiq, "DTU1631" }, ++ { WACOM_VENDOR_ID, 0x35a, 100000, 100000, &usbCintiq, "DTH1152" }, ++ { WACOM_VENDOR_ID, 0x368, 100000, 100000, &usbCintiq, "DTH1152" }, /* Touch */ + + { WACOM_VENDOR_ID, 0x41, 100000, 100000, &usbIntuos2, "Intuos2 4x5" }, + { WACOM_VENDOR_ID, 0x42, 100000, 100000, &usbIntuos2, "Intuos2 6x8" }, +diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c +index 0da5076..bfff8e7 100644 +--- a/src/wcmValidateDevice.c ++++ b/src/wcmValidateDevice.c +@@ -317,6 +317,8 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) + case 0x350:/* Cintiq Pro 16 UHD */ + case 0x353:/* Cintiq Pro 13 FHD Touch */ + case 0x354:/* Cintiq Pro 13 UHD Touch */ ++ case 0x35A:/* DTH-1152*/ ++ case 0x368:/* DTH-1152 Touch */ + TabletSetFeature(priv->common, WCM_LCD); + break; + } +-- +2.13.6 + diff --git a/SOURCES/0003-Add-support-for-2nd-generation-Intuos-Pro.patch b/SOURCES/0003-Add-support-for-2nd-generation-Intuos-Pro.patch new file mode 100644 index 0000000..17d1d93 --- /dev/null +++ b/SOURCES/0003-Add-support-for-2nd-generation-Intuos-Pro.patch @@ -0,0 +1,35 @@ +From aeda04439e615da71c61d9ffab020741b7149d8a Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Thu, 10 Aug 2017 15:34:29 -0700 +Subject: [PATCH 3/4] Add support for 2nd-generation Intuos Pro + +This tablet is usable without this patch, but the device type is missing +the WCM_RING flag. This prevents the ring valuator from being initialized +correctly, and in turn causes recent versions of gnome-control-center to +not allow configuration of the ring. + +https://bugzilla.gnome.org/show_bug.cgi?id=785358 + +Signed-off-by: Jason Gerecke +Reviewed-by: Ping Cheng +(cherry picked from commit 1a2a23c2df0ec0fd0bf46432db58f32914a6a09f) +--- + src/wcmValidateDevice.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c +index bfff8e7..8eac0dd 100644 +--- a/src/wcmValidateDevice.c ++++ b/src/wcmValidateDevice.c +@@ -202,6 +202,8 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) + TabletSetFeature(priv->common, WCM_DUALRING | WCM_LCD); + /* fall through */ + ++ case 0x357: /* Intuos Pro 2 M */ ++ case 0x358: /* Intuos Pro 2 L */ + case 0x314: /* Intuos Pro S */ + case 0x315: /* Intuos Pro M */ + case 0x317: /* Intuos Pro L */ +-- +2.13.6 + diff --git a/SOURCES/0004-Correct-device-flags-for-multiple-devices.patch b/SOURCES/0004-Correct-device-flags-for-multiple-devices.patch new file mode 100644 index 0000000..aedf5b5 --- /dev/null +++ b/SOURCES/0004-Correct-device-flags-for-multiple-devices.patch @@ -0,0 +1,72 @@ +From 8bda3dad98f3e1d62bf4499ecb95e2692830adaa Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Thu, 10 Aug 2017 15:35:43 -0700 +Subject: [PATCH 4/4] Correct device flags for multiple devices + +The device flags set in wcmDeviceTypeKeys must be set properly in order +for the driver to correctly identify and use specific tablet features. +Several devices are missing flags that e.g. indicate they support +pen rotation or have touch rings. + +Fixes: 0318b1c ("Support recent display devices on older kernels") +Fixes: 3578b91 ("Add support for Cintiq 22HDT and 13HD, DTK2241 and DTH2242.") +Fixes: df7f165 ("Add tablet_type to WacomModel") +Signed-off-by: Jason Gerecke +Reviewed-by: Ping Cheng +(cherry picked from commit b30e2d27fdb30ff4b425fc62432cab636fe163b9) +--- + src/wcmValidateDevice.c | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c +index 8eac0dd..21ccd5f 100644 +--- a/src/wcmValidateDevice.c ++++ b/src/wcmValidateDevice.c +@@ -199,7 +199,12 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) + { + case 0xF8: /* Cintiq 24HDT */ + case 0xF4: /* Cintiq 24HD */ +- TabletSetFeature(priv->common, WCM_DUALRING | WCM_LCD); ++ TabletSetFeature(priv->common, WCM_DUALRING); ++ /* fall through */ ++ ++ case 0x34D: /* MobileStudio Pro 13 */ ++ case 0x34E: /* MobileStudio Pro 13 */ ++ TabletSetFeature(priv->common, WCM_LCD); + /* fall through */ + + case 0x357: /* Intuos Pro 2 M */ +@@ -300,23 +305,24 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo) + case 0xED: /* TPC with 1FGT */ + case 0x90: /* TPC */ + case 0x97: /* TPC */ ++ case 0x9F: /* TPC */ + case 0xEF: /* TPC */ + TabletSetFeature(priv->common, WCM_TPC); + break; + +- case 0x9F: ++ case 0x304:/* Cintiq 13HD */ ++ case 0x34F:/* Cintiq Pro 13 FHD */ ++ case 0x350:/* Cintiq Pro 16 UHD */ ++ TabletSetFeature(priv->common, WCM_ROTATION); ++ /* fall-through */ ++ + case 0xF6: /* Cintiq 24HDT Touch */ + case 0x57: /* DTK2241 */ + case 0x59: /* DTH2242 Pen */ + case 0x5D: /* DTH2242 Touch */ + case 0x5E: /* Cintiq 22HDT Touch */ +- case 0x304:/* Cintiq 13HD */ + case 0x34A:/* MobileStudio Pro 13 Touch */ + case 0x34B:/* MobileStudio Pro 16 Touch */ +- case 0x34D:/* MobileStudio Pro 13 */ +- case 0x34E:/* MobileStudio Pro 13 */ +- case 0x34F:/* Cintiq Pro 13 FHD */ +- case 0x350:/* Cintiq Pro 16 UHD */ + case 0x353:/* Cintiq Pro 13 FHD Touch */ + case 0x354:/* Cintiq Pro 13 UHD Touch */ + case 0x35A:/* DTH-1152*/ +-- +2.13.6 + diff --git a/SPECS/xorg-x11-drv-wacom.spec b/SPECS/xorg-x11-drv-wacom.spec index 1545dd2..d88d6c9 100644 --- a/SPECS/xorg-x11-drv-wacom.spec +++ b/SPECS/xorg-x11-drv-wacom.spec @@ -9,7 +9,7 @@ Summary: Xorg X11 wacom input driver Name: xorg-x11-drv-wacom Version: 0.34.2 -Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 4%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} URL: http://www.x.org License: GPLv2+ Group: User Interface/X Hardware Support @@ -23,6 +23,14 @@ Source0: http://prdownloads.sourceforge.net/linuxwacom/xf86-input-wacom-%{versio %endif Patch01: 0001-Introduce-Pressure2K-config-option-for-incompatible-.patch +# Bug 1496650 - Fix hang after unplugging a device +Patch02: 0001-Remove-the-device-s-fd-from-the-select-set-when-we-g.patch +# Bug 1496659 - Fix device flags for the 13HD, 22HDT and the 2nd gen Intuos Pro +Patch03: 0001-Support-recent-display-devices-on-older-kernels.patch +Patch04: 0002-Support-DTH-1152-on-older-kernels.patch +Patch05: 0003-Add-support-for-2nd-generation-Intuos-Pro.patch +Patch06: 0004-Correct-device-flags-for-multiple-devices.patch +Patch07: 0001-conf-add-Dell-Canvas-27-touch.patch ExcludeArch: s390 s390x @@ -44,6 +52,12 @@ X.Org X11 wacom input driver for Wacom tablets. %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %patch01 -p1 +%patch02 -p1 +%patch03 -p1 +%patch04 -p1 +%patch05 -p1 +%patch06 -p1 +%patch07 -p1 %build autoreconf --force -v --install || exit 1 @@ -105,6 +119,13 @@ X.Org X11 wacom input driver development files. %{_bindir}/isdv4-serial-debugger %changelog +* Wed Nov 08 2017 Peter Hutterer 0.34.2-4 +- Add custom .conf snippet for the Dell Canvas 27 touchscreen (#1506538) + +* Wed Oct 04 2017 Peter Hutterer 0.34.2-3 +- Fix hang after unplugging a device (#1496650) +- Correct device flags for some Cintiqs and Intuos pros (#1496659) + * Thu Jun 01 2017 Peter Hutterer 0.34.2-2 - Add Pressure2K option for backwards-compatibility with applications that hardcode the previous pressure range (#1457024)