aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <zimmermann@vdm-design.de>2009-10-20 08:07:19 +0000
committerKlaus Kurzmann <mok@fluxnetz.de>2009-10-20 12:07:20 +0200
commit59d1dea095a75ee5aa750f6bdab07ee44c53447d (patch)
tree64bee6cd8ac8c703bd23c17089a5f3f251036e58
parentd6fa2cf84351e0bfdaaa06d7f2a70032ce9590dd (diff)
downloadopenembedded-59d1dea095a75ee5aa750f6bdab07ee44c53447d.zip
openembedded-59d1dea095a75ee5aa750f6bdab07ee44c53447d.tar.gz
openembedded-59d1dea095a75ee5aa750f6bdab07ee44c53447d.tar.bz2
shr/import: xf86-input-tslib: patch for xserver-1.7 + additional patches from open-wrt
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/011-ifdef-debug-output.patch50
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/012-deleteinput.patch30
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/015-add-randr-support.patch35
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/020-close-tsdevice-when-module-is-uninitialized.patch15
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/025-XI3.patch12
-rw-r--r--recipes/xorg-driver/xf86-input-tslib/031-xserver-1.7.patch75
-rw-r--r--recipes/xorg-driver/xf86-input-tslib_0.0.5.bb12
7 files changed, 226 insertions, 3 deletions
diff --git a/recipes/xorg-driver/xf86-input-tslib/011-ifdef-debug-output.patch b/recipes/xorg-driver/xf86-input-tslib/011-ifdef-debug-output.patch
new file mode 100644
index 0000000..a5c4c6b
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/011-ifdef-debug-output.patch
@@ -0,0 +1,50 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-09-22 13:30:23.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-09-22 13:30:23.000000000 +0200
+@@ -80,21 +80,27 @@
+ static void
+ BellProc(int percent, DeviceIntPtr pDev, pointer ctrl, int unused)
+ {
++#ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
++#endif
+ return;
+ }
+
+ static void
+ KeyControlProc(DeviceIntPtr pDev, KeybdCtrl * ctrl)
+ {
++#ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
++#endif
+ return;
+ }
+
+ static void
+ PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl)
+ {
++#ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
++#endif
+ return;
+ }
+
+@@ -186,7 +192,9 @@
+ int i;
+ struct ts_priv *priv;
+
++#ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
++#endif
+ pInfo = device->public.devicePrivate;
+ priv = pInfo->private;
+
+@@ -258,7 +266,9 @@
+ static void
+ xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ {
++#ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
++#endif
+ xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
+ xfree(pInfo->private);
+ }
diff --git a/recipes/xorg-driver/xf86-input-tslib/012-deleteinput.patch b/recipes/xorg-driver/xf86-input-tslib/012-deleteinput.patch
new file mode 100644
index 0000000..cb66ed3
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/012-deleteinput.patch
@@ -0,0 +1,30 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-09-22 13:35:15.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-09-22 13:35:15.000000000 +0200
+@@ -271,6 +271,7 @@
+ #endif
+ xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
+ xfree(pInfo->private);
++ xf86DeleteInput(pInfo, 0);
+ }
+
+ /*
+@@ -347,15 +348,17 @@
+ s = xf86SetStrOption(pInfo->options, "TslibDevice", NULL);
+
+ priv->ts = ts_open(s, 0);
++ xfree(s);
++
+ if (!priv->ts) {
+ ErrorF("ts_open failed (device=%s)\n",s);
++ xf86DeleteInput(pInfo, 0);
+ return NULL;
+ }
+
+- xfree(s);
+-
+ if (ts_config(priv->ts)) {
+ ErrorF("ts_config failed\n");
++ xf86DeleteInput(pInfo, 0);
+ return NULL;
+ }
+
diff --git a/recipes/xorg-driver/xf86-input-tslib/015-add-randr-support.patch b/recipes/xorg-driver/xf86-input-tslib/015-add-randr-support.patch
new file mode 100644
index 0000000..1122008
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/015-add-randr-support.patch
@@ -0,0 +1,35 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-09-22 13:37:56.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-09-22 13:37:56.000000000 +0200
+@@ -128,6 +128,8 @@
+ struct ts_sample samp;
+ int ret;
+ int x,y;
++ ScrnInfoPtr pScrn = xf86Screens[priv->screen_num];
++ Rotation rotation = rrGetScrPriv (pScrn->pScreen) ? RRGetRotation(pScrn->pScreen) : RR_Rotate_0;
+
+ ret = ts_read(priv->ts, &samp, 1);
+
+@@ -154,6 +156,23 @@
+ default: break;
+ }
+
++ tmp_x = samp.x;
++
++ switch(rotation) {
++ case RR_Rotate_90:
++ samp.x = (priv->height - samp.y - 1) * priv->width / priv->height;
++ samp.y = tmp_x * priv->height / priv->width;
++ break;
++ case RR_Rotate_180:
++ samp.x = priv->width - samp.x - 1;
++ samp.y = priv->height - samp.y - 1;
++ break;
++ case RR_Rotate_270:
++ samp.x = samp.y * priv->width / priv->height;
++ samp.y = (priv->width - tmp_x - 1) * priv->height / priv->width;
++ break;
++ }
++
+ priv->lastx = samp.x;
+ priv->lasty = samp.y;
+ x = samp.x;
diff --git a/recipes/xorg-driver/xf86-input-tslib/020-close-tsdevice-when-module-is-uninitialized.patch b/recipes/xorg-driver/xf86-input-tslib/020-close-tsdevice-when-module-is-uninitialized.patch
new file mode 100644
index 0000000..36b9bd3
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/020-close-tsdevice-when-module-is-uninitialized.patch
@@ -0,0 +1,15 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-09-22 13:39:28.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-09-22 13:39:28.000000000 +0200
+@@ -285,10 +285,12 @@
+ static void
+ xf86TslibUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ {
++ struct ts_priv *priv = (struct ts_priv *)(pInfo->private);
+ #ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
+ #endif
+ xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
++ ts_close(priv->ts);
+ xfree(pInfo->private);
+ xf86DeleteInput(pInfo, 0);
+ }
diff --git a/recipes/xorg-driver/xf86-input-tslib/025-XI3.patch b/recipes/xorg-driver/xf86-input-tslib/025-XI3.patch
new file mode 100644
index 0000000..7d3d635
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/025-XI3.patch
@@ -0,0 +1,12 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-09-22 13:41:00.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-09-22 13:41:00.000000000 +0200
+@@ -233,7 +233,9 @@
+
+ if (InitValuatorClassDeviceStruct(device,
+ 2,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+ xf86GetMotionEvents,
++#endif
+ 0, Absolute) == FALSE) {
+ ErrorF("unable to allocate Valuator class device\n");
+ return !Success;
diff --git a/recipes/xorg-driver/xf86-input-tslib/031-xserver-1.7.patch b/recipes/xorg-driver/xf86-input-tslib/031-xserver-1.7.patch
new file mode 100644
index 0000000..7c78c02
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib/031-xserver-1.7.patch
@@ -0,0 +1,75 @@
+--- xf86-input-tslib-0.0.5/src/tslib.c~ 2009-10-20 11:00:38.000000000 +0200
++++ xf86-input-tslib-0.0.5/src/tslib.c 2009-10-20 11:00:38.000000000 +0200
+@@ -48,6 +48,7 @@
+ #include <exevents.h> /* Needed for InitValuator/Proximity stuff */
+ #include <X11/keysym.h>
+ #include <mipointer.h>
++#include <xserver-properties.h>
+
+ #include <tslib.h>
+
+@@ -210,6 +211,15 @@
+ unsigned char map[MAXBUTTONS + 1];
+ int i;
+ struct ts_priv *priv;
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ Atom buttons[MAXBUTTONS];
++ Atom axes[2];
++
++ axes[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
++ axes[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
++
++ buttons[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
++#endif
+
+ #ifdef DEBUG
+ ErrorF("%s\n", __FUNCTION__);
+@@ -225,15 +235,19 @@
+ map[i + 1] = i + 1;
+ }
+
+- if (InitButtonClassDeviceStruct(device,
+- MAXBUTTONS, map) == FALSE) {
++ if (InitButtonClassDeviceStruct(device, MAXBUTTONS,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ buttons,
++#endif
++ map) == FALSE) {
+ ErrorF("unable to allocate Button class device\n");
+ return !Success;
+ }
+
+- if (InitValuatorClassDeviceStruct(device,
+- 2,
+-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
++ if (InitValuatorClassDeviceStruct(device, 2,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ axes,
++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+ xf86GetMotionEvents,
+ #endif
+ 0, Absolute) == FALSE) {
+@@ -241,13 +255,21 @@
+ return !Success;
+ }
+
+- InitValuatorAxisStruct(device, 0, 0, /* min val */
++ InitValuatorAxisStruct(device, 0,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ axes[0],
++#endif
++ 0, /* min val */
+ priv->width - 1, /* max val */
+ priv->width, /* resolution */
+ 0, /* min_res */
+ priv->width); /* max_res */
+
+- InitValuatorAxisStruct(device, 1, 0, /* min val */
++ InitValuatorAxisStruct(device, 1,
++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
++ axes[1],
++#endif
++ 0, /* min val */
+ priv->height - 1,/* max val */
+ priv->height, /* resolution */
+ 0, /* min_res */
diff --git a/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb b/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
index f5c0186..cc8528f 100644
--- a/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
+++ b/recipes/xorg-driver/xf86-input-tslib_0.0.5.bb
@@ -4,13 +4,19 @@ DESCRIPTION = "X.Org X server -- tslib input driver"
RRECOMMENDS += "hal"
DEPENDS += "tslib"
-PR = "r6"
+PR = "r8"
SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2 \
+ file://011-ifdef-debug-output.patch;patch=1 \
+ file://012-deleteinput.patch;patch=1 \
+ file://015-add-randr-support.patch;patch=1 \
+ file://020-close-tsdevice-when-module-is-uninitialized.patch;patch=1 \
+ file://025-XI3.patch;patch=1 \
+ file://031-xserver-1.7.patch;patch=1 \
file://use-hal-for-device.diff;patch=1 \
- file://01_fix-wrong-value-range-for-the-axises.diff;patch=1 \
file://dynamic-xy.patch;patch=1 \
- file://10-x11-input-tslib.fdi"
+ file://10-x11-input-tslib.fdi \
+ "
do_configure_prepend() {
rm -rf ${S}/m4/ || true