From 13129f8b0574c95a58ffbd7f325791f23b99df8d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 29 Sep 2016 11:45:57 +0200 Subject: [PATCH] Add patches from upstream for use with xserver-1.19 - Rebuild against xserver-1.19 --- xf86-input-evdev-1.19-support.patch | 209 ++++++++++++++++++++++++++++ xorg-x11-drv-evdev.spec | 8 +- 2 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 xf86-input-evdev-1.19-support.patch diff --git a/xf86-input-evdev-1.19-support.patch b/xf86-input-evdev-1.19-support.patch new file mode 100644 index 0000000..4ba20ed --- /dev/null +++ b/xf86-input-evdev-1.19-support.patch @@ -0,0 +1,209 @@ +From e08b0332761b0cff6d6a3f5d7e88c22f786bd530 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 31 May 2016 17:52:41 -0700 +Subject: [PATCH xf86-input-evdev 1/3] Report errors when attempting to write + keyboard controls + +This is mostly to eliminate a compiler warning. + +Signed-off-by: Keith Packard +Signed-off-by: Peter Hutterer +--- + src/evdev.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 341db61..5ace238 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -1108,6 +1108,7 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl) + InputInfoPtr pInfo; + struct input_event ev[ArrayLength(bits) + 1]; + int i; ++ int rc; + + memset(ev, 0, sizeof(ev)); + +@@ -1122,7 +1123,9 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl) + ev[i].code = SYN_REPORT; + ev[i].value = 0; + +- write(pInfo->fd, ev, sizeof ev); ++ rc = write(pInfo->fd, ev, sizeof ev); ++ if (rc != sizeof ev) ++ xf86IDrvMsg(pInfo, X_ERROR, "Failed to set keyboard controls: %s\n", strerror(errno)); + } + + static int +-- +2.9.3 + +From 7b1267f7f18c478d3dc34a7668eaefa402815891 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 31 May 2016 17:52:42 -0700 +Subject: [PATCH xf86-input-evdev 2/3] Support XINPUT ABI version 23 (threaded + input) + +Use input_lock/input_unlock calls instead of SIGIO functions + +Signed-off-by: Keith Packard +Signed-off-by: Peter Hutterer +--- + src/emuMB.c | 13 ++++++++++--- + src/emuThird.c | 13 ++++++++++--- + src/evdev.h | 4 ++++ + 3 files changed, 24 insertions(+), 6 deletions(-) + +diff --git a/src/emuMB.c b/src/emuMB.c +index b25eac8..94e50c4 100644 +--- a/src/emuMB.c ++++ b/src/emuMB.c +@@ -184,10 +184,13 @@ int + EvdevMBEmuTimer(InputInfoPtr pInfo) + { + EvdevPtr pEvdev = pInfo->private; +- int sigstate; + int id; + +- sigstate = xf86BlockSIGIO (); ++#if HAVE_THREADED_INPUT ++ input_lock(); ++#else ++ int sigstate = xf86BlockSIGIO(); ++#endif + + pEvdev->emulateMB.pending = FALSE; + if ((id = stateTab[pEvdev->emulateMB.state][4][0]) != 0) { +@@ -200,7 +203,11 @@ EvdevMBEmuTimer(InputInfoPtr pInfo) + pEvdev->emulateMB.state); + } + +- xf86UnblockSIGIO (sigstate); ++#if HAVE_THREADED_INPUT ++ input_unlock(); ++#else ++ xf86UnblockSIGIO(sigstate); ++#endif + return 0; + } + +diff --git a/src/emuThird.c b/src/emuThird.c +index 5f14d33..dd49a84 100644 +--- a/src/emuThird.c ++++ b/src/emuThird.c +@@ -89,12 +89,19 @@ Evdev3BEmuTimer(OsTimerPtr timer, CARD32 time, pointer arg) + InputInfoPtr pInfo = (InputInfoPtr)arg; + EvdevPtr pEvdev = pInfo->private; + struct emulate3B *emu3B = &pEvdev->emulate3B; +- int sigstate = 0; + +- sigstate = xf86BlockSIGIO (); ++#if HAVE_THREADED_INPUT ++ input_lock(); ++#else ++ int sigstate = xf86BlockSIGIO(); ++#endif + emu3B->state = EM3B_EMULATING; + Evdev3BEmuPostButtonEvent(pInfo, emu3B->button, BUTTON_PRESS); +- xf86UnblockSIGIO (sigstate); ++#if HAVE_THREADED_INPUT ++ input_unlock(); ++#else ++ xf86UnblockSIGIO(sigstate); ++#endif + return 0; + } + +diff --git a/src/evdev.h b/src/evdev.h +index 4d44d2b..0ebcfa0 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -67,6 +67,10 @@ + #define LogMessageVerbSigSafe xf86MsgVerb + #endif + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 23 ++#define HAVE_THREADED_INPUT 1 ++#endif ++ + #define EVDEV_MAXBUTTONS 32 + #define EVDEV_MAXQUEUE 32 + +-- +2.9.3 + +From bb8bde7456def4186f9a4a0a9f98d53c949e1450 Mon Sep 17 00:00:00 2001 +From: Keith Packard +Date: Tue, 31 May 2016 17:52:43 -0700 +Subject: [PATCH xf86-input-evdev 3/3] Support XINPUT ABI 24 (remove select + mask from block/wakeup handlers) + +The evdev driver wasn't using the select mask arguments, so this +change just involves adjusting the argument lists. + +Signed-off-by: Keith Packard +Signed-off-by: Peter Hutterer +--- + src/emuMB.c | 8 ++------ + src/evdev.h | 12 ++++++++++-- + 2 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/src/emuMB.c b/src/emuMB.c +index 94e50c4..d1777aa 100644 +--- a/src/emuMB.c ++++ b/src/emuMB.c +@@ -268,9 +268,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press) + } + + +-void EvdevMBEmuWakeupHandler(pointer data, +- int i, +- pointer LastSelectMask) ++void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS) + { + InputInfoPtr pInfo = (InputInfoPtr)data; + EvdevPtr pEvdev = (EvdevPtr)pInfo->private; +@@ -284,9 +282,7 @@ void EvdevMBEmuWakeupHandler(pointer data, + } + } + +-void EvdevMBEmuBlockHandler(pointer data, +- struct timeval **waitTime, +- pointer LastSelectMask) ++void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS) + { + InputInfoPtr pInfo = (InputInfoPtr) data; + EvdevPtr pEvdev= (EvdevPtr) pInfo->private; +diff --git a/src/evdev.h b/src/evdev.h +index 0ebcfa0..c506296 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -71,6 +71,14 @@ + #define HAVE_THREADED_INPUT 1 + #endif + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 24 ++#define BLOCK_HANDLER_ARGS void *data, void *waitTime ++#define WAKEUP_HANDLER_ARGS void *data, int i ++#else ++#define BLOCK_HANDLER_ARGS pointer data, struct timeval **waitTime, pointer LastSelectMask ++#define WAKEUP_HANDLER_ARGS void *data, int i, pointer LastSelectMask ++#endif ++ + #define EVDEV_MAXBUTTONS 32 + #define EVDEV_MAXQUEUE 32 + +@@ -264,8 +272,8 @@ unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code); + /* Middle Button emulation */ + int EvdevMBEmuTimer(InputInfoPtr); + BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL); +-void EvdevMBEmuWakeupHandler(pointer, int, pointer); +-void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer); ++void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS); ++void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS); + void EvdevMBEmuPreInit(InputInfoPtr); + void EvdevMBEmuOn(InputInfoPtr); + void EvdevMBEmuFinalize(InputInfoPtr); +-- +2.9.3 + diff --git a/xorg-x11-drv-evdev.spec b/xorg-x11-drv-evdev.spec index bf98779..e049d71 100644 --- a/xorg-x11-drv-evdev.spec +++ b/xorg-x11-drv-evdev.spec @@ -8,7 +8,7 @@ Summary: Xorg X11 evdev input driver Name: xorg-x11-drv-evdev Version: 2.10.3 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -20,6 +20,7 @@ Source2: commitid %else Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2 %endif +Patch0: xf86-input-evdev-1.19-support.patch ExcludeArch: s390 s390x @@ -41,6 +42,7 @@ X.Org X11 evdev input driver. %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +%patch0 -p1 %build autoreconf --force -v --install || exit 1 @@ -76,6 +78,10 @@ X.Org X11 evdev input driver development files. %changelog +* Thu Sep 29 2016 Hans de Goede 2.10.3-2 +- Add patches from upstream for use with xserver-1.19 +- Rebuild against xserver-1.19 + * Wed Jun 01 2016 Peter Hutterer 2.10.3-1 - evdev 2.10.3