xserver-kdrive: added 1.4.99.901 (1.5-rc) from OE

- moved common (1.3.0.0/1.4.99.901) patches to xserver-kdrive

TODO: merge xmodmap and "-mouse tslib" from OE


git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4317 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Marcin Juszkiewicz 2008-04-23 10:29:06 +00:00
parent 6543b12207
commit ff2e381fd7
23 changed files with 6971 additions and 0 deletions

View File

@ -0,0 +1,17 @@
Index: xorg-server-1.4/hw/kdrive/Makefile.am
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-08-30 01:48:57.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:24:29.000000000 +0200
@@ -1,10 +1,10 @@
if KDRIVEVESA
-VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga nvidia pm2 r128 \
+VESA_SUBDIRS = vesa ati chips i810 mach64 mga nvidia pm2 r128 \
smi via
endif
if BUILD_KDRIVEFBDEVLIB
-FBDEV_SUBDIRS = fbdev
+FBDEV_SUBDIRS = fbdev epson
endif
if XFAKESERVER

View File

@ -0,0 +1,24 @@
--- /tmp/configure.ac 2008-04-16 10:52:15.016442542 +0200
+++ xorg-server-1.4.99.901/configure.ac 2008-04-16 10:54:23.786428934 +0200
@@ -1925,7 +1925,7 @@
AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt"))
if test "x$TSLIB" = xyes; then
- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
if test "x$HAVE_TSLIB" = xno; then
AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
fi
@@ -1949,10 +1949,10 @@
;;
esac
KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
- KDRIVE_LOCAL_LIBS="$TSLIB_LIBS $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
+ KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
- KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
+ KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])

View File

@ -0,0 +1,11 @@
--- xserver.orig/hw/kdrive/epson/epson13806stub.c 2004-10-20 10:20:51.000000000 +0200
+++ xserver/hw/kdrive/epson/epson13806stub.c 2005-03-17 14:38:22.000000000 +0100
@@ -55,7 +55,7 @@
{
KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
#ifdef TOUCHSCREEN
- KdInitTouchScreen (&TsFuncs);
+ KdAddMouseDriver (&TsFuncs);
#endif
}

View File

@ -0,0 +1,19 @@
Index: xorg-server-1.4/hw/kdrive/fbdev/fbinit.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/fbdev/fbinit.c 2007-09-08 21:27:44.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/fbdev/fbinit.c 2007-09-08 21:28:55.000000000 +0200
@@ -46,11 +46,13 @@
KdAddKeyboardDriver (&LinuxKeyboardDriver);
KdAddPointerDriver (&LinuxMouseDriver);
+ KdAddKeyboardDriver (&LinuxEvdevKeyboardDriver);
+ KdAddPointerDriver (&LinuxEvdevMouseDriver);
#ifdef TSLIB
KdAddPointerDriver (&TsDriver);
#endif
- ki = KdParseKeyboard ("keybd");
+ ki = KdParseKeyboard ("keyboard");
KdAddKeyboard(ki);
KdInitInput ();

View File

@ -0,0 +1,14 @@
--- xserver/hw/kdrive/fbdev/fbdev.c~ 2004-09-15 00:08:10.000000000 +0100
+++ xserver/hw/kdrive/fbdev/fbdev.c 2004-11-13 17:47:02.000000000 +0000
@@ -198,6 +198,11 @@
return FALSE;
}
+ /* Re-get the "fixed" parameters since they might have changed */
+ k = ioctl (priv->fd, FBIOGET_FSCREENINFO, &priv->fix);
+ if (k < 0)
+ perror ("FBIOGET_FSCREENINFO");
+
/* Now get the new screeninfo */
ioctl (priv->fd, FBIOGET_VSCREENINFO, &priv->var);
depth = priv->var.bits_per_pixel;

View File

