summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib')
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi11
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules5
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch20
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch31
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch196
-rw-r--r--meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch34
6 files changed, 297 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi
new file mode 100644
index 000000000..906043947
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deviceinfo version="0.2">
+ <device>
+ <match key="info.capabilities" contains="input.touchpad">
+ <merge key="input.x11_driver" type="string">tslib</merge>
+ </match>
+ <match key="info.capabilities" contains="input.touchscreen">
+ <merge key="input.x11_driver" type="string">tslib</merge>
+ </match>
+ </device>
+</deviceinfo>
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules
new file mode 100644
index 000000000..ec130c257
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules
@@ -0,0 +1,5 @@
+# create /dev/input/touchscreenX symlink, tag xf86-input-tslib as driver
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib"
+
+
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch
new file mode 100644
index 000000000..07754731d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch
@@ -0,0 +1,20 @@
+xorg-server-1.7.3/hw/xfree86/common/xf86Helper.c contains this code
+causing a double free crash on chvt or exit:
+
+ /* This should *really* be handled in drv->UnInit(dev) call instead, but
+ * if the driver forgets about it make sure we free it or at least crash
+ * with flying colors */
+ if (pInp->private)
+ xfree(pInp->private);
+Index: xf86-input-tslib-0.0.6/src/tslib.c
+===================================================================
+--- xf86-input-tslib-0.0.6.orig/src/tslib.c
++++ xf86-input-tslib-0.0.6/src/tslib.c
+@@ -435,6 +435,7 @@ xf86TslibUninit(InputDriverPtr drv, Inpu
+ xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
+ ts_close(priv->ts);
+ xfree(pInfo->private);
++ pInfo->private = NULL;
+ xf86DeleteInput(pInfo, 0);
+ }
+
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch
new file mode 100644
index 000000000..d16b4a53c
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch
@@ -0,0 +1,31 @@
+Fixes crash when a touchscreen event is received with xserver 1.12 and later:
+X: symbol lookup error: /usr/lib/xorg/modules/input/tslib_drv.so: undefined symbol: xf86XInputSetScreen
+
+Upstream-Status: Pending
+
+Taken from Gentoo:
+https://bugs.gentoo.org/show_bug.cgi?id=446432
+
+diff -ur xf86-input-tslib-0.0.6.orig/src/tslib.c xf86-input-tslib-0.0.6/src/tslib.c
+--- xf86-input-tslib-0.0.6.orig/src/tslib.c 2012-12-05 01:12:16.286597071 +0100
++++ xf86-input-tslib-0.0.6/src/tslib.c 2012-12-05 01:11:02.686598595 +0100
+@@ -75,6 +75,19 @@
+ #define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options))
+ #endif
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 13
++static void
++xf86XInputSetScreen(InputInfoPtr pInfo,
++ int screen_number,
++ int x,
++ int y)
++{
++ if (miPointerGetScreen(pInfo->dev) !=
++ screenInfo.screens[screen_number]) {
++ miPointerSetScreen(pInfo->dev, screen_number, x, y);
++ }
++}
++#endif
+
+ enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 };
+
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch
new file mode 100644
index 000000000..6a6d5b92c
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch
@@ -0,0 +1,196 @@
+Upstream-Status: Pending
+
+Taken from debian:
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627075
+
+Index: xf86-input-tslib-trunk/src/tslib.c
+===================================================================
+--- xf86-input-tslib-trunk/src/tslib.c (revision 48)
++++ xf86-input-tslib-trunk/src/tslib.c (working copy)
+@@ -69,6 +69,13 @@
+ #define DEFAULT_HEIGHT 240
+ #define DEFAULT_WIDTH 320
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL)
++#else
++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options))
++#endif
++
++
+ enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 };
+
+ enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 };
+@@ -106,7 +113,7 @@
+ }
+
+ static Bool
+-ConvertProc( LocalDevicePtr local,
++ConvertProc( InputInfoPtr local,
+ int first,
+ int num,
+ int v0,
+@@ -135,7 +142,7 @@
+ return t;
+ }
+
+-static void ReadInput (LocalDevicePtr local)
++static void ReadInput (InputInfoPtr local)
+ {
+ struct ts_priv *priv = (struct ts_priv *) (local->private);
+ struct ts_sample samp;
+@@ -382,7 +389,11 @@
+ axiswidth - 1, /* max val */
+ axiswidth, /* resolution */
+ 0, /* min_res */
+- axiswidth); /* max_res */
++ axiswidth /* max_res */
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++ ,Absolute
++#endif
++ );
+
+ InitValuatorAxisStruct(device, 1,
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+@@ -392,7 +403,11 @@
+ axisheight - 1, /* max val */
+ axisheight, /* resolution */
+ 0, /* min_res */
+- axisheight); /* max_res */
++ axisheight /* max_res */
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++ ,Absolute
++#endif
++ );
+
+ if (InitProximityClassDeviceStruct (device) == FALSE) {
+ ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n");
+@@ -434,7 +449,7 @@
+ ErrorF("%s\n", __FUNCTION__);
+ xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
+ ts_close(priv->ts);
+- xfree(pInfo->private);
++ free(pInfo->private);
+ pInfo->private = NULL;
+ xf86DeleteInput(pInfo, 0);
+ }
+@@ -444,47 +459,57 @@
+ *
+ * called when the module subsection is found in XF86Config
+ */
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
++static int
++xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
++#else
+ static InputInfoPtr
+ xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags)
++#endif
+ {
+ struct ts_priv *priv;
+ char *s;
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+ InputInfoPtr pInfo;
++#endif
+
+- priv = xcalloc (1, sizeof (struct ts_priv));
++ priv = calloc (1, sizeof (struct ts_priv));
+ if (!priv)
+- return NULL;
++ return BadValue;
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+ if (!(pInfo = xf86AllocateInput(drv, 0))) {
+- xfree(priv);
+- return NULL;
++ free(priv);
++ return BadValue;
+ }
+
+ /* Initialise the InputInfoRec. */
+ pInfo->name = dev->identifier;
+- pInfo->type_name = XI_TOUCHSCREEN;
+ pInfo->flags =
+ XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE |
+ XI86_SEND_DRAG_EVENTS;
+- pInfo->device_control = xf86TslibControlProc;
+- pInfo->read_input = ReadInput;
+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ pInfo->motion_history_proc = xf86GetMotionEvents;
+ pInfo->history_size = 0;
+ #endif
+- pInfo->control_proc = NULL;
++ pInfo->conf_idev = dev;
+ pInfo->close_proc = NULL;
+- pInfo->switch_mode = NULL;
+ pInfo->conversion_proc = ConvertProc;
+ pInfo->reverse_conversion_proc = NULL;
+- pInfo->dev = NULL;
+ pInfo->private_flags = 0;
+ pInfo->always_core_feedback = 0;
+- pInfo->conf_idev = dev;
++#endif
++
++ pInfo->type_name = XI_TOUCHSCREEN;
++ pInfo->control_proc = NULL;
++ pInfo->read_input = ReadInput;
++ pInfo->device_control = xf86TslibControlProc;
++ pInfo->switch_mode = NULL;
+ pInfo->private = priv;
++ pInfo->dev = NULL;
+
+ /* Collect the options, and process the common options. */
+- xf86CollectInputOptions(pInfo, NULL, NULL);
++ COLLECT_INPUT_OPTIONS(pInfo, NULL);
+ xf86ProcessCommonOptions(pInfo, pInfo->options);
+
+ priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 );
+@@ -510,23 +535,31 @@
+ priv->rotate = TSLIB_ROTATE_NONE;
+ }
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+ s = xf86CheckStrOption(dev->commonOptions, "path", NULL);
++#else
++ s = xf86CheckStrOption(pInfo->options, "path", NULL);
++#endif
+ if (!s)
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+ s = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
++#else
++ s = xf86CheckStrOption(pInfo->options, "Device", NULL);
++#endif
+
+ priv->ts = ts_open(s, 1);
+- xfree(s);
++ free(s);
+
+ if (!priv->ts) {
+ ErrorF("ts_open failed (device=%s)\n",s);
+ xf86DeleteInput(pInfo, 0);
+- return NULL;
++ return BadValue;
+ }
+
+ if (ts_config(priv->ts)) {
+ ErrorF("ts_config failed\n");
+ xf86DeleteInput(pInfo, 0);
+- return NULL;
++ return BadValue;
+ }
+
+ pInfo->fd = ts_fd(priv->ts);
+@@ -536,11 +569,13 @@
+ priv->state = BUTTON_EMULATION_OFF;
+ }
+
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
+ /* Mark the device configured */
+ pInfo->flags |= XI86_CONFIGURED;
++#endif
+
+ /* Return the configured device */
+- return (pInfo);
++ return Success;
+ }
+
+ _X_EXPORT InputDriverRec TSLIB = {
diff --git a/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch
new file mode 100644
index 000000000..a1f6ba8f9
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch
@@ -0,0 +1,34 @@
+From Grazvydas Ignotas
+
+At least xserver 1.7.4 crashes on XGetPointerControl request because of xf86-input-tslib:
+
+Program received signal SIGSEGV, Segmentation fault.
+#0 0x000355e0 in ProcGetPointerControl (client=0x4a2e58) at devices.c:2122
+#1 0x00062fa8 in Dispatch () at dispatch.c:439
+#2 0x00022444 in main (argc=4, argv=0xbeebedc4, envp=0xbeebedd8) at main.c:285
+
+This happens because ptrfeed field is not set in device structure from tslib.
+To fix this, call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT to get necessary setup done (as done in other input drivers).
+
+---
+diff -ur xf86-input-tslib-0.0.6/src/tslib.c xf86-input-tslib-0.0.6_/src/tslib.c
+--- xf86-input-tslib-0.0.6/src/tslib.c 2010-02-09 12:23:22.000000000 +0200
++++ xf86-input-tslib-0.0.6_/src/tslib.c 2010-02-09 12:37:33.000000000 +0200
+@@ -103,8 +103,6 @@
+ static void
+ PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl)
+ {
+- ErrorF("%s\n", __FUNCTION__);
+- return;
+ }
+
+ static Bool
+@@ -406,6 +404,8 @@
+ xf86MotionHistoryAllocate(pInfo);
+ #endif
+
++ if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc))
++ return !Success;
+ break;
+
+ case DEVICE_ON:
OpenPOWER on IntegriCloud