summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorJ. Aaron Gamble <john.gamble@windriver.com>2010-10-27 11:03:17 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-10 21:22:26 +0800
commita8b11645e48f7a86be96322bda249574ae100f1f (patch)
tree9348a21e7bed5c2e954325024238b597e7df4539 /meta/recipes-graphics
parent93eae97ca290063bea13467e4af59af23c67dbe2 (diff)
downloadpoky-a8b11645e48f7a86be96322bda249574ae100f1f.tar.gz
tslib: 32bit big endian support
Fixes [BUGID #394] patch added from: https://launchpad.net/ubuntu/+source/tslib/1.0-7 Enables wacom tablet/touchscreen support on qemumips Signed-off-by: J. Aaron Gamble <john.gamble@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/tslib/tslib/32bitBE-support.patch52
-rw-r--r--meta/recipes-graphics/tslib/tslib_1.0.bb4
2 files changed, 55 insertions, 1 deletions
diff --git a/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch
new file mode 100644
index 0000000000..3262f16c6d
--- /dev/null
+++ b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch
@@ -0,0 +1,52 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 030-32bitBE-support.dpatch by Neil Williams <codehelp@debian.org>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: See bug #496759 - being tested upstream for 32bit BE devices
6
7@DPATCH@
8diff -urNad tslib-1.0~/plugins/input-raw.c tslib-1.0/plugins/input-raw.c
9--- tslib-1.0~/plugins/input-raw.c 2008-12-09 10:56:47.000000000 +0000
10+++ tslib-1.0/plugins/input-raw.c 2008-12-09 11:05:41.000000000 +0000
11@@ -44,25 +44,33 @@
12 int using_syn;
13 };
14
15+#define BITS_PER_LONG (sizeof(long) * 8)
16+#ifndef EV_CNT
17+#define EV_CNT (EV_MAX+1)
18+#endif
19+#ifndef ABS_CNT
20+#define ABS_CNT (ABS_MAX+1)
21+#endif
22+
23 static int check_fd(struct tslib_input *i)
24 {
25 struct tsdev *ts = i->module.dev;
26 int version;
27- u_int32_t bit;
28- u_int64_t absbit;
29+ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
30+ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
31
32 if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
33 (version == EV_VERSION) &&
34- (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
35- (bit & (1 << EV_ABS)) &&
36- (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
37- (absbit & (1 << ABS_X)) &&
38- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
39+ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
40+ (bit[0] & (1 << EV_ABS)) &&
41+ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
42+ (absbit[0] & (1 << ABS_X)) &&
43+ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
44 fprintf(stderr, "selected device is not a touchscreen I understand\n");
45 return -1;
46 }
47
48- if (bit & (1 << EV_SYN))
49+ if (bit[0] & (1 << EV_SYN))
50 i->using_syn = 1;
51
52 return 0;
diff --git a/meta/recipes-graphics/tslib/tslib_1.0.bb b/meta/recipes-graphics/tslib/tslib_1.0.bb
index 12c0ace8f8..8db90d9440 100644
--- a/meta/recipes-graphics/tslib/tslib_1.0.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.0.bb
@@ -6,7 +6,7 @@ SECTION = "base"
6LICENSE = "LGPLv2" 6LICENSE = "LGPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a" 7LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a"
8 8
9PR = "r15" 9PR = "r16"
10 10
11SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \ 11SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \
12 file://fix_version.patch;patch=1 \ 12 file://fix_version.patch;patch=1 \
@@ -16,6 +16,8 @@ SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \
16 file://tslib.sh" 16 file://tslib.sh"
17SRC_URI_append_mnci += " file://devfs.patch;patch=1" 17SRC_URI_append_mnci += " file://devfs.patch;patch=1"
18SRC_URI_append_mnci += " file://event1.patch;patch=1" 18SRC_URI_append_mnci += " file://event1.patch;patch=1"
19SRC_URI_append_qemumips += " file://32bitBE-support.patch;patch=1"
20
19 21
20inherit autotools pkgconfig 22inherit autotools pkgconfig
21 23