@ -0,0 +1,26 @@
---
hw/kdrive/src/kmode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: xorg-server-1.3.0.0/hw/kdrive/src/kmode.c
===================================================================
--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kmode.c 2007-05-16 10:30:29.000000000 +0100
+++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2007-05-16 10:31:08.000000000 +0100
@@ -106,6 +106,8 @@ const KdMonitorTiming kdMonitorTimings[
16, 120, 176, KdSyncNegative, /* 37.861 */
1, 20, 24, KdSyncNegative, /* 72.809 */
},
+ /* DEFAULT */
+#define MONITOR_TIMING_DEFAULT 13
{ 640, 480, 60, 25175, /* VESA */
16, 48, 160, KdSyncNegative, /* 31.469 */
10, 33, 45, KdSyncNegative, /* 59.940 */
@@ -127,8 +129,6 @@ const KdMonitorTiming kdMonitorTimings[
16, 160, 256, KdSyncPositive, /* 46.875 */
1, 21, 25, KdSyncPositive, /* 75.000 */
},
- /* DEFAULT */
-#define MONITOR_TIMING_DEFAULT 9
{ 800, 600, 72, 50000, /* VESA */
56, 64, 240, KdSyncPositive, /* 48.077 */
37, 23, 66, KdSyncPositive, /* 72.188 */

View File

@ -0,0 +1,16 @@
Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
@@ -743,11 +743,6 @@
cfsetispeed(&nTty, 9600);
cfsetospeed(&nTty, 9600);
tcsetattr(fd, TCSANOW, &nTty);
- /*
- * Flush any pending keystrokes
- */
- while ((n = read (fd, buf, sizeof (buf))) > 0)
- ;
KdRegisterFd (fd, LinuxKeyboardRead, ki);
return Success;
}

View File

@ -0,0 +1,34 @@
--- kmode.c 2006-05-03 19:48:42.000000000 +0200
+++ xserver/hw/kdrive/src/kmode.c 2006-05-03 19:50:43.000000000 +0200
@@ -32,6 +32,31 @@
/* H V Hz KHz */
/* FP BP BLANK POLARITY */
+ /* Treo 650 */
+
+ { 320, 320, 64, 16256,
+ 17, 12, 32, KdSyncNegative,
+ 1, 11, 14, KdSyncNegative,
+ },
+
+ { 320, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
+ /* LifeDrive/T3/TX modes */
+
+ { 320, 480, 64, 16256,
+ 17, 12, 32, KdSyncNegative,
+ 1, 11, 14, KdSyncNegative,
+ },
+
+ { 480, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
+
/* IPAQ modeline:
*
* Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254"

View File

@ -0,0 +1,28 @@
--- /tmp/kmode.c 2005-06-27 14:46:19.716843288 +0200
+++ xserver/hw/kdrive/src/kmode.c 2005-06-27 14:46:30.070269328 +0200
@@ -41,6 +41,11 @@
1, 11, 14, KdSyncNegative,
},
+ { 240, 320, 64, 0,
+ 0, 0, 0, KdSyncNegative,
+ 0, 0, 0, KdSyncNegative,
+ },
+
/* Other VESA modes */
{ 640, 350, 85, 31500, /* VESA */
32, 96, 192, KdSyncPositive, /* 26.413 */
@@ -80,6 +85,13 @@
16, 48, 160, KdSyncNegative, /* 31.469 */
10, 33, 45, KdSyncNegative, /* 59.940 */
},
+
+
+ { 480, 640, 60, 0, /* VESA */
+ 0, 0, 0, KdSyncNegative, /* 31.469 */
+ 0, 0, 0, KdSyncNegative, /* 59.940 */
+ },
+
/* 800x600 modes */
{ 800, 600, 85, 56250, /* VESA */

View File

@ -0,0 +1,44 @@
Index: git/hw/kdrive/linux/keyboard.c
===================================================================
--- git.orig/hw/kdrive/linux/keyboard.c 2007-11-14 21:30:45.000000000 +0000
+++ git/hw/kdrive/linux/keyboard.c 2007-11-15 12:00:11.000000000 +0000
@@ -42,6 +42,8 @@
#include <sys/ioctl.h>
extern int LinuxConsoleFd;
+static unsigned char mediumraw_data, mediumraw_up;
+static enum { DEFAULT, EXTBYTE1, EXTBYTE2 } mediumraw_state = DEFAULT;
static const KeySym linux_to_x[256] = {
NoSymbol, NoSymbol, NoSymbol, NoSymbol,
@@ -701,7 +703,29 @@
else
#endif
scancode = b[0] & 0x7f;
- KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ /* This is extended medium raw mode interpreter
+ see linux/drivers/keyboard.c (kbd->kbdmode == VC_MEDIUMRAW) */
+ switch (mediumraw_state)
+ {
+ case DEFAULT:
+ if (scancode == 0)
+ {
+ mediumraw_state = EXTBYTE1;
+ mediumraw_up = b[0] & 0x80;
+ }
+ else
+ KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80);
+ break;
+ case EXTBYTE1:
+ mediumraw_data = scancode;
+ mediumraw_state = EXTBYTE2;
+ break;
+ case EXTBYTE2:
+ /* Note: Only codes < 256 will pass correctly through KdEnqueueKeyboardEvent() */
+ KdEnqueueKeyboardEvent (closure, (int)mediumraw_data << 7 | scancode, mediumraw_up);
+ mediumraw_state = DEFAULT;
+ break;
+ }
b++;
}
}

View File

@ -0,0 +1,12 @@
--- dix/devices.c~ 2008-04-16 13:01:08.000000000 +0200
+++ dix/devices.c 2008-04-16 13:01:08.000000000 +0200
@@ -527,8 +527,8 @@
#ifdef XKB
if (dev->key->xkbInfo)
XkbFreeInfo(dev->key->xkbInfo);
-#endif
dev->key->xkbInfo = NULL;
+#endif
xfree(dev->key->curKeySyms.map);
xfree(dev->key->modifierKeyMap);
xfree(dev->key);

View File

@ -0,0 +1,58 @@
Index: xorg-server-1.4/Makefile.am
===================================================================
--- xorg-server-1.4.orig/Makefile.am 2007-08-23 21:04:52.000000000 +0200
+++ xorg-server-1.4/Makefile.am 2007-09-06 23:19:59.000000000 +0200
@@ -26,6 +26,10 @@
GLX_DIR=GL
endif
+if XKB
+XKB_DIR=xkb
+endif
+
if DBE
DBE_DIR=dbe
endif
@@ -42,7 +46,7 @@
randr \
render \
Xi \
- xkb \
+ $(XKB_DIR) \
$(DBE_DIR) \
$(MFB_DIR) \
$(AFB_DIR) \
Index: xorg-server-1.4/configure.ac
===================================================================
--- xorg-server-1.4.orig/configure.ac 2007-09-06 07:59:00.000000000 +0200
+++ xorg-server-1.4/configure.ac 2007-09-06 23:19:19.000000000 +0200
@@ -514,6 +514,7 @@
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
dnl DDXes.
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -889,12 +890,15 @@
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
-AC_DEFINE(XKB, 1, [Build XKB])
-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
+AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
+if test "x$XKB" = xyes; then
+ AC_DEFINE(XKB, 1, [Build XKB])
+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
+ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
+ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
+ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
+ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
+fi
AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
[Do not have 'strcasecmp'.]))

