diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/xorg-xserver/xserver-kdrive-1.2.0 | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/xorg-xserver/xserver-kdrive-1.2.0')
7 files changed, 487 insertions, 0 deletions
diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/disable-xf86-dga-xorgcfg.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/disable-xf86-dga-xorgcfg.patch new file mode 100644 index 0000000000..4b7e41e3e9 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/disable-xf86-dga-xorgcfg.patch @@ -0,0 +1,39 @@ +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac 2006-08-31 22:44:06.000000000 +0200 ++++ git/configure.ac 2006-08-31 22:49:39.000000000 +0200 +@@ -513,7 +513,11 @@ + XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' + + dnl Core modules for most extensions, et al. ++if test "$KDRIVE" = yes; then ++REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]" ++else + REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]" ++fi + REQUIRED_LIBS="xfont xau fontenc" + + AM_CONDITIONAL(XV, [test "x$XV" = xyes]) +@@ -1540,7 +1544,9 @@ + AC_SUBST(XKB_COMPILED_DIR) + + dnl and the rest of these are generic, so they're in config.h ++if test ! x"$KDRIVE" = xyes; then + AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) ++fi + AC_DEFINE(XResExtension, 1, [Build XRes extension]) + + dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined +@@ -1560,10 +1566,12 @@ + + AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) + ++if test ! "x$KDRIVE" = xyes ; then + dnl xorgconfig CLI configuration utility + PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11]) + AC_SUBST(XORGCONFIG_DEP_CFLAGS) + AC_SUBST(XORGCONFIG_DEP_LIBS) ++fi + + dnl xorgcfg GUI configuration utility + AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-epson.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-epson.patch new file mode 100644 index 0000000000..8ec3a37c78 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-epson.patch @@ -0,0 +1,11 @@ +Index: xorg-server-1.2.0/hw/kdrive/Makefile.am +=================================================================== +--- xorg-server-1.2.0.orig/hw/kdrive/Makefile.am 2007-03-28 17:11:38.000000000 +0200 ++++ xorg-server-1.2.0/hw/kdrive/Makefile.am 2007-03-28 17:12:28.000000000 +0200 +@@ -1,5 +1,5 @@ + if KDRIVEFBDEV +-FBDEV_SUBDIRS = fbdev ++FBDEV_SUBDIRS = fbdev epson + endif + + if KDRIVEIMAGEON diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-tslib.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-tslib.patch new file mode 100644 index 0000000000..9a59530ed3 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-tslib.patch @@ -0,0 +1,12 @@ +Index: xorg-server-1.2.0/configure.ac +=================================================================== +--- xorg-server-1.2.0.orig/configure.ac 2007-03-29 13:28:10.000000000 +0200 ++++ xorg-server-1.2.0/configure.ac 2007-03-29 13:28:35.000000000 +0200 +@@ -1517,6 +1517,7 @@ + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + fi + AC_DEFINE(TSLIB, 1, [Have tslib support]) ++ AC_DEFINE(TOUCHSCREEN, 1, [Have touchscreen support]) + fi + + # damage shadow extension glx (NOTYET) fb mi diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-xcalibrate.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-xcalibrate.patch new file mode 100644 index 0000000000..11931f83d6 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/enable-xcalibrate.patch @@ -0,0 +1,51 @@ +Index: xorg-server-1.2.0/mi/miinitext.c +=================================================================== +--- xorg-server-1.2.0.orig/mi/miinitext.c 2007-01-23 06:39:17.000000000 +0100 ++++ xorg-server-1.2.0/mi/miinitext.c 2007-03-30 11:28:44.000000000 +0200 +@@ -372,6 +372,9 @@ + #ifdef DMXEXT + extern void DMXExtensionInit(INITARGS); + #endif ++#ifdef XCALIBRATE ++extern void XCalibrateExtensionInit(INITARGS); ++#endif + #ifdef XEVIE + extern void XevieExtensionInit(INITARGS); + #endif +@@ -663,6 +666,9 @@ + #ifdef DAMAGE + if (!noDamageExtension) DamageExtensionInit(); + #endif ++#ifdef XCALIBRATE ++ XCalibrateExtensionInit (); ++#endif + } + + void +Index: xorg-server-1.2.0/include/kdrive-config.h.in +=================================================================== +--- xorg-server-1.2.0.orig/include/kdrive-config.h.in 2007-03-30 11:31:07.000000000 +0200 ++++ xorg-server-1.2.0/include/kdrive-config.h.in 2007-03-30 11:34:09.000000000 +0200 +@@ -22,6 +22,9 @@ + /* Support tslib touchscreen abstraction library */ + #undef TSLIB + ++/* Build XCalibrate extension */ ++#undef XCALIBRATE ++ + /* Verbose debugging output hilarity */ + #undef DEBUG + +Index: xorg-server-1.2.0/configure.ac +=================================================================== +--- xorg-server-1.2.0.orig/configure.ac 2007-03-30 12:47:25.000000000 +0200 ++++ xorg-server-1.2.0/configure.ac 2007-03-30 12:39:01.000000000 +0200 +@@ -1540,7 +1540,7 @@ + ;; + esac + KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' +- KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS" ++ KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB $TSLIB_LIBS" + + # check if we can build Xephyr + PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/fbcompositesrc8888revnpx0565.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/fbcompositesrc8888revnpx0565.patch new file mode 100644 index 0000000000..e128123419 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/fbcompositesrc8888revnpx0565.patch @@ -0,0 +1,194 @@ +Hello all, + +The attached patch provides a fast path for the case of performing +a8b8g8r8 non-premultiplied (aka the GdkPixbuf format) OVER r5g6b5 via +a new function called fbCompositeSrc_8888RevNPx0565. Basically, it's +just an adaptation of the previous work I talked about here: + +http://lists.freedesktop.org/archives/xorg/2007-April/023763.html + +On my Nokia N800, I get a 3.4x speedup when running this little gdk +benchmark program: + +http://amelang.net/composite_pixbuf.c + +The source file is kinda large (4.5MB) due to an embedded GdkPixbuf. + +Dan Amelang +-------------- next part -------------- +From 63bdc0476c09669cabccffe4b35f8f56aff965a5 Mon Sep 17 00:00:00 2001 +From: Dan Amelang <dan at amelang.net> +Date: Mon, 30 Apr 2007 03:22:52 -0700 +Subject: [PATCH] Implement fbCompositeSrc_8888RevNPx0565 + +This provides a fast path for the common case of compositing GdkPixmaps +with r5g6b5 images. On a simple GDK benchmark application, I get a +3.4x increase in performance on the Nokia N800 (which currently is +running xserver 1.1.99.3). + +All of the optimizations used here are already explained in the following +post to the Xorg mailing list: + + http://lists.freedesktop.org/archives/xorg/2007-April/023763.html +--- + fb/fbpict.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 139 insertions(+), 0 deletions(-) + +diff --git a/fb/fbpict.c b/fb/fbpict.c +index a735967..3bd57fb 100644 +--- a/fb/fbpict.c ++++ b/fb/fbpict.c +@@ -781,6 +781,143 @@ fbCompositeSrc_8888x0565 (CARD8 op, + fbFinishAccess (pSrc->pDrawable); + } + ++ ++#define cvt8888Revto0565(s) ((((s) >> 19) & 0x001f) | \ ++ (((s) >> 5) & 0x07e0) | \ ++ (((s) << 8) & 0xf800)) ++ ++#define FbOverU_8888RevNPx565(s, d) \ ++ \ ++ /* Extract alpha */ \ ++ s_a = (s) >> 24; \ ++ \ ++ /* Extract r8g8b8 color channels */ \ ++ s_r = ( (s) & 0xff); \ ++ s_g = (((s) >> 8) & 0xff); \ ++ s_b = (((s) >> 16) & 0xff); \ ++ \ ++ /* Extract r5g6b5 color channels */ \ ++ d_r = ((d) >> 8) & 0xf8; \ ++ d_g = ((d) >> 3) & 0xfc; \ ++ d_b = ((d) << 3) & 0xf8; \ ++ \ ++ /* Use the higher bits of the channel to fill out the bottom */ \ ++ d_r |= (d_r >> 5); \ ++ d_g |= (d_g >> 6); \ ++ d_b |= (d_b >> 5); \ ++ \ ++ /* Blend */ \ ++ d_r = (s_r - d_r) * s_a + (d_r << 8); \ ++ d_g = (s_g - d_g) * s_a + (d_g << 8); \ ++ d_b = (s_b - d_b) * s_a + (d_b << 8); \ ++ \ ++ /* Pack result as r5g6b5 */ \ ++ (d) = (d_r & 0xf800) | ((d_g & 0xfc00) >> 5) | (d_b >> 11) ++ ++void ++fbCompositeSrc_8888RevNPx0565 (FbComposeData *params) ++{ ++ CARD16 *dstLine, *dst; ++ CARD32 *srcLine, *src; ++ FbStride dstStride, srcStride; ++ int w, h; ++ ++ fbComposeGetStart (params->src, params->xSrc, params->ySrc, CARD32, ++ srcStride, srcLine, 1); ++ fbComposeGetStart (params->dest, params->xDest, params->yDest, CARD16, ++ dstStride, dstLine, 1); ++ h = params->height; ++ ++ while (h--) ++ { ++ CARD32 s1, s2, s3, s4; ++ int d_r, d_g, d_b, s_r, s_g, s_b, s_a; ++ CARD32 *dst_2px_wide; ++ ++ src = srcLine; ++ srcLine += srcStride; ++ dst_2px_wide = (CARD32 *) dstLine; ++ dstLine += dstStride; ++ w = params->width - 4; ++ ++ while (w >= 0) ++ { ++ s1 = *src; ++ s2 = *(src + 1); ++ s3 = *(src + 2); ++ s4 = *(src + 3); ++ ++ w -= 4; ++ src += 4; ++ ++ /* Check if the next 4 pixels are opaque */ ++ if ((s1 & s2 & s3 & s4) > 0xfeffffff) ++ { ++ /* In this case, we just perform a SOURCE for all 4 pixels */ ++#if X_BYTE_ORDER == X_BIG_ENDIAN ++ *dst_2px_wide++ = (cvt8888Revto0565 (s1) << 16) | ++ cvt8888Revto0565 (s2); ++ *dst_2px_wide++ = (cvt8888Revto0565 (s3) << 16) | ++ cvt8888Revto0565 (s4); ++#else ++ *dst_2px_wide++ = cvt8888Revto0565 (s1) | ++ (cvt8888Revto0565 (s2) << 16); ++ *dst_2px_wide++ = cvt8888Revto0565 (s3) | ++ (cvt8888Revto0565 (s4) << 16); ++#endif ++ } ++ /* Next, check if the next 4 pixels have any alpha in them at all */ ++ else if ((s1 | s2 | s3 | s4) > 0x00ffffff) ++ { ++ /* In which case, we perform OVER on each one of them */ ++ CARD32 d1, d2, d3, d4; ++ ++#if X_BYTE_ORDER == X_BIG_ENDIAN ++ d1 = (*dst_2px_wide >> 16); ++ d2 = (*dst_2px_wide & 0xffff); ++ FbOverU_8888RevNPx565 (s1, d1); ++ FbOverU_8888RevNPx565 (s2, d2); ++ *dst_2px_wide++ = (d1 << 16) | d2; ++#else ++ d2 = (*dst_2px_wide >> 16); ++ d1 = (*dst_2px_wide & 0xffff); ++ FbOverU_8888RevNPx565 (s1, d1); ++ FbOverU_8888RevNPx565 (s2, d2); ++ *dst_2px_wide++ = d1 | (d2 << 16); ++#endif ++ ++#if X_BYTE_ORDER == X_BIG_ENDIAN ++ d3 = (*dst_2px_wide >> 16); ++ d4 = (*dst_2px_wide & 0xffff); ++ FbOverU_8888RevNPx565 (s3, d3); ++ FbOverU_8888RevNPx565 (s4, d4); ++ *dst_2px_wide++ = (d3 << 16) | d4; ++#else ++ d4 = (*dst_2px_wide >> 16); ++ d3 = (*dst_2px_wide & 0xffff); ++ FbOverU_8888RevNPx565 (s3, d3); ++ FbOverU_8888RevNPx565 (s4, d4); ++ *dst_2px_wide++ = d3 | (d4 << 16); ++#endif ++ } ++ else ++ { ++ /* Do nothing, since the source pixels are all transparent */ ++ dst_2px_wide += 2; ++ } ++ } ++ ++ /* Deal with left over pixels */ ++ for (dst = (CARD16 *) dst_2px_wide; w > -4; w--) ++ { ++ CARD32 d = *dst; ++ CARD32 s = *src++; ++ FbOverU_8888RevNPx565 (s, d); ++ *dst++ = d; ++ } ++ } ++} ++ + void + fbCompositeSrcAdd_8000x8000 (CARD8 op, + PicturePtr pSrc, +@@ -1669,7 +1806,9 @@ fbComposite (CARD8 op, + #ifdef USE_MMX + if (fbHaveMMX()) + func = fbCompositeSrc_8888RevNPx0565mmx; ++ else + #endif ++ func = fbCompositeSrc_8888RevNPx0565; + break; + default: + break; diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/optional-xkb.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/optional-xkb.patch new file mode 100644 index 0000000000..a580b500b7 --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/optional-xkb.patch @@ -0,0 +1,58 @@ +Index: xorg-server-1.2.0/Makefile.am +=================================================================== +--- xorg-server-1.2.0.orig/Makefile.am 2007-01-23 06:39:15.000000000 +0100 ++++ xorg-server-1.2.0/Makefile.am 2007-03-28 20:26:19.000000000 +0200 +@@ -30,6 +30,10 @@ + XINPUT_DIR=Xi + endif + ++if XKB ++XKB_DIR=xkb ++endif ++ + if DBE + DBE_DIR=dbe + endif +@@ -46,7 +50,7 @@ + randr \ + render \ + $(XINPUT_DIR) \ +- xkb \ ++ $(XKB_DIR) \ + $(DBE_DIR) \ + $(MFB_DIR) \ + $(AFB_DIR) \ +Index: xorg-server-1.2.0/configure.ac +=================================================================== +--- xorg-server-1.2.0.orig/configure.ac 2007-01-23 06:39:15.000000000 +0100 ++++ xorg-server-1.2.0/configure.ac 2007-03-28 20:27:13.000000000 +0200 +@@ -428,6 +428,7 @@ + AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) + AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes]) + 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]) +@@ -754,12 +755,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'.])) diff --git a/recipes/xorg-xserver/xserver-kdrive-1.2.0/xcalibrate_coords.patch b/recipes/xorg-xserver/xserver-kdrive-1.2.0/xcalibrate_coords.patch new file mode 100644 index 0000000000..e0cca5428b --- /dev/null +++ b/recipes/xorg-xserver/xserver-kdrive-1.2.0/xcalibrate_coords.patch @@ -0,0 +1,122 @@ +--- + Xext/xcalibrate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- + hw/kdrive/src/kdrive.h | 3 +++ + hw/kdrive/src/kinput.c | 12 ++++++++++++ + 3 files changed, 61 insertions(+), 1 deletion(-) + +Index: xorg-server-1.3.0.0/Xext/xcalibrate.c +=================================================================== +--- xorg-server-1.3.0.0.orig/Xext/xcalibrate.c 2007-06-29 17:30:03.000000000 +0100 ++++ xorg-server-1.3.0.0/Xext/xcalibrate.c 2007-06-30 14:04:40.000000000 +0100 +@@ -166,7 +166,6 @@ ProcXCalibrateSetRawMode (ClientPtr clie + return (client->noClientException); + } + +- + static int + SProcXCalibrateSetRawMode (ClientPtr client) + { +@@ -180,6 +179,47 @@ SProcXCalibrateSetRawMode (ClientPtr cli + return ProcXCalibrateSetRawMode(client); + } + ++static int ++ProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ xXCalibrateScreenToCoordReply rep; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ memset (&rep, 0, sizeof (rep)); ++ rep.type = X_Reply; ++ rep.sequenceNumber = client->sequence; ++ rep.x = stuff->x; ++ rep.y = stuff->y; ++ ++ KdScreenToMouseCoords(&rep.x, &rep.y); ++ ++ if (client->swapped) ++ { ++ int n; ++ ++ swaps (&rep.x, n); ++ swaps (&rep.y, n); ++ } ++ WriteToClient(client, sizeof (rep), (char *) &rep); ++ return (client->noClientException); ++} ++ ++static int ++SProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ int n; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ swaps(&stuff->x, n); ++ swaps(&stuff->y, n); ++ ++ return ProcXCalibrateScreenToCoord(client); ++} ++ + static void + XCalibrateResetProc (ExtensionEntry *extEntry) + { +@@ -194,6 +234,9 @@ ProcXCalibrateDispatch (ClientPtr client + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return ProcXCalibrateScreenToCoord(client); ++ + default: break; + } + +@@ -213,6 +256,8 @@ SProcXCalibrateDispatch (ClientPtr clien + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return SProcXCalibrateScreenToCoord(client); + + default: break; + } +Index: xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h +=================================================================== +--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kdrive.h 2007-06-30 13:43:45.000000000 +0100 ++++ xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h 2007-06-30 13:45:03.000000000 +0100 +@@ -746,6 +746,9 @@ void + KdSetMouseMatrix (KdMouseMatrix *matrix); + + void ++KdScreenToMouseCoords (int *x, int *y); ++ ++void + KdComputeMouseMatrix (KdMouseMatrix *matrix, Rotation randr, int width, int height); + + void +Index: xorg-server-1.3.0.0/hw/kdrive/src/kinput.c +=================================================================== +--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kinput.c 2007-06-29 17:30:16.000000000 +0100 ++++ xorg-server-1.3.0.0/hw/kdrive/src/kinput.c 2007-06-30 15:52:16.000000000 +0100 +@@ -381,6 +381,18 @@ KdSetMouseMatrix (KdMouseMatrix *matrix) + } + + void ++KdScreenToMouseCoords (int *x, int *y) ++{ ++ int (*m)[3] = kdMouseMatrix.matrix; ++ int div = m[0][1] * m[1][0] - m[1][1] * m[0][0]; ++ int sx = *x; ++ int sy = *y; ++ ++ *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div; ++ *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div; ++} ++ ++void + KdComputeMouseMatrix (KdMouseMatrix *m, Rotation randr, int width, int height) + { + int x_dir = 1, y_dir = 1; |