summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/xorg-driver
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-04-10 13:24:47 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-04-10 14:43:41 +0200
commit89500c583e0f1dc1b4ffdf72914e08e505e427e0 (patch)
treeb073036cc61aa34ca5ac9eec4d617366e0dcb3d5 /meta-oe/recipes-graphics/xorg-driver
parente66079da37992abd54486488aa06a99bf7a4198c (diff)
downloadmeta-openembedded-89500c583e0f1dc1b4ffdf72914e08e505e427e0.tar.gz
recipes,classes: import a lot of recipes from meta-shr
* tested on shr-lite-image for om-gta02 and nokia900 (with meta-shr layer)
Diffstat (limited to 'meta-oe/recipes-graphics/xorg-driver')
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb17
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb17
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi11
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules5
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch20
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch34
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb32
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb9
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch66
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb19
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc40
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc4
-rw-r--r--meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc4
13 files changed, 278 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb
new file mode 100644
index 000000000..cbbc7c717
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb
@@ -0,0 +1,17 @@
1require xorg-driver-input.inc
2
3SUMMARY = "X.Org X server -- keyboard input driver"
4
5DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
6driver supports the standard OS-provided keyboard interface. The driver \
7functions as a keyboard input device, and may be used as the X server's \
8core keyboard."
9
10LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10"
11
12DEPENDS += " kbproto"
13PE = "1"
14PR = "${INC_PR}.0"
15
16SRC_URI[md5sum] = "e2abe9f13e526a73cb68a7d257546eba"
17SRC_URI[sha256sum] = "c46c790fec905d696573b7a374b10ab8b4389112a8f69993fe011006c99e858e"
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb
new file mode 100644
index 000000000..88b304ffa
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb
@@ -0,0 +1,17 @@
1require xorg-driver-input.inc
2
3SUMMARY = "X.Org X server -- mouse input driver"
4
5DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
6supports most available mouse types and interfaces. The mouse driver \
7functions as a pointer input device, and may be used as the X server's \
8core pointer. Multiple mice are supported by multiple instances of this \
9driver."
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=237eb1d1a602d29ef2af62d8fba60f19"
12
13PE = "1"
14PR = "${INC_PR}.0"
15
16SRC_URI[md5sum] = "7f31472689c15b6de62eff04d0fb57d7"
17SRC_URI[sha256sum] = "4e989542b5e9e0c5f9087288b18e70de1064dd27c83a4bc6dce58f3ea9d74994"
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi b/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-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<deviceinfo version="0.2">
3 <device>
4 <match key="info.capabilities" contains="input.touchpad">
5 <merge key="input.x11_driver" type="string">tslib</merge>
6 </match>
7 <match key="info.capabilities" contains="input.touchscreen">
8 <merge key="input.x11_driver" type="string">tslib</merge>
9 </match>
10 </device>
11</deviceinfo>
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules b/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-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules
@@ -0,0 +1,5 @@
1# create /dev/input/touchscreenX symlink, tag xf86-input-tslib as driver
2SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib"
3SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib"
4
5
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch
new file mode 100644
index 000000000..07754731d
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch
@@ -0,0 +1,20 @@
1xorg-server-1.7.3/hw/xfree86/common/xf86Helper.c contains this code
2causing a double free crash on chvt or exit:
3
4 /* This should *really* be handled in drv->UnInit(dev) call instead, but
5 * if the driver forgets about it make sure we free it or at least crash
6 * with flying colors */
7 if (pInp->private)
8 xfree(pInp->private);
9Index: xf86-input-tslib-0.0.6/src/tslib.c
10===================================================================
11--- xf86-input-tslib-0.0.6.orig/src/tslib.c
12+++ xf86-input-tslib-0.0.6/src/tslib.c
13@@ -435,6 +435,7 @@ xf86TslibUninit(InputDriverPtr drv, Inpu
14 xf86TslibControlProc(pInfo->dev, DEVICE_OFF);
15 ts_close(priv->ts);
16 xfree(pInfo->private);
17+ pInfo->private = NULL;
18 xf86DeleteInput(pInfo, 0);
19 }
20
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch
new file mode 100644
index 000000000..a1f6ba8f9
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch
@@ -0,0 +1,34 @@
1From Grazvydas Ignotas
2
3At least xserver 1.7.4 crashes on XGetPointerControl request because of xf86-input-tslib:
4
5Program received signal SIGSEGV, Segmentation fault.
6#0 0x000355e0 in ProcGetPointerControl (client=0x4a2e58) at devices.c:2122
7#1 0x00062fa8 in Dispatch () at dispatch.c:439
8#2 0x00022444 in main (argc=4, argv=0xbeebedc4, envp=0xbeebedd8) at main.c:285
9
10This happens because ptrfeed field is not set in device structure from tslib.
11To fix this, call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT to get necessary setup done (as done in other input drivers).
12
13---
14diff -ur xf86-input-tslib-0.0.6/src/tslib.c xf86-input-tslib-0.0.6_/src/tslib.c
15--- xf86-input-tslib-0.0.6/src/tslib.c 2010-02-09 12:23:22.000000000 +0200
16+++ xf86-input-tslib-0.0.6_/src/tslib.c 2010-02-09 12:37:33.000000000 +0200
17@@ -103,8 +103,6 @@
18 static void
19 PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl)
20 {
21- ErrorF("%s\n", __FUNCTION__);
22- return;
23 }
24
25 static Bool
26@@ -406,6 +404,8 @@
27 xf86MotionHistoryAllocate(pInfo);
28 #endif
29
30+ if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc))
31+ return !Success;
32 break;
33
34 case DEVICE_ON:
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb
new file mode 100644
index 000000000..d5d11ce15
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb
@@ -0,0 +1,32 @@
1require xorg-driver-input.inc
2DESCRIPTION = "X.Org X server -- tslib input driver"
3DEPENDS += "tslib"
4RRECOMMENDS_${PN} += "tslib-calibrate"
5RSUGGESTS_${PN} += "hal"
6
7# derived from xf86-input-void, that's why I kept MIT-X, but it's not clear, see COPYING
8LIC_FILES_CHKSUM = "file://src/tslib.c;endline=28;md5=bd62eaef222dcf5cd59e490a12bd795e \
9 file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94"
10
11PR = "${INC_PR}.1"
12
13SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2;name=archive \
14 file://double-free-crash.patch \
15 file://10-x11-input-tslib.fdi \
16 file://xserver-174-XGetPointerControl.patch \
17 file://99-xf86-input-tslib.rules \
18"
19SRC_URI[md5sum] = "b7a4d2f11637ee3fcf432e044b1d017f"
20SRC_URI[sha256sum] = "5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105"
21
22do_configure_prepend() {
23 rm -rf ${S}/m4/ || true
24}
25do_install_append() {
26 install -d ${D}/${datadir}/hal/fdi/policy/20thirdparty
27 install -m 0644 ${WORKDIR}/10-x11-input-tslib.fdi ${D}/${datadir}/hal/fdi/policy/20thirdparty
28 install -d ${D}/lib/udev/rules.d
29 install -m 0644 ${WORKDIR}/99-xf86-input-tslib.rules ${D}/lib/udev/rules.d/
30}
31
32FILES_${PN} += "${datadir}/hal /lib/udev"
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb
new file mode 100644
index 000000000..d555fbc4b
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb
@@ -0,0 +1,9 @@
1require xorg-driver-video.inc
2LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8"
3
4DESCRIPTION = "X.Org X server -- fbdev display driver"
5PE = "1"
6PR = "${INC_PR}.1"
7
8SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074"
9SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5"
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch
new file mode 100644
index 000000000..0c7350fc1
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch
@@ -0,0 +1,66 @@
1From e2d0f9a3ba7f36b0b8ac8d736dd76da6e5e07f38 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Fri, 29 Oct 2010 11:19:08 +0200
4Subject: [PATCH] glamo-drm: define GLAMO_CMDQ_MAX_COUNT instead of magic constant 1024
5
6* fix check for full queue, because size != count here
7* make sure we have enough space in queue for 2 resp. 4 more commands in
8 GlamoDRMAddCommand resp. GlamoDRMAddCommandBO
9
10Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
11---
12 src/glamo-drm.c | 16 +++++++++++-----
13 1 files changed, 11 insertions(+), 5 deletions(-)
14
15diff --git a/src/glamo-drm.c b/src/glamo-drm.c
16index aac93bb..01e8510 100644
17--- a/src/glamo-drm.c
18+++ b/src/glamo-drm.c
19@@ -32,6 +32,8 @@
20
21 #include "glamo.h"
22
23+/* How many commands can be stored before forced dispatch */
24+#define GLAMO_CMDQ_MAX_COUNT 1024
25
26 /* Submit the prepared command sequence to the kernel */
27 void GlamoDRMDispatch(GlamoPtr pGlamo)
28@@ -60,7 +62,7 @@ void GlamoDRMDispatch(GlamoPtr pGlamo)
29
30 void GlamoDRMAddCommand(GlamoPtr pGlamo, uint16_t reg, uint16_t val)
31 {
32- if ( pGlamo->cmdq_drm_used == pGlamo->cmdq_drm_size ) {
33+ if ( pGlamo->cmdq_drm_used >= GLAMO_CMDQ_MAX_COUNT - 2 ) {
34 xf86DrvMsg(pGlamo->pScreen->myNum, X_INFO,
35 "Forced command cache flush.\n");
36 GlamoDRMDispatch(pGlamo);
37@@ -74,7 +76,8 @@ void GlamoDRMAddCommand(GlamoPtr pGlamo, uint16_t reg, uint16_t val)
38
39 void GlamoDRMAddCommandBO(GlamoPtr pGlamo, uint16_t reg, struct glamo_bo *bo)
40 {
41- if ( pGlamo->cmdq_drm_used == pGlamo->cmdq_drm_size ) {
42+ if ( pGlamo->cmdq_drm_used >= GLAMO_CMDQ_MAX_COUNT - 4 ||
43+ pGlamo->cmdq_obj_used >= GLAMO_CMDQ_MAX_COUNT) {
44 xf86DrvMsg(pGlamo->pScreen->myNum, X_INFO,
45 "Forced command cache flush.\n");
46 GlamoDRMDispatch(pGlamo);
47@@ -98,10 +101,13 @@ void GlamoDRMAddCommandBO(GlamoPtr pGlamo, uint16_t reg, struct glamo_bo *bo)
48
49 void GlamoDRMInit(GlamoPtr pGlamo)
50 {
51- pGlamo->cmdq_objs = malloc(1024);
52- pGlamo->cmdq_obj_pos = malloc(1024);
53+ pGlamo->cmdq_objs = malloc(GLAMO_CMDQ_MAX_COUNT);
54+ pGlamo->cmdq_obj_pos = malloc(GLAMO_CMDQ_MAX_COUNT);
55 pGlamo->cmdq_obj_used = 0;
56 pGlamo->cmdq_drm_used = 0;
57- pGlamo->cmdq_drm_size = 4 * 1024;
58+ /* we're using 2bytes per entry (uint16_t) that's why we need to allocate
59+ * GLAMO_CMDQ_MAX_COUNT * 2 bytes
60+ */
61+ pGlamo->cmdq_drm_size = 2 * GLAMO_CMDQ_MAX_COUNT;
62 pGlamo->cmdq_drm = malloc(pGlamo->cmdq_drm_size);
63 }
64--
651.7.3.2
66
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb
new file mode 100644
index 000000000..c9e1d5699
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb
@@ -0,0 +1,19 @@
1require xorg-driver-video.inc
2DESCRIPTION = "X.Org X server -- Glamo display driver with KMS support"
3DEPENDS += "libdrm"
4
5LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8"
6
7RDEPENDS_${PN} = "xserver-xorg-extension-dri xserver-xorg-extension-dri2 xserver-xorg-extension-glx mesa-dri"
8PE = "2"
9PV = "1.0.0+gitr${SRCPV}"
10PR = "${INC_PR}.5"
11
12SRC_URI = "git://git.openmoko.org/git/xf86-video-glamo.git;protocol=git;branch=master \
13 file://0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch \
14 "
15
16S = "${WORKDIR}/git"
17SRCREV = "16af3c00195adc68cbd508e3613be4b2349260b3"
18
19EXTRA_OECONF = " --enable-kms "
diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc
new file mode 100644
index 000000000..970b0d176
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -0,0 +1,40 @@
1DESCRIPTION = "X driver"
2HOMEPAGE = "http://www.x.org"
3SECTION = "x11/drivers"
4LICENSE = "MIT-X"
5INC_PR = "r15"
6
7DEPENDS = "randrproto xorg-server xproto"
8
9SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
10
11S = "${WORKDIR}/${BPN}-${PV}"
12
13FILES_${PN} += " ${libdir}/xorg/modules"
14FILES_${PN}-dbg += "${libdir}/xorg/modules/*/.debug"
15
16inherit autotools pkgconfig
17
18TARGET_CPPFLAGS += "-I${STAGING_DIR_HOST}/usr/include/xorg"
19
20# Another sucky behavor from Xorg configure scripts.
21# They use AC_CHECK_FILE to check for DRI headers. Yuck!
22# Of course this will blow up when cross compiling.
23
24do_configure_prepend() {
25 incdir=${layout_includedir}/xorg
26 for f in dri.h sarea.h dristruct.h exa.h damage.h xf86Module.h; do
27 path="$incdir/$f"
28 if [ -f "${STAGING_DIR_HOST}/$path" ]; then
29 p=`echo "$path" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'`
30 eval "export ac_cv_file_$p=yes"
31 fi
32 done
33}
34
35# FIXME: We don't want to include the libtool archives (*.la) from modules
36# directory, as they serve no useful purpose. Upstream should fix Makefile.am
37do_install_append() {
38 find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
39}
40
diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc
new file mode 100644
index 000000000..e44dbd58f
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -0,0 +1,4 @@
1include xorg-driver-common.inc
2
3DEPENDS = "randrproto inputproto xserver-xorg xproto"
4
diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc
new file mode 100644
index 000000000..36b5b7595
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -0,0 +1,4 @@
1include xorg-driver-common.inc
2
3DEPENDS = "randrproto renderproto videoproto xextproto fontsproto xserver-xorg xproto"
4