summaryrefslogtreecommitdiffstats
path: root/meta/packages/xorg-xserver/xserver-kdrive-xomap
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-30 22:10:02 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-30 22:10:02 +0000
commit0e937cbeb792e5df2975888b6f102a62d0b57126 (patch)
treeb61315810919fffb6a120e4880eebf9613a6e239 /meta/packages/xorg-xserver/xserver-kdrive-xomap
parent0eefd09740ae45e32223646066ded0bd8725c01d (diff)
downloadpoky-0e937cbeb792e5df2975888b6f102a62d0b57126.tar.gz
Add xserver-kdrive-xomap
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1225 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/xorg-xserver/xserver-kdrive-xomap')
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch137
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch20
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch37
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch12
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch23
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch14
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch446
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch503
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch53
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch43
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch13
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch54
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch73
-rw-r--r--meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch82
14 files changed, 1510 insertions, 0 deletions
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
new file mode 100644
index 0000000000..df5bbe2abf
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch
@@ -0,0 +1,137 @@
1---
2 configure |38107 -----------------------------------------------------------
3 configure.ac | 2 -
4 hw/kdrive/linux/tslib.c | 68 ++++++++++++++++++++++++++----------------------
5 2 files changed, 39 insertions(+), 31 deletions(-)
6
7
8Index: xorg-server-1.1.99.3/configure.ac
9===================================================================
10--- xorg-server-1.1.99.3.orig/configure.ac 2007-01-30 00:22:41.000000000 +0000
11+++ xorg-server-1.1.99.3/configure.ac 2007-01-30 00:22:41.000000000 +0000
12@@ -717,7 +717,7 @@ fi
13
14 if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
15 AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
16- REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
17+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateext"
18 else
19 XCALIBRATE=no
20 fi
21Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c
22===================================================================
23--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-30 00:44:13.000000000 +0000
24+++ xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c 2007-01-30 21:55:52.000000000 +0000
25@@ -47,6 +47,10 @@
26
27 #define TSLIB_QUEUE_SIZE 3
28
29+/* For XCalibrate extension */
30+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
31+void *tslib_raw_event_closure;
32+
33 struct TslibPrivate {
34 int fd;
35 int lastx, lasty;
36@@ -76,6 +80,19 @@ TsRead (int fd, void *closure)
37 unsigned long flags = 0;
38 int discard = 0;
39
40+ if (tslib_raw_event_hook)
41+ {
42+ /* XCalibrate Ext */
43+ if (ts_read_raw(private->tsDev, &event, 1) == 1)
44+ {
45+ tslib_raw_event_hook (event.x,
46+ event.y,
47+ event.pressure,
48+ tslib_raw_event_closure);
49+ }
50+ return;
51+ }
52+
53 if (!private->tsDev) {
54 DebugF("[tslib] EXTREME BADNESS: TsRead called while tsDev is null!\n");
55 return;
56@@ -322,14 +339,14 @@ TsRead (int fd, void *closure)
57 }
58 }
59
60-/* must always be NULL-terminated. */
61-char *valid_ts_names[] = {
62- "ADS784x Touchscreen",
63- "omap-ts",
64- "TSC2301 touchscreen",
65- NULL
66+static char *TsNames[] = {
67+ NULL, /* set via TSLIB_TSDEVICE */
68+ "/dev/ts",
69+ "/dev/touchscreen/0",
70 };
71
72+#define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0]))
73+
74 #define TS_NAME_SIZE 32
75
76 static Status
77@@ -383,11 +400,10 @@ TslibDisable (KdPointerInfo *pi)
78 private->tsDev = NULL;
79 }
80
81-
82 static Status
83 TslibInit (KdPointerInfo *pi)
84 {
85- int fd = 0, i = 0;
86+ int fd = 0, i = 0, j = 0;
87 char devpath[PATH_MAX], devname[TS_NAME_SIZE];
88 DIR *inputdir = NULL;
89 struct dirent *inputent = NULL;
90@@ -397,33 +413,25 @@ TslibInit (KdPointerInfo *pi)
91 return !Success;
92
93 if (!pi->path || strcmp(pi->path, "auto") == 0) {
94- if (!(inputdir = opendir("/dev/input"))) {
95- ErrorF("[tslib/TslibInit]: couldn't open /dev/input!\n");
96- return BadMatch;
97- }
98
99- while ((inputent = readdir(inputdir))) {
100- if (strncmp(inputent->d_name, "event", 5) != 0)
101- continue;
102+ if ((TsNames[0] = getenv("TSLIB_TSDEVICE")) == NULL)
103+ j++;
104+
105+ for (i = j; i < NUM_TS_NAMES; i++)
106+ {
107+ struct tsdev *tsDev;
108
109- snprintf(devpath, PATH_MAX, "/dev/input/%s", inputent->d_name);
110- fd = open(devpath, O_RDWR);
111+ if(!(tsDev = ts_open(TsNames[i], 0)))
112+ continue;
113
114- if (!ioctl(fd, EVIOCGNAME(sizeof(devname)), devname)) {
115- close(fd);
116+ if (ts_config(tsDev))
117 continue;
118- }
119- close(fd);
120
121- for (i = 0; valid_ts_names[i]; i++) {
122- if (strcmp(devname, valid_ts_names[i]) == 0) {
123- pi->path = KdSaveString(devpath);
124- break;
125- }
126- }
127- }
128-
129- closedir(inputdir);
130+ ts_close(tsDev);
131+
132+ pi->path = KdSaveString(TsNames[i]);
133+ break;
134+ }
135 }
136
137 if (!pi->path || strcmp(pi->path, "auto") == 0) {
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch
new file mode 100644
index 0000000000..bd8842721b
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-apm.patch
@@ -0,0 +1,20 @@
1--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
2+++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
3@@ -342,7 +342,7 @@
4 /*
5 * Open the APM driver
6 */
7- LinuxApmFd = open ("/dev/apm_bios", 2);
8+ /*LinuxApmFd = open ("/dev/apm_bios", 2);
9 if (LinuxApmFd < 0 && errno == ENOENT)
10 LinuxApmFd = open ("/dev/misc/apm_bios", 2);
11 if (LinuxApmFd >= 0)
12@@ -352,7 +352,7 @@
13 RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
14 AddEnabledDevice (LinuxApmFd);
15 }
16-
17+ */
18 /*
19 * now get the VT
20 */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch
new file mode 100644
index 0000000000..9c43e52ead
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/disable-xf86-dga-xorgcfg.patch
@@ -0,0 +1,37 @@
1--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
2+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
3@@ -505,7 +505,11 @@
4 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
5
6 dnl Core modules for most extensions, et al.
7+if test "$KDRIVE" = yes; then
8+REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto"
9+else
10 REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto"
11+fi
12 REQUIRED_LIBS="xfont xau fontenc"
13
14 AM_CONDITIONAL(XV, [test "x$XV" = xyes])
15@@ -1514,7 +1526,9 @@
16 AC_SUBST(XKB_COMPILED_DIR)
17
18 dnl and the rest of these are generic, so they're in config.h
19+if test ! x"$KDRIVE" = xyes; then
20 AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
21+fi
22 AC_DEFINE(XResExtension, 1, [Build XRes extension])
23
24 dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined
25@@ -1534,10 +1548,12 @@
26
27 AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
28
29+if test ! "x$KDRIVE" = xyes ; then
30 dnl xorgconfig CLI configuration utility
31 PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11])
32 AC_SUBST(XORGCONFIG_DEP_CFLAGS)
33 AC_SUBST(XORGCONFIG_DEP_LIBS)
34+fi
35
36 dnl xorgcfg GUI configuration utility
37 AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch
new file mode 100644
index 0000000000..13a6c2c954
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-builtin-fonts.patch
@@ -0,0 +1,12 @@
1--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
2+++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
3@@ -52,8 +52,8 @@
4 /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
5
6 #define NEED_REPLIES
7 #ifdef HAVE_DIX_CONFIG_H
8-#include <dix-config.h>
9+#include <kdrive-config.h>
10 #endif
11
12 #include <X11/X.h>
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch
new file mode 100644
index 0000000000..e488657b74
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/enable-tslib.patch
@@ -0,0 +1,23 @@
1--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
2+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
3@@ -1438,6 +1446,10 @@
4 fi
5
6- # tslib...
7+ AC_CHECK_HEADERS([tslib.h])
8+ if test "$ac_cv_header_tslib_h" = yes; then
9+ AC_DEFINE(TSLIB, 1, [Build kdrive with tslib support])
10+ AC_DEFINE(TOUCHSCREEN, 1, [Build kdrive with touchscreen support])
11+ fi
12
13 # damage shadow extension glx (NOTYET) fb mi
14 KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
15@@ -1467,7 +1479,7 @@
16 AC_SUBST(KDRIVE_CFLAGS)
17 AC_SUBST(KDRIVE_PURE_LIBS)
18 AC_SUBST(KDRIVE_LIBS)
19-AM_CONDITIONAL(TSLIB, false)
20+AM_CONDITIONAL(TSLIB, [test x"$ac_cv_header_tslib_h" = xyes])
21 AM_CONDITIONAL(H3600_TS, false)
22 AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
23 AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch
new file mode 100644
index 0000000000..f87e7cc2cd
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fbdev-not-fix.patch
@@ -0,0 +1,14 @@
1--- xserver/hw/kdrive/fbdev/fbdev.c~ 2004-09-15 00:08:10.000000000 +0100
2+++ xserver/hw/kdrive/fbdev/fbdev.c 2004-11-13 17:47:02.000000000 +0000
3@@ -198,6 +198,11 @@
4 return FALSE;
5 }
6
7+ /* Re-get the "fixed" parameters since they might have changed */
8+ k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix);
9+ if (k < 0)
10+ perror ("FBIOGET_FSCREENINFO");
11+
12 /* Now get the new screeninfo */
13 ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
14 depth = priv->var.bits_per_pixel;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch
new file mode 100644
index 0000000000..09c9e8909c
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/fixups.patch
@@ -0,0 +1,446 @@
1---
2 Xi/chgdctl.c | 55 +++++++++++++++++++------
3 Xi/getdctl.c | 87 +++++++++++++++++++++++++++++++----------
4 Xi/getdctl.h | 11 +++--
5 Xi/stubs.c | 2
6 configure.ac | 2
7 dix/devices.c | 31 +++++++++-----
8 hw/kdrive/linux/tslib.c | 8 +--
9 hw/kdrive/src/kinput.c | 6 +-
10 hw/xfree86/common/xf86Xinput.c | 3 -
11 include/input.h | 2
12 include/inputstr.h | 18 +++++++-
13 11 files changed, 162 insertions(+), 63 deletions(-)
14
15Index: xorg-server-1.1.99.3/Xi/chgdctl.c
16===================================================================
17--- xorg-server-1.1.99.3.orig/Xi/chgdctl.c 2007-01-29 22:58:18.000000000 +0000
18+++ xorg-server-1.1.99.3/Xi/chgdctl.c 2007-01-29 22:59:27.000000000 +0000
19@@ -104,8 +104,10 @@ ProcXChangeDeviceControl(ClientPtr clien
20 xChangeDeviceControlReply rep;
21 AxisInfoPtr a;
22 CARD32 *resolution;
23- xDeviceTSCtl *ts;
24+ xDeviceAbsCalibCtl *calib;
25+ xDeviceAbsAreaCtl *area;
26 xDeviceCoreCtl *c;
27+ xDeviceEnableCtl *e;
28
29 REQUEST(xChangeDeviceControlReq);
30 REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
31@@ -170,25 +172,28 @@ ProcXChangeDeviceControl(ClientPtr clien
32 return Success;
33 }
34 break;
35- case DEVICE_TOUCHSCREEN:
36- ts = (xDeviceTSCtl *)&stuff[1];
37-
38- if (ts->button_threshold < 0 || ts->button_threshold > 255) {
39+ case DEVICE_ABS_CALIB:
40+ calib = (xDeviceAbsCalibCtl *)&stuff[1];
41+
42+ if (calib->button_threshold < 0 || calib->button_threshold > 255) {
43 SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0,
44 BadValue);
45 return Success;
46 }
47
48- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) ts);
49+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) calib);
50
51 if (status == Success) {
52- dev->touchscreen->min_x = ts->min_x;
53- dev->touchscreen->max_x = ts->max_x;
54- dev->touchscreen->min_y = ts->min_y;
55- dev->touchscreen->max_y = ts->max_y;
56- dev->touchscreen->button_threshold = ts->button_threshold;
57- } else if (status == DeviceBusy) {
58- rep.status = DeviceBusy;
59+ dev->absolute->min_x = calib->min_x;
60+ dev->absolute->max_x = calib->max_x;
61+ dev->absolute->min_y = calib->min_y;
62+ dev->absolute->max_y = calib->max_y;
63+ dev->absolute->flip_x = calib->flip_x;
64+ dev->absolute->flip_y = calib->flip_y;
65+ dev->absolute->rotation = calib->rotation;
66+ dev->absolute->button_threshold = calib->button_threshold;
67+ } else if (status == DeviceBusy || status == BadValue) {
68+ rep.status = status;
69 WriteReplyToClient(client, sizeof(xChangeDeviceControlReply),
70 &rep);
71 return Success;
72@@ -199,6 +204,30 @@ ProcXChangeDeviceControl(ClientPtr clien
73 }
74
75 break;
76+ case DEVICE_ABS_AREA:
77+ area = (xDeviceAbsAreaCtl *)&stuff[1];
78+
79+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) area);
80+
81+ if (status == Success) {
82+ dev->absolute->offset_x = area->offset_x;
83+ dev->absolute->offset_y = area->offset_y;
84+ dev->absolute->width = area->width;
85+ dev->absolute->height = area->height;
86+ dev->absolute->screen = area->screen;
87+ dev->absolute->following = area->following;
88+ } else if (status == DeviceBusy || status == BadValue) {
89+ rep.status = status;
90+ WriteReplyToClient(client, sizeof(xChangeDeviceControlReply),
91+ &rep);
92+ return Success;
93+ } else {
94+ SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0,
95+ BadMatch);
96+ return Success;
97+ }
98+
99+ break;
100 case DEVICE_CORE:
101 c = (xDeviceCoreCtl *)&stuff[1];
102
103Index: xorg-server-1.1.99.3/Xi/getdctl.c
104===================================================================
105--- xorg-server-1.1.99.3.orig/Xi/getdctl.c 2007-01-29 22:58:18.000000000 +0000
106+++ xorg-server-1.1.99.3/Xi/getdctl.c 2007-01-29 22:59:27.000000000 +0000
107@@ -124,14 +124,23 @@ ProcXGetDeviceControl(ClientPtr client)
108 total_length = sizeof(xDeviceResolutionState) +
109 (3 * sizeof(int) * dev->valuator->numAxes);
110 break;
111- case DEVICE_TOUCHSCREEN:
112- if (!dev->touchscreen) {
113+ case DEVICE_ABS_CALIB:
114+ if (!dev->absolute) {
115 SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
116 BadMatch);
117 return Success;
118 }
119
120- total_length = sizeof(xDeviceTSCtl);
121+ total_length = sizeof(xDeviceAbsCalibCtl);
122+ break;
123+ case DEVICE_ABS_AREA:
124+ if (!dev->absolute) {
125+ SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
126+ BadMatch);
127+ return Success;
128+ }
129+
130+ total_length = sizeof(xDeviceAbsAreaCtl);
131 break;
132 case DEVICE_CORE:
133 total_length = sizeof(xDeviceCoreCtl);
134@@ -152,8 +161,11 @@ ProcXGetDeviceControl(ClientPtr client)
135 case DEVICE_RESOLUTION:
136 CopySwapDeviceResolution(client, dev->valuator, buf, total_length);
137 break;
138- case DEVICE_TOUCHSCREEN:
139- CopySwapDeviceTouchscreen(client, dev->touchscreen, buf);
140+ case DEVICE_ABS_CALIB:
141+ CopySwapDeviceAbsCalib(client, dev->absolute, buf);
142+ break;
143+ case DEVICE_ABS_AREA:
144+ CopySwapDeviceAbsArea(client, dev->absolute, buf);
145 break;
146 case DEVICE_CORE:
147 CopySwapDeviceCore(client, dev, buf);
148@@ -206,28 +218,61 @@ CopySwapDeviceResolution(ClientPtr clien
149 }
150 }
151
152-void CopySwapDeviceTouchscreen (ClientPtr client, TouchscreenClassPtr dts,
153+void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts,
154 char *buf)
155 {
156 register char n;
157- xDeviceTSState *ts = (xDeviceTSState *) buf;
158+ xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf;
159
160- ts->control = DEVICE_TOUCHSCREEN;
161- ts->length = sizeof(ts);
162- ts->min_x = dts->min_x;
163- ts->max_x = dts->max_x;
164- ts->min_y = dts->min_y;
165- ts->max_y = dts->max_y;
166- ts->button_threshold = dts->button_threshold;
167+ calib->control = DEVICE_ABS_CALIB;
168+ calib->length = sizeof(calib);
169+ calib->min_x = dts->min_x;
170+ calib->max_x = dts->max_x;
171+ calib->min_y = dts->min_y;
172+ calib->max_y = dts->max_y;
173+ calib->flip_x = dts->flip_x;
174+ calib->flip_y = dts->flip_y;
175+ calib->rotation = dts->rotation;
176+ calib->button_threshold = dts->button_threshold;
177
178 if (client->swapped) {
179- swaps(&ts->control, n);
180- swaps(&ts->length, n);
181- swapl(&ts->min_x, n);
182- swapl(&ts->max_x, n);
183- swapl(&ts->min_y, n);
184- swapl(&ts->max_y, n);
185- swapl(&ts->button_threshold, n);
186+ swaps(&calib->control, n);
187+ swaps(&calib->length, n);
188+ swapl(&calib->min_x, n);
189+ swapl(&calib->max_x, n);
190+ swapl(&calib->min_y, n);
191+ swapl(&calib->max_y, n);
192+ swapl(&calib->flip_x, n);
193+ swapl(&calib->flip_y, n);
194+ swapl(&calib->rotation, n);
195+ swapl(&calib->button_threshold, n);
196+ }
197+}
198+
199+void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts,
200+ char *buf)
201+{
202+ register char n;
203+ xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf;
204+
205+ area->control = DEVICE_ABS_AREA;
206+ area->length = sizeof(area);
207+ area->offset_x = dts->offset_x;
208+ area->offset_y = dts->offset_y;
209+ area->width = dts->width;
210+ area->height = dts->height;
211+ area->screen = dts->screen;
212+ area->following = dts->following;
213+
214+ if (client->swapped) {
215+ swaps(&area->control, n);
216+ swaps(&area->length, n);
217+ swapl(&area->offset_x, n);
218+ swapl(&area->offset_y, n);
219+ swapl(&area->width, n);
220+ swapl(&area->height, n);
221+ swapl(&area->screen, n);
222+ swapl(&area->following, n);
223 }
224 }
225
226Index: xorg-server-1.1.99.3/Xi/getdctl.h
227===================================================================
228--- xorg-server-1.1.99.3.orig/Xi/getdctl.h 2007-01-29 22:58:18.000000000 +0000
229+++ xorg-server-1.1.99.3/Xi/getdctl.h 2007-01-29 22:59:27.000000000 +0000
230@@ -42,10 +42,13 @@ void CopySwapDeviceResolution(ClientPtr
231 int /* length */
232 );
233
234-void CopySwapDeviceTouchscreen(ClientPtr /* client */ ,
235- TouchscreenClassPtr /* ts */ ,
236- char * /* buf */
237- );
238+void CopySwapDeviceAbsCalib (ClientPtr client,
239+ AbsoluteClassPtr dts,
240+ char *buf);
241+
242+void CopySwapDeviceAbsArea (ClientPtr client,
243+ AbsoluteClassPtr dts,
244+ char *buf);
245
246 void CopySwapDeviceCore(ClientPtr /* client */ ,
247 DeviceIntPtr /* dev */ ,
248Index: xorg-server-1.1.99.3/Xi/stubs.c
249===================================================================
250--- xorg-server-1.1.99.3.orig/Xi/stubs.c 2007-01-29 22:58:18.000000000 +0000
251+++ xorg-server-1.1.99.3/Xi/stubs.c 2007-01-29 22:59:27.000000000 +0000
252@@ -287,7 +287,7 @@ ChangeDeviceControl(register ClientPtr c
253 switch (control->control) {
254 case DEVICE_RESOLUTION:
255 return (BadMatch);
256- case DEVICE_TOUCHSCREEN:
257+ case DEVICE_ABS_CALIB:
258 return (BadMatch);
259 case DEVICE_CORE:
260 return (BadMatch);
261Index: xorg-server-1.1.99.3/dix/devices.c
262===================================================================
263--- xorg-server-1.1.99.3.orig/dix/devices.c 2007-01-29 22:58:18.000000000 +0000
264+++ xorg-server-1.1.99.3/dix/devices.c 2007-01-29 22:59:27.000000000 +0000
265@@ -117,7 +117,7 @@ AddInputDevice(DeviceProc deviceProc, Bo
266 dev->button = (ButtonClassPtr)NULL;
267 dev->focus = (FocusClassPtr)NULL;
268 dev->proximity = (ProximityClassPtr)NULL;
269- dev->touchscreen = (TouchscreenClassPtr)NULL;
270+ dev->absolute = (AbsoluteClassPtr)NULL;
271 dev->kbdfeed = (KbdFeedbackPtr)NULL;
272 dev->ptrfeed = (PtrFeedbackPtr)NULL;
273 dev->intfeed = (IntegerFeedbackPtr)NULL;
274@@ -821,22 +821,31 @@ InitValuatorClassDeviceStruct(DeviceIntP
275 }
276
277 _X_EXPORT Bool
278-InitTouchscreenClassDeviceStruct(DeviceIntPtr dev)
279+InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
280 {
281- register TouchscreenClassPtr tsc;
282+ register AbsoluteClassPtr abs;
283
284- tsc = (TouchscreenClassPtr)xalloc(sizeof(TouchscreenClassRec));
285- if (!tsc)
286+ abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec));
287+ if (!abs)
288 return FALSE;
289
290 /* we don't do anything sensible with these, but should */
291- tsc->min_x = -1;
292- tsc->min_y = -1;
293- tsc->max_x = -1;
294- tsc->max_y = -1;
295+ abs->min_x = -1;
296+ abs->min_y = -1;
297+ abs->max_x = -1;
298+ abs->max_y = -1;
299+ abs->flip_x = 0;
300+ abs->flip_y = 0;
301+ abs->rotation = 0;
302+ abs->button_threshold = 0;
303
304- tsc->button_threshold = 0;
305- dev->touchscreen = tsc;
306+ abs->offset_x = 0;
307+ abs->offset_y = 0;
308+ abs->width = -1;
309+ abs->height = -1;
310+ abs->following = 0;
311+
312+ dev->absolute = abs;
313
314 return TRUE;
315 }
316Index: xorg-server-1.1.99.3/hw/xfree86/common/xf86Xinput.c
317===================================================================
318--- xorg-server-1.1.99.3.orig/hw/xfree86/common/xf86Xinput.c 2007-01-29 22:58:18.000000000 +0000
319+++ xorg-server-1.1.99.3/hw/xfree86/common/xf86Xinput.c 2007-01-29 22:59:27.000000000 +0000
320@@ -538,7 +538,8 @@ ChangeDeviceControl (ClientPtr client, D
321 switch (control->control) {
322 case DEVICE_CORE:
323 case DEVICE_RESOLUTION:
324- case DEVICE_TOUCHSCREEN:
325+ case DEVICE_ABS_CALIB:
326+ case DEVICE_ABS_AREA:
327 return Success;
328 default:
329 return BadMatch;
330Index: xorg-server-1.1.99.3/include/input.h
331===================================================================
332--- xorg-server-1.1.99.3.orig/include/input.h 2007-01-29 22:58:18.000000000 +0000
333+++ xorg-server-1.1.99.3/include/input.h 2007-01-29 22:59:27.000000000 +0000
334@@ -238,7 +238,7 @@ extern Bool InitValuatorClassDeviceStruc
335 int /*numMotionEvents*/,
336 int /*mode*/);
337
338-extern Bool InitTouchscreenClassDeviceStruct(
339+extern Bool InitAbsoluteClassDeviceStruct(
340 DeviceIntPtr /*device*/);
341
342 extern Bool InitFocusClassDeviceStruct(
343Index: xorg-server-1.1.99.3/include/inputstr.h
344===================================================================
345--- xorg-server-1.1.99.3.orig/include/inputstr.h 2007-01-29 22:58:18.000000000 +0000
346+++ xorg-server-1.1.99.3/include/inputstr.h 2007-01-29 22:59:27.000000000 +0000
347@@ -185,13 +185,25 @@ typedef struct _ProximityClassRec {
348 char pad;
349 } ProximityClassRec, *ProximityClassPtr;
350
351-typedef struct _TouchscreenClassRec {
352+typedef struct _AbsoluteClassRec {
353+ /* Calibration. */
354 int min_x;
355 int max_x;
356 int min_y;
357 int max_y;
358+ int flip_x;
359+ int flip_y;
360+ int rotation;
361 int button_threshold;
362-} TouchscreenClassRec, *TouchscreenClassPtr;
363+
364+ /* Area. */
365+ int offset_x;
366+ int offset_y;
367+ int width;
368+ int height;
369+ int screen;
370+ XID following;
371+} AbsoluteClassRec, *AbsoluteClassPtr;
372
373 typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
374 typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
375@@ -293,7 +305,7 @@ typedef struct _DeviceIntRec {
376 ButtonClassPtr button;
377 FocusClassPtr focus;
378 ProximityClassPtr proximity;
379- TouchscreenClassPtr touchscreen;
380+ AbsoluteClassPtr absolute;
381 KbdFeedbackPtr kbdfeed;
382 PtrFeedbackPtr ptrfeed;
383 IntegerFeedbackPtr intfeed;
384Index: xorg-server-1.1.99.3/configure.ac
385===================================================================
386--- xorg-server-1.1.99.3.orig/configure.ac 2007-01-29 22:58:18.000000000 +0000
387+++ xorg-server-1.1.99.3/configure.ac 2007-01-29 22:59:27.000000000 +0000
388@@ -1586,7 +1586,7 @@ if test "$KDRIVE" = yes; then
389 #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \
390 # $MIEXT_SHADOW_LIB $XPSTUBS_LIB"
391 KDRIVE_XKB_DDX_LIB='$(top_builddir)/hw/kdrive/src/libkdrivexkb.a'
392- KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $KDRIVE_XKB_DDX_LIB $XKB_LIB $KDRIVE_XKB_DDX_LIB$COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $CONFIG_LIB"
393+ KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $KDRIVE_XKB_DDX_LIB $XKB_LIB $KDRIVE_XKB_DDX_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB $CONFIG_LIB"
394 KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
395 KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
396 KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
397Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c
398===================================================================
399--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-29 22:58:18.000000000 +0000
400+++ xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c 2007-01-29 22:59:27.000000000 +0000
401@@ -94,7 +94,7 @@ TsRead (int fd, void *closure)
402 event.pressure);
403 discard = 0;
404 if (event.pressure) {
405- if (event.pressure > pi->dixdev->touchscreen->button_threshold)
406+ if (event.pressure > pi->dixdev->absolute->button_threshold)
407 flags = KD_BUTTON_8;
408 else
409 flags = KD_BUTTON_1;
410@@ -356,9 +356,9 @@ TslibEnable (KdPointerInfo *pi)
411 close(private->fd);
412 return BadAlloc;
413 }
414- if (pi->dixdev && pi->dixdev->touchscreen &&
415- pi->dixdev->touchscreen->button_threshold == 0)
416- pi->dixdev->touchscreen->button_threshold = 115;
417+ if (pi->dixdev && pi->dixdev->absolute &&
418+ pi->dixdev->absolute->button_threshold == 0)
419+ pi->dixdev->absolute->button_threshold = 115;
420
421 DebugF("[tslib/TslibEnable] successfully enabled %s\n", pi->path);
422 KdRegisterFd(private->fd, TsRead, pi);
423Index: xorg-server-1.1.99.3/hw/kdrive/src/kinput.c
424===================================================================
425--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kinput.c 2007-01-29 22:58:18.000000000 +0000
426+++ xorg-server-1.1.99.3/hw/kdrive/src/kinput.c 2007-01-29 22:59:27.000000000 +0000
427@@ -444,7 +444,7 @@ KdPointerProc(DeviceIntPtr pDevice, int
428
429 #ifdef XINPUT
430 if (pi->inputClass == KD_TOUCHSCREEN) {
431- InitTouchscreenClassDeviceStruct(pDevice);
432+ InitAbsoluteClassDeviceStruct(pDevice);
433 xiclass = AtomFromName(XI_TOUCHSCREEN);
434 }
435 else {
436@@ -2323,8 +2323,8 @@ ChangeDeviceControl(register ClientPtr c
437 /* FIXME do something more intelligent here */
438 return BadMatch;
439
440- case DEVICE_TOUCHSCREEN:
441- if (!pDev->touchscreen)
442+ case DEVICE_ABS_CALIB:
443+ if (!pDev->absolute)
444 return BadDevice;
445 else
446 return Success;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch
new file mode 100644
index 0000000000..06eab817bd
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-evdev.patch
@@ -0,0 +1,503 @@
1# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
2# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
3---
4# hw/kdrive/linux/evdev.c | 385 ++++++++++++++++++++++++++++++++++++++++++++++--
5# hw/kdrive/src/kdrive.c | 9 +
6# hw/kdrive/src/kdrive.h | 4
7# 3 files changed, 386 insertions(+), 12 deletions(-)
8#
9Index: xorg-server-1.1.99.3/hw/kdrive/linux/evdev.c
10===================================================================
11--- xorg-server-1.1.99.3.orig/hw/kdrive/linux/evdev.c 2006-11-03 14:49:05.000000000 +0000
12+++ xorg-server-1.1.99.3/hw/kdrive/linux/evdev.c 2007-01-25 22:05:48.000000000 +0000
13@@ -31,9 +31,11 @@
14 #include <X11/X.h>
15 #include <X11/Xproto.h>
16 #include <X11/Xpoll.h>
17+#include <X11/keysym.h>
18 #include "inputstr.h"
19 #include "scrnintstr.h"
20 #include "kdrive.h"
21+#include "kkeymap.h"
22
23 #define NUM_EVENTS 128
24 #define ABS_UNSET -65535
25@@ -107,9 +109,10 @@ EvdevRead (int evdevPort, void *closure)
26 {
27 KdPointerInfo *pi = closure;
28 Kevdev *ke = pi->driverPrivate;
29- int i;
30+ int i, j;
31 struct input_event events[NUM_EVENTS];
32 int n;
33+ int flags;
34
35 n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
36 if (n <= 0)
37@@ -117,22 +120,64 @@ EvdevRead (int evdevPort, void *closure)
38 n /= sizeof (struct input_event);
39 for (i = 0; i < n; i++)
40 {
41+ flags = KD_MOUSE_DELTA | kdPointerInfo->buttonState;
42 switch (events[i].type) {
43 case EV_SYN:
44 break;
45 case EV_KEY:
46- EvdevMotion (pi);
47- ASSIGNBIT(ke->key,events[i].code, events[i].value);
48- if (events[i].code < 0x100)
49- ErrorF ("key %d %d\n", events[i].code, events[i].value);
50- else
51- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
52+ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
53+ switch (events[i].code) {
54+ case BTN_LEFT:
55+ if (events[i].value == 1)
56+ flags |= KD_BUTTON_1;
57+ else
58+ flags &= ~KD_BUTTON_1;
59+ break;
60+ case BTN_MIDDLE:
61+ if (events[i].value == 1)
62+ flags |= KD_BUTTON_2;
63+ else
64+ flags &= ~KD_BUTTON_2;
65+ break;
66+ case BTN_RIGHT:
67+ if (events[i].value == 1)
68+ flags |= KD_BUTTON_3;
69+ else
70+ flags &= ~KD_BUTTON_3;
71+ break;
72+ default:
73+ /* Unknow button */
74+ break;
75+ }
76+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
77+ }
78 break;
79 case EV_REL:
80- ke->rel[events[i].code] += events[i].value;
81+ if (events[i].code == REL_X) {
82+ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
83+ }
84+ else if (events[i].code == REL_Y) {
85+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
86+ }
87+ else if (events[i].code == REL_WHEEL) {
88+ for (j = 0; j < abs (events[i].value); j++) {
89+ if (events[i].value > 0)
90+ flags |= KD_BUTTON_4;
91+ else
92+ flags |= KD_BUTTON_5;
93+
94+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
95+
96+ if (events[i].value > 0)
97+ flags &= ~KD_BUTTON_4;
98+ else
99+ flags &= ~KD_BUTTON_5;
100+
101+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
102+ } /* events[i].code == REL_WHEEL */
103+ }
104 break;
105 case EV_ABS:
106- ke->abs[events[i].code] = events[i].value;
107 break;
108 }
109 }
110@@ -162,6 +207,12 @@ EvdevInit (KdPointerInfo *pi)
111 for (i = 0; i < NUM_DEFAULT_EVDEV; i++) {
112 fd = open (kdefaultEvdev[i], 2);
113 if (fd >= 0) {
114+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
115+ {
116+ close (fd);
117+ continue;
118+ }
119+
120 pi->path = KdSaveString (kdefaultEvdev[i]);
121 break;
122 }
123@@ -300,7 +351,319 @@ KdPointerDriver LinuxEvdevMouseDriver =
124 NULL,
125 };
126
127-#if 0
128+/* Keyboard */
129+
130+int kbd_fd = -1;
131+int EvdevInputType = 0;
132+
133+KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
134+/* These are directly mapped from DOS scanset 0 */
135+/* 1 8 */ XK_Escape, NoSymbol,
136+/* 2 9 */ XK_1, XK_exclam,
137+/* 3 10 */ XK_2, XK_at,
138+/* 4 11 */ XK_3, XK_numbersign,
139+/* 5 12 */ XK_4, XK_dollar,
140+/* 6 13 */ XK_5, XK_percent,
141+/* 7 14 */ XK_6, XK_asciicircum,
142+/* 8 15 */ XK_7, XK_ampersand,
143+/* 9 16 */ XK_8, XK_asterisk,
144+/* 10 17 */ XK_9, XK_parenleft,
145+/* 11 18 */ XK_0, XK_parenright,
146+/* 12 19 */ XK_minus, XK_underscore,
147+/* 13 20 */ XK_equal, XK_plus,
148+/* 14 21 */ XK_BackSpace, NoSymbol,
149+/* 15 22 */ XK_Tab, NoSymbol,
150+/* 16 23 */ XK_Q, NoSymbol,
151+/* 17 24 */ XK_W, NoSymbol,
152+/* 18 25 */ XK_E, NoSymbol,
153+/* 19 26 */ XK_R, NoSymbol,
154+/* 20 27 */ XK_T, NoSymbol,
155+/* 21 28 */ XK_Y, NoSymbol,
156+/* 22 29 */ XK_U, NoSymbol,
157+/* 23 30 */ XK_I, NoSymbol,
158+/* 24 31 */ XK_O, NoSymbol,
159+/* 25 32 */ XK_P, NoSymbol,
160+/* 26 33 */ XK_bracketleft, XK_braceleft,
161+/* 27 34 */ XK_bracketright, XK_braceright,
162+/* 28 35 */ XK_Return, NoSymbol,
163+/* 29 36 */ XK_Control_L, NoSymbol,
164+/* 30 37 */ XK_A, NoSymbol,
165+/* 31 38 */ XK_S, NoSymbol,
166+/* 32 39 */ XK_D, NoSymbol,
167+/* 33 40 */ XK_F, NoSymbol,
168+/* 34 41 */ XK_G, NoSymbol,
169+/* 35 42 */ XK_H, NoSymbol,
170+/* 36 43 */ XK_J, NoSymbol,
171+/* 37 44 */ XK_K, NoSymbol,
172+/* 38 45 */ XK_L, NoSymbol,
173+/* 39 46 */ XK_semicolon, XK_colon,
174+/* 40 47 */ XK_apostrophe, XK_quotedbl,
175+/* 41 48 */ XK_grave, XK_asciitilde,
176+/* 42 49 */ XK_Shift_L, NoSymbol,
177+/* 43 50 */ XK_backslash, XK_bar,
178+/* 44 51 */ XK_Z, NoSymbol,
179+/* 45 52 */ XK_X, NoSymbol,
180+/* 46 53 */ XK_C, NoSymbol,
181+/* 47 54 */ XK_V, NoSymbol,
182+/* 48 55 */ XK_B, NoSymbol,
183+/* 49 56 */ XK_N, NoSymbol,
184+/* 50 57 */ XK_M, NoSymbol,
185+/* 51 58 */ XK_comma, XK_less,
186+/* 52 59 */ XK_period, XK_greater,
187+/* 53 60 */ XK_slash, XK_question,
188+/* 54 61 */ XK_Shift_R, NoSymbol,
189+/* 55 62 */ XK_KP_Multiply, NoSymbol,
190+/* 56 63 */ XK_Alt_L, XK_Meta_L,
191+/* 57 64 */ XK_space, NoSymbol,
192+/* 58 65 */ XK_Caps_Lock, NoSymbol,
193+/* 59 66 */ XK_F1, NoSymbol,
194+/* 60 67 */ XK_F2, NoSymbol,
195+/* 61 68 */ XK_F3, NoSymbol,
196+/* 62 69 */ XK_F4, NoSymbol,
197+/* 63 70 */ XK_F5, NoSymbol,
198+/* 64 71 */ XK_F6, NoSymbol,
199+/* 65 72 */ XK_F7, NoSymbol,
200+/* 66 73 */ XK_F8, NoSymbol,
201+/* 67 74 */ XK_F9, NoSymbol,
202+/* 68 75 */ XK_F10, NoSymbol,
203+/* 69 76 */ XK_Break, XK_Pause,
204+/* 70 77 */ XK_Scroll_Lock, NoSymbol,
205+/* 71 78 */ XK_KP_Home, XK_KP_7,
206+/* 72 79 */ XK_KP_Up, XK_KP_8,
207+/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
208+/* 74 81 */ XK_KP_Subtract, NoSymbol,
209+/* 75 82 */ XK_KP_Left, XK_KP_4,
210+/* 76 83 */ XK_KP_5, NoSymbol,
211+/* 77 84 */ XK_KP_Right, XK_KP_6,
212+/* 78 85 */ XK_KP_Add, NoSymbol,
213+/* 79 86 */ XK_KP_End, XK_KP_1,
214+/* 80 87 */ XK_KP_Down, XK_KP_2,
215+/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
216+/* 82 89 */ XK_KP_Insert, XK_KP_0,
217+/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
218+/* 84 91 */ NoSymbol, NoSymbol,
219+/* 85 92 */ NoSymbol, NoSymbol,
220+/* 86 93 */ NoSymbol, NoSymbol,
221+/* 87 94 */ XK_F11, NoSymbol,
222+/* 88 95 */ XK_F12, NoSymbol,
223+
224+/* These are remapped from the extended set (using ExtendMap) */
225+
226+/* 89 96 */ XK_Control_R, NoSymbol,
227+/* 90 97 */ XK_KP_Enter, NoSymbol,
228+/* 91 98 */ XK_KP_Divide, NoSymbol,
229+/* 92 99 */ XK_Sys_Req, XK_Print,
230+/* 93 100 */ XK_Alt_R, XK_Meta_R,
231+/* 94 101 */ XK_Num_Lock, NoSymbol,
232+/* 95 102 */ XK_Home, NoSymbol,
233+/* 96 103 */ XK_Up, NoSymbol,
234+/* 97 104 */ XK_Page_Up, NoSymbol,
235+/* 98 105 */ XK_Left, NoSymbol,
236+/* 99 106 */ XK_Right, NoSymbol,
237+/* 100 107 */ XK_End, NoSymbol,
238+/* 101 108 */ XK_Down, NoSymbol,
239+/* 102 109 */ XK_Page_Down, NoSymbol,
240+/* 103 110 */ XK_Insert, NoSymbol,
241+/* 104 111 */ XK_Delete, NoSymbol,
242+/* 105 112 */ XK_Super_L, NoSymbol,
243+/* 106 113 */ XK_Super_R, NoSymbol,
244+/* 107 114 */ XK_Menu, NoSymbol,
245+/* 108 115 */ NoSymbol, NoSymbol,
246+/* 109 116 */ NoSymbol, NoSymbol,
247+/* 110 117 */ NoSymbol, NoSymbol,
248+/* 111 118 */ NoSymbol, NoSymbol,
249+/* 112 119 */ NoSymbol, NoSymbol,
250+
251+/* 113 120 */ NoSymbol, NoSymbol,
252+/* 114 121 */ NoSymbol, NoSymbol,
253+/* 115 122 */ NoSymbol, NoSymbol,
254+/* 116 123 */ NoSymbol, NoSymbol,
255+/* 117 124 */ NoSymbol, NoSymbol,
256+/* 118 125 */ NoSymbol, NoSymbol,
257+/* 119 126 */ NoSymbol, NoSymbol,
258+/* 120 127 */ NoSymbol, NoSymbol,
259+/* 121 128 */ NoSymbol, NoSymbol,
260+/* 122 129 */ NoSymbol, NoSymbol,
261+/* 123 130 */ NoSymbol, NoSymbol,
262+/* 124 131 */ NoSymbol, NoSymbol,
263+/* 125 132 */ NoSymbol, NoSymbol,
264+/* 126 133 */ NoSymbol, NoSymbol,
265+/* 127 134 */ NoSymbol, NoSymbol,
266+/* 128 135 */ NoSymbol, NoSymbol,
267+/* 129 136 */ NoSymbol, NoSymbol,
268+/* 130 137 */ NoSymbol, NoSymbol,
269+/* 131 138 */ NoSymbol, NoSymbol,
270+/* 132 139 */ NoSymbol, NoSymbol,
271+/* 133 140 */ NoSymbol, NoSymbol,
272+/* 134 141 */ NoSymbol, NoSymbol,
273+/* 135 142 */ NoSymbol, NoSymbol,
274+/* 136 143 */ NoSymbol, NoSymbol,
275+/* 137 144 */ NoSymbol, NoSymbol,
276+/* 138 145 */ NoSymbol, NoSymbol,
277+/* 139 146 */ NoSymbol, NoSymbol,
278+/* 140 147 */ NoSymbol, NoSymbol,
279+/* 141 148 */ NoSymbol, NoSymbol,
280+/* 142 149 */ NoSymbol, NoSymbol,
281+/* 143 150 */ NoSymbol, NoSymbol,
282+/* 144 151 */ NoSymbol, NoSymbol,
283+/* 145 152 */ NoSymbol, NoSymbol,
284+/* 146 153 */ NoSymbol, NoSymbol,
285+/* 147 154 */ NoSymbol, NoSymbol,
286+/* 148 155 */ NoSymbol, NoSymbol,
287+/* 149 156 */ NoSymbol, NoSymbol,
288+/* 150 157 */ NoSymbol, NoSymbol,
289+/* 151 158 */ NoSymbol, NoSymbol,
290+/* 152 159 */ NoSymbol, NoSymbol,
291+/* 153 160 */ NoSymbol, NoSymbol,
292+/* 154 161 */ NoSymbol, NoSymbol,
293+/* 155 162 */ NoSymbol, NoSymbol,
294+/* 156 163 */ NoSymbol, NoSymbol,
295+/* 157 164 */ NoSymbol, NoSymbol,
296+/* 158 165 */ NoSymbol, NoSymbol,
297+/* 159 166 */ NoSymbol, NoSymbol,
298+/* 160 167 */ NoSymbol, NoSymbol,
299+/* 161 168 */ NoSymbol, NoSymbol,
300+/* 162 169 */ NoSymbol, NoSymbol,
301+/* 163 170 */ NoSymbol, NoSymbol,
302+/* 164 171 */ NoSymbol, NoSymbol,
303+/* 165 172 */ NoSymbol, NoSymbol,
304+/* 166 173 */ NoSymbol, NoSymbol,
305+/* 167 174 */ NoSymbol, NoSymbol,
306+/* 168 175 */ NoSymbol, NoSymbol,
307+/* 169 176 */ NoSymbol, NoSymbol,
308+/* 170 177 */ NoSymbol, NoSymbol,
309+/* 171 178 */ NoSymbol, NoSymbol,
310+/* 172 179 */ NoSymbol, NoSymbol,
311+/* 173 180 */ NoSymbol, NoSymbol,
312+/* 174 181 */ NoSymbol, NoSymbol,
313+/* 175 182 */ NoSymbol, NoSymbol,
314+/* 176 183 */ NoSymbol, NoSymbol,
315+/* 177 184 */ NoSymbol, NoSymbol,
316+/* 178 185 */ NoSymbol, NoSymbol,
317+/* 179 186 */ NoSymbol, NoSymbol,
318+/* 180 187 */ NoSymbol, NoSymbol,
319+/* 181 188 */ NoSymbol, NoSymbol,
320+/* 182 189 */ NoSymbol, NoSymbol,
321+/* 183 190 */ NoSymbol, NoSymbol,
322+/* 184 191 */ NoSymbol, NoSymbol,
323+/* 185 192 */ NoSymbol, NoSymbol,
324+/* 186 193 */ NoSymbol, NoSymbol,
325+/* 187 194 */ NoSymbol, NoSymbol,
326+/* 188 195 */ NoSymbol, NoSymbol,
327+/* 189 196 */ NoSymbol, NoSymbol,
328+/* 190 197 */ NoSymbol, NoSymbol,
329+/* 191 198 */ NoSymbol, NoSymbol,
330+/* 192 199 */ NoSymbol, NoSymbol,
331+/* 193 200 */ NoSymbol, NoSymbol,
332+/* 194 201 */ NoSymbol, NoSymbol,
333+};
334+
335+static void
336+EvdevKbdRead (int fd, void *closure)
337+{
338+ int i, n;
339+ struct input_event events[NUM_EVENTS];
340+
341+ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
342+ if (n <= 0)
343+ return;
344+
345+ n /= sizeof (struct input_event);
346+
347+ for (i = 0; i < n; i++)
348+ {
349+ if (events[i].type == EV_KEY)
350+ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
351+ }
352+}
353+
354+static void
355+EvdevKbdLoad (void)
356+{
357+ kdMinScanCode = 0;
358+ kdMaxScanCode = 193;
359+ kdKeymapWidth = 2;
360+ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
361+}
362+
363+static int
364+EvdevKbdInit (void)
365+{
366+ int fd, i;
367+
368+ if (!EvdevInputType)
369+ EvdevInputType = KdAllocInputType ();
370+
371+ if (!kdKeyboard)
372+ {
373+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
374+ {
375+ fd = open (kdefaultEvdev[i], 2);
376+ if (fd >= 0)
377+ {
378+ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
379+ break;
380+ }
381+ }
382+ }
383+ else
384+ {
385+ fd = open (kdKeyboard, O_RDWR);
386+ if (fd < 0)
387+ return FALSE;
388+ }
389+
390+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
391+ {
392+ close (fd);
393+ return FALSE;
394+ }
395+
396+ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
397+ return FALSE;
398+
399+ kbd_fd = fd;
400+ return TRUE;
401+}
402+
403+static void
404+EvdevKbdFini (void)
405+{
406+}
407+
408+static void
409+EvdevKbdLeds (int leds)
410+{
411+ struct input_event event;
412+
413+ memset(&event, 0, sizeof(event));
414+
415+ event.type = EV_LED;
416+ event.code = LED_CAPSL;
417+ event.value = leds & (1 << 0) ? 1 : 0;
418+ write(kbd_fd, (char *) &event, sizeof(event));
419+
420+ event.type = EV_LED;
421+ event.code = LED_NUML;
422+ event.value = leds & (1 << 1) ? 1 : 0;
423+ write(kbd_fd, (char *) &event, sizeof(event));
424+
425+ event.type = EV_LED;
426+ event.code = LED_SCROLLL;
427+ event.value = leds & (1 << 2) ? 1 : 0;
428+ write(kbd_fd, (char *) &event, sizeof(event));
429+
430+ event.type = EV_LED;
431+ event.code = LED_COMPOSE;
432+ event.value = leds & (1 << 3) ? 1 : 0;
433+ write(kbd_fd, (char *) &event, sizeof(event));
434+}
435+
436+static void
437+EvdevKbdBell (int volume, int frequency, int duration)
438+{
439+}
440+
441 KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
442 EvdevKbdLoad,
443 EvdevKbdInit,
444@@ -309,4 +672,4 @@ KdKeyboardFuncs LinuxEvdevKeyboardFuncs
445 EvdevKbdFini,
446 0,
447 };
448-#endif
449+
450Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.c
451===================================================================
452--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.c 2006-11-03 14:49:05.000000000 +0000
453+++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.c 2007-01-25 21:56:32.000000000 +0000
454@@ -80,6 +80,7 @@ Bool kdDontZap;
455 Bool kdEnabled;
456 int kdSubpixelOrder;
457 int kdVirtualTerminal = -1;
458+char *kdKeyboard = 0;
459 Bool kdSwitchPending;
460 char *kdSwitchCmd;
461 DDXPointRec kdOrigin;
462@@ -707,6 +708,14 @@ KdProcessArgument (int argc, char **argv
463 UseMsg ();
464 return 2;
465 }
466+ if (!strcmp (argv[i], "-keyboard"))
467+ {
468+ if ((i+1) < argc)
469+ kdKeyboard = argv[i+1];
470+ else
471+ UseMsg ();
472+ return 2;
473+ }
474 if (!strcmp (argv[i], "-rgba"))
475 {
476 if ((i+1) < argc)
477Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h
478===================================================================
479--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.h 2006-11-03 14:49:05.000000000 +0000
480+++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h 2007-01-25 21:58:26.000000000 +0000
481@@ -512,6 +512,7 @@ extern Bool kdEmulateMiddleButton;
482 extern Bool kdDisableZaphod;
483 extern Bool kdDontZap;
484 extern int kdVirtualTerminal;
485+extern char *kdKeyboard;
486 extern char *kdSwitchCmd;
487 extern KdOsFuncs *kdOsFuncs;
488
489@@ -875,12 +876,13 @@ void
490 ProcessInputEvents (void);
491
492 extern KdPointerDriver LinuxMouseDriver;
493-extern KdPointerDriver LinuxEvdevDriver;
494+extern KdPointerDriver LinuxEvdevMouseFuncs;
495 extern KdPointerDriver Ps2MouseDriver;
496 extern KdPointerDriver BusMouseDriver;
497 extern KdPointerDriver MsMouseDriver;
498 extern KdPointerDriver TsDriver;
499 extern KdKeyboardDriver LinuxKeyboardDriver;
500+extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
501 extern KdOsFuncs LinuxFuncs;
502
503 extern KdPointerDriver VxWorksMouseDriver;
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch
new file mode 100644
index 0000000000..d4f885ee26
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kdrive-use-evdev.patch
@@ -0,0 +1,53 @@
1--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
2+++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
3@@ -28,6 +28,8 @@
4 #endif
5 #include <fbdev.h>
6
7+extern int use_evdev;
8+
9 void
10 InitCard (char *name)
11 {
12@@ -45,7 +47,10 @@
13 void
14 InitInput (int argc, char **argv)
15 {
16- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
17+ if (use_evdev)
18+ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
19+ else
20+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
21 #ifdef TOUCHSCREEN
22 KdAddMouseDriver (&TsFuncs);
23 #endif
24--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
25+++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
26@@ -44,6 +44,8 @@
27 #include "dpmsproc.h"
28 #endif
29
30+int use_evdev = 0;
31+
32 typedef struct _kdDepths {
33 CARD8 depth;
34 CARD8 bpp;
35@@ -687,6 +689,7 @@
36 ErrorF("-videoTest Start the server, pause momentarily and exit\n");
37 ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
38 ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
39+ ErrorF("-use-evdev Use Linux evdev input\n");
40 ErrorF("-switchCmd Command to execute on vt switch\n");
41 ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
42 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
43@@ -796,6 +799,10 @@
44 UseMsg ();
45 return 2;
46 }
47+ if (!strcmp (argv[i], "-use-evdev"))
48+ {
49+ use_evdev = 1;
50+ }
51 if (!strcmp (argv[i], "-keyboard"))
52 {
53 if ((i+1) < argc)
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch
new file mode 100644
index 0000000000..23a0f7eae8
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/kmode.patch
@@ -0,0 +1,43 @@
1---
2 hw/kdrive/src/kmode.c | 21 +++++++++++++++++++++
3 1 file changed, 21 insertions(+)
4
5Index: xorg-server-1.1.99.3/hw/kdrive/src/kmode.c
6===================================================================
7--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kmode.c 2007-01-25 23:53:59.000000000 +0000
8+++ xorg-server-1.1.99.3/hw/kdrive/src/kmode.c 2007-01-27 17:17:09.000000000 +0000
9@@ -41,6 +41,11 @@ const KdMonitorTiming kdMonitorTimings[
10 1, 11, 14, KdSyncNegative,
11 },
12
13+ { 240, 320, 64, 0,
14+ 0, 0, 0, KdSyncNegative,
15+ 0, 0, 0, KdSyncNegative,
16+ },
17+
18 /* Other VESA modes */
19 { 640, 350, 85, 31500, /* VESA */
20 32, 96, 192, KdSyncPositive, /* 26.413 */
21@@ -80,6 +85,22 @@ const KdMonitorTiming kdMonitorTimings[
22 16, 48, 160, KdSyncNegative, /* 31.469 */
23 10, 33, 45, KdSyncNegative, /* 59.940 */
24 },
25+
26+
27+ { 480, 640, 60, 0,
28+ 0, 0, 0, KdSyncNegative,
29+ 0, 0, 0, KdSyncNegative,
30+ },
31+
32+ { 800, 480, 51, 0,
33+ 0, 0, 0, KdSyncNegative,
34+ 0, 0, 0, KdSyncNegative,
35+ },
36+
37+ { 480, 800, 51, 0,
38+ 0, 0, 0, KdSyncNegative,
39+ 0, 0, 0, KdSyncNegative,
40+ },
41
42 /* 800x600 modes */
43 { 800, 600, 85, 56250, /* VESA */
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch
new file mode 100644
index 0000000000..35ccadaa8d
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/no-serial-probing.patch
@@ -0,0 +1,13 @@
1--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
2+++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
3@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
4 "/dev/psaux",
5 "/dev/input/mice",
6 "/dev/adbmouse",
7+#ifdef BREAK_MY_SERIAL_CONSOLE
8 "/dev/ttyS0",
9 "/dev/ttyS1",
10+#endif
11 };
12
13 #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch
new file mode 100644
index 0000000000..d9ef51c5ba
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/optional-xkb.patch
@@ -0,0 +1,54 @@
1--- git/Makefile.am.orig 2006-06-09 16:01:51.000000000 +0200
2+++ git/Makefile.am 2006-06-09 16:02:59.000000000 +0200
3@@ -35,6 +35,10 @@
4 XINPUT_DIR=Xi
5 endif
6
7+if XKB
8+XKB_DIR=xkb
9+endif
10+
11 if DBE
12 DBE_DIR=dbe
13 endif
14@@ -51,7 +55,7 @@
15 randr \
16 render \
17 $(XINPUT_DIR) \
18- xkb \
19+ $(XKB_DIR) \
20 $(DBE_DIR) \
21 $(MFB_DIR) \
22 $(AFB_DIR) \
23--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
24+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
25@@ -418,6 +418,7 @@
26 AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
27 AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMS=$enableval], [DPMSExtension=yes])
28 AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
29+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
30
31 dnl DDXes.
32 AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
33@@ -739,12 +740,15 @@
34
35 AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
36
37-AC_DEFINE(XKB, 1, [Build XKB])
38-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
39-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
40-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
41-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
42-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
43+AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
44+if test "x$XKB" = xyes; then
45+ AC_DEFINE(XKB, 1, [Build XKB])
46+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
47+ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
48+ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
49+ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
50+ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
51+fi
52
53 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
54 [Do not have `strcasecmp'.]))
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch
new file mode 100644
index 0000000000..2a10f13d40
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate.patch
@@ -0,0 +1,73 @@
1---
2 Xext/Makefile.am | 5
3 Xext/xcalibrate.c | 262 +++++++++++++++++++++++++++++++++++++++++++++
4 configure.ac | 8 +
5 include/kdrive-config.h.in | 3
6 mi/miinitext.c | 6 +
7 5 files changed, 283 insertions(+), 1 deletion(-)
8
9Index: xorg-server-1.1.99.3/mi/miinitext.c
10===================================================================
11--- xorg-server-1.1.99.3.orig/mi/miinitext.c 2006-11-03 14:49:06.000000000 +0000
12+++ xorg-server-1.1.99.3/mi/miinitext.c 2007-01-27 17:59:40.000000000 +0000
13@@ -368,6 +368,9 @@ extern void ResExtensionInit(INITARGS);
14 #ifdef DMXEXT
15 extern void DMXExtensionInit(INITARGS);
16 #endif
17+#ifdef XCALIBRATE
18+extern void XCalibrateExtensionInit(INITARGS);
19+#endif
20 #ifdef XEVIE
21 extern void XevieExtensionInit(INITARGS);
22 #endif
23@@ -662,6 +665,9 @@ InitExtensions(argc, argv)
24 #ifdef XSP
25 if (!noXspExtension) XSPExtensionInit();
26 #endif
27+#ifdef XCALIBRATE
28+ XCalibrateExtensionInit ();
29+#endif
30 }
31
32 void
33Index: xorg-server-1.1.99.3/configure.ac
34===================================================================
35--- xorg-server-1.1.99.3.orig/configure.ac 2006-11-03 14:49:05.000000000 +0000
36+++ xorg-server-1.1.99.3/configure.ac 2007-01-29 22:58:18.000000000 +0000
37@@ -1584,7 +1590,7 @@ if test "$KDRIVE" = yes; then
38 KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
39 KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
40 KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
41- KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $XSP_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
42+ KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $XSP_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB"
43
44 # check if we can build Xephyr
45 PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
46Index: xorg-server-1.1.99.3/include/kdrive-config.h.in
47===================================================================
48--- xorg-server-1.1.99.3.orig/include/kdrive-config.h.in 2006-11-03 14:49:06.000000000 +0000
49+++ xorg-server-1.1.99.3/include/kdrive-config.h.in 2007-01-27 17:59:40.000000000 +0000
50@@ -28,4 +28,7 @@
51 /* Have the backtrace() functiln. */
52 #undef HAVE_BACKTRACE
53
54+/* Enable XCalibrate extension */
55+#undef XCALIBRATE
56+
57 #endif /* _KDRIVE_CONFIG_H_ */
58Index: xorg-server-1.1.99.3/Xext/Makefile.am
59===================================================================
60--- xorg-server-1.1.99.3.orig/Xext/Makefile.am 2006-11-03 14:49:05.000000000 +0000
61+++ xorg-server-1.1.99.3/Xext/Makefile.am 2007-01-29 22:58:33.000000000 +0000
62@@ -81,6 +81,11 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS)
63 # XCalibrare needs tslib
64 endif
65
66+XCALIBRATE_SRCS = xcalibrate.c
67+if XCALIBRATE
68+BUILTIN_SRCS += $(XCALIBRATE_SRCS)
69+endif
70+
71 # X EVent Interception Extension: allows accessibility helpers & composite
72 # managers to intercept events from input devices and transform as needed
73 # before the clients see them.
diff --git a/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch
new file mode 100644
index 0000000000..a8f002ea2a
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-kdrive-xomap/xfbdev-fb-opt.patch
@@ -0,0 +1,82 @@
1---
2 hw/kdrive/fbdev/fbdev.c | 17 ++++++++++++-----
3 hw/kdrive/fbdev/fbdev.h | 1 +
4 hw/kdrive/fbdev/fbinit.c | 20 ++++++++++++++++----
5 3 files changed, 29 insertions(+), 9 deletions(-)
6
7--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c
8+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.c
9@@ -33,16 +33,23 @@
10
11 extern int KdTsPhyScreen;
12
13+char *fbdevDevicePath = NULL;
14 Bool
15 fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
16 {
17 int k;
18 unsigned long off;
19- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
20- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
21- perror("Error opening /dev/fb0");
22- return FALSE;
23- }
24+
25+ if (fbdevDevicePath == NULL)
26+ fbdevDevicePath = "/dev/fb0";
27+
28+ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
29+ {
30+ ErrorF("Error opening framebuffer %s: %s\n",
31+ fbdevDevicePath, strerror(errno));
32+ return FALSE;
33+ }
34+
35 /* quiet valgrind */
36 memset (&priv->fix, '\0', sizeof (priv->fix));
37 if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
38--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.h
39+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.h
40@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
41 } FbdevScrPriv;
42
43 extern KdCardFuncs fbdevFuncs;
44+extern char* fbdevDevicePath;
45
46 Bool
47 fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
48--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbinit.c
49+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbinit.c
50@@ -59,16 +59,28 @@ InitInput (int argc, char **argv)
51 void
52 ddxUseMsg (void)
53 {
54- KdUseMsg();
55+ KdUseMsg();
56+ ErrorF("\nXfbdev Device Usage:\n");
57+ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
58+ ErrorF("\n");
59 }
60
61 int
62 ddxProcessArgument (int argc, char **argv, int i)
63 {
64- return KdProcessArgument (argc, argv, i);
65-}
66-
67+ if (!strcmp (argv[i], "-fb"))
68+ {
69+ if (i+1 < argc)
70+ {
71+ fbdevDevicePath = argv[i+1];
72+ return 2;
73+ }
74+ UseMsg();
75+ exit(1);
76+ }
77
78+ return KdProcessArgument (argc, argv, i);
79+}
80
81 KdCardFuncs fbdevFuncs = {
82 fbdevCardInit, /* cardinit */