View File

@ -0,0 +1,15 @@
Index: xorg-server-1.4/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/tslib.c 2007-09-08 19:58:08.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/tslib.c 2007-09-08 19:58:09.000000000 +0200
@@ -121,6 +121,10 @@
private->raw_event_hook = NULL;
private->raw_event_closure = NULL;
+ if (!pi->path) {
+ pi->path = "/dev/input/touchscreen0";
+ ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
+ }
private->tsDev = ts_open(pi->path, 0);
private->fd = ts_fd(private->tsDev);
if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) {

View File

@ -0,0 +1,54 @@
Index: xorg-server-1.4/hw/kdrive/Makefile.am
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/Makefile.am 2007-09-06 23:32:04.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/Makefile.am 2007-09-06 23:33:44.000000000 +0200
@@ -11,6 +11,10 @@
XFAKE_SUBDIRS = fake
endif
+if KDRIVEW100
+W100_SUBDIRS = w100
+endif
+
if XSDLSERVER
XSDL_SUBDIRS = sdl
endif
@@ -26,6 +30,7 @@
SERVER_SUBDIRS = \
$(XSDL_SUBDIRS) \
$(FBDEV_SUBDIRS) \
+ $(W100_SUBDIRS) \
$(VESA_SUBDIRS) \
$(XEPHYR_SUBDIRS) \
$(XFAKE_SUBDIRS)
Index: xorg-server-1.4/configure.ac
===================================================================
--- xorg-server-1.4.orig/configure.ac 2007-09-06 23:32:05.000000000 +0200
+++ xorg-server-1.4/configure.ac 2007-09-06 23:34:41.000000000 +0200
@@ -535,6 +535,7 @@
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto])
+AC_ARG_ENABLE(w100, AS_HELP_STRING([--enable-w100], [Build the kdrive Xw100 server (default: no)]), [KDRIVEW100=$enableval], [KDRIVEW100=no])
AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto])
AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto])
AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto])
@@ -1669,6 +1670,10 @@
fi
AM_CONDITIONAL(XP_USE_FREETYPE, [test "x$XPRINT" = xyes && test "x$XP_USE_FREETYPE" = xyes])
+AM_CONDITIONAL(KDRIVEW100, [test "x$KDRIVEW100" = xyes])
+if test "x$KDRIVEW100" = xyes; then
+ AC_DEFINE(KDRIVEW100, 1, [Build Xw100 server])
+fi
dnl XWin DDX
@@ -2112,6 +2117,7 @@
hw/kdrive/epson/Makefile
hw/kdrive/fake/Makefile
hw/kdrive/fbdev/Makefile
+hw/kdrive/w100/Makefile
hw/kdrive/i810/Makefile
hw/kdrive/linux/Makefile
hw/kdrive/mach64/Makefile

View File

@ -0,0 +1,15 @@
Patch suggested by Manuel Teira to actually enable offscreen pixmap
acceleration in Xw100. Value 16 is empirical, works well on hx4700,
but in case of issues, consider double it (other accelerated drivers
use bigger values than 16).
--- xorg-server-1.2.0/hw/kdrive/w100/ati_draw.c.org 2007-04-04 10:28:57.000000000 +0000
+++ xorg-server-1.2.0/hw/kdrive/w100/ati_draw.c 2007-04-06 14:43:40.000000000 +0000
@@ -433,6 +433,7 @@
* or kaaPixmapUseScreen. But this is probably caused by some bug in this
* driver... */
atis->kaa.flags |= KAA_OFFSCREEN_PIXMAPS;
+ atis->kaa.pitchAlign = 16;
if (!kaaDrawInit(pScreen, &atis->kaa))
return FALSE;

View File

@ -0,0 +1,28 @@
Index: xorg-server-1.4/hw/kdrive/w100/ati_stub.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/w100/ati_stub.c 2007-09-08 21:40:26.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/w100/ati_stub.c 2007-09-08 22:04:27.000000000 +0200
@@ -74,10 +74,20 @@
void
InitInput(int argc, char **argv)
{
- KdInitInput(&LinuxMouseFuncs, &LinuxKeyboardFuncs);
-#ifdef TOUCHSCREEN
- KdAddMouseDriver(&TsFuncs);
+ KdKeyboardInfo *ki;
+
+ KdAddKeyboardDriver (&LinuxKeyboardDriver);
+ KdAddPointerDriver (&LinuxMouseDriver);
+ KdAddKeyboardDriver (&LinuxEvdevKeyboardDriver);
+ KdAddPointerDriver (&LinuxEvdevMouseDriver);
+#ifdef TSLIB
+ KdAddPointerDriver (&TsDriver);
#endif
+
+ ki = KdParseKeyboard ("keyboard");
+ KdAddKeyboard(ki);
+
+ KdInitInput ();
}
void

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,159 @@
CRUDE HACK ALERT: this patch adds a new device control (DEVICE_RAWEVENT)
which cannot be exported in the protocol because the xDeviceRaweventCtl
carries a C pointer to the tslib event hook. For lack of a better idea,
I added this to get the event hook pointer from Xext/xcalibrate.c into
tslib.c, where the now-private _raw_event_hook and _raw_event_closure
pointers are manipulated instead of, like before, in the Xcalibrate
extension itself.
Index: xorg-server-1.4/Xext/xcalibrate.c
===================================================================
--- xorg-server-1.4.orig/Xext/xcalibrate.c 2007-09-08 13:22:55.000000000 +0200
+++ xorg-server-1.4/Xext/xcalibrate.c 2007-09-08 16:03:17.000000000 +0200
@@ -33,14 +33,14 @@
#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
+#include "inputstr.h" /* for inputInfo */
#include "swaprep.h"
+#include <X11/extensions/XI.h> /* for XI_TOUCHSCREEN */
+#include <X11/extensions/XIproto.h> /* for xDeviceCtl */
#include <X11/extensions/xcalibrateproto.h>
#include <X11/extensions/xcalibratewire.h>
-extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
-extern void *tslib_raw_event_closure;
-
static CARD8 XCalibrateReqCode;
int XCalibrateEventBase;
int XCalibrateReqBase;
@@ -64,6 +64,31 @@
WriteEventsToClient (pClient, 1, (xEvent *) &ev);
}
+#define DEVICE_RAWEVENT 6
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ void *hook;
+} xDeviceRaweventCtl;
+
+static void
+xcalibrate_set_event_hook (void *hook, ClientPtr client)
+{
+ DeviceIntPtr devtmp;
+ Atom xiclass;
+ xDeviceRaweventCtl rawevent;
+
+ rawevent.control = DEVICE_RAWEVENT;
+ rawevent.length = sizeof(rawevent);
+ rawevent.hook = hook;
+
+ xiclass = MakeAtom(XI_TOUCHSCREEN, strlen(XI_TOUCHSCREEN), 1);
+
+ for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next)
+ if (devtmp->type == xiclass)
+ ChangeDeviceControl(client, devtmp, (xDeviceCtl *) &rawevent);
+}
+
static int
ProcXCalibrateQueryVersion (ClientPtr client)
{
@@ -124,8 +149,7 @@
{
/* Start calibrating. */
xcalibrate_client = client;
- tslib_raw_event_hook = xcalibrate_event_hook;
- tslib_raw_event_closure = client;
+ xcalibrate_set_event_hook(xcalibrate_event_hook, client);
rep.status = GrabSuccess;
}
else
@@ -139,8 +163,7 @@
{
/* Stop calibrating. */
xcalibrate_client = NULL;
- tslib_raw_event_hook = NULL;
- tslib_raw_event_closure = NULL;
+ xcalibrate_set_event_hook(NULL, NULL);
rep.status = GrabSuccess;
/* Cycle input off and on to reload configuration. */
@@ -277,8 +300,7 @@
{
/* Stop calibrating. */
xcalibrate_client = NULL;
- tslib_raw_event_hook = NULL;
- tslib_raw_event_closure = NULL;
+ xcalibrate_set_event_hook(NULL, NULL);
}
}
Index: xorg-server-1.4/hw/kdrive/linux/tslib.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/linux/tslib.c 2007-09-08 14:46:41.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/linux/tslib.c 2007-09-08 16:10:57.000000000 +0200
@@ -56,6 +56,13 @@
int phys_screen;
};
+void
+tslib_set_raw_event_hook(KdPointerInfo *pi, void *hook, void *closure)
+{
+ struct TslibPrivate *private = pi->driverPrivate;
+ private->raw_event_hook = hook;
+ private->raw_event_closure = closure;
+}
static void
TsRead (int fd, void *closure)
Index: xorg-server-1.4/hw/kdrive/src/kinput.c
===================================================================
--- xorg-server-1.4.orig/hw/kdrive/src/kinput.c 2007-09-08 14:45:01.000000000 +0200
+++ xorg-server-1.4/hw/kdrive/src/kinput.c 2007-09-08 16:09:32.000000000 +0200
@@ -2389,10 +2389,19 @@
return BadMatch;
}
+#define DEVICE_RAWEVENT 6
+typedef struct {
+ CARD16 control B16;
+ CARD16 length B16;
+ void *hook;
+} xDeviceRaweventCtl;
+
int
ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev,
xDeviceCtl *control)
{
+ KdPointerInfo *pi;
+
switch (control->control) {
case DEVICE_RESOLUTION:
/* FIXME do something more intelligent here */
@@ -2406,6 +2415,24 @@
case DEVICE_ENABLE:
return Success;
+ case DEVICE_RAWEVENT:
+ if (!pDev)
+ return BadImplementation;
+
+ for (pi = kdPointers; pi; pi = pi->next) {
+ if (pi->dixdev && pi->dixdev->id == pDev->id)
+ break;
+ }
+
+ if (!pi || !pi->dixdev || pi->dixdev->id != pDev->id) {
+ ErrorF("[ChangeDeviceControl] Failed to find pointer for device %d!\n",
+ pDev->id);
+ return BadImplementation;
+ }
+
+ tslib_set_raw_event_hook(pi, ((xDeviceRaweventCtl *)control)->hook, client);
+ return Success;
+
default:
return BadMatch;
}

View File

@ -0,0 +1,19 @@
--- /tmp/servermd.h 2007-09-30 17:27:22.310911628 +0200
+++ xorg-server-1.4/include/servermd.h 2007-09-30 17:28:25.297799199 +0200
@@ -130,6 +130,16 @@
#endif /* vax */
+#ifdef __avr32__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
+#define AVOID_MEMORY_READ
+
+#endif /* __avr32__ */
+
#ifdef __arm32__
#define IMAGE_BYTE_ORDER LSBFirst

View File

@ -0,0 +1,43 @@
require xserver-kdrive.inc
DEPENDS += "hal libxkbfile libxcalibrate pixman"
DEFAULT_PREFERENCE = "-99"
PE = "1"
PR = "r2"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://kmode.patch;patch=1 \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
file://fbdev-not-fix.patch;patch=1 \
file://optional-xkb.patch;patch=1 \
file://enable-tslib.patch;patch=1 \
file://kmode-palm.patch;patch=1 \
file://enable-epson.patch;patch=1 \
file://fix_default_mode.patch;patch=1 \
# file://hide-cursor-and-ppm-root.patch;patch=1 \
# file://xcalibrate_coords.patch;patch=1 \
file://w100.patch;patch=1 \
file://w100-autofoo.patch;patch=1 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
file://w100-new-input-world-order.patch;patch=1 \
file://linux-keyboard-mediumraw.patch;patch=1 \
file://xcalibrate-new-input-world-order.patch;patch=1 \
file://tslib-default-device.patch;patch=1 \
# file://fbdev-evdev.patch;patch=1 \
file://keyboard-resume-workaround.patch;patch=1 \
file://xorg-avr32-support.diff;patch=1 \
# file://pkgconfig_fix.patch;patch=1 \
file://no_xkb.patch;patch=1;pnum=0 \
"
S = "${WORKDIR}/xorg-server-${PV}"
W100_OECONF = "--disable-w100"
#W100_OECONF_arm = "--enable-w100"
EXTRA_OECONF += "--enable-builtin-fonts \
--disable-dri2 \
"