1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

xserver-kdrive: Clean up unused patches and broken git recipe

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3465 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2008-01-11 12:56:32 +00:00
parent 3156c5a82c
commit a30424c269
26 changed files with 0 additions and 8611 deletions
@@ -1,464 +0,0 @@
--- xserver.orig/configure.ac 2006-03-11 16:27:42.000000000 +0100
+++ xserver/configure.ac 2006-03-11 16:46:51.000000000 +0100
@@ -79,7 +79,7 @@
# tslib touchscreen driver
AC_CHECK_HEADERS([tslib.h])
-REQUIRED_MODULES="randr render fixesext damageext xextensions xfont xproto xtrans xau"
+REQUIRED_MODULES="randrproto renderproto fixesproto damageproto xextproto xfont xproto xtrans xau"
DEFAULT_FONT_PATH="/usr/lib/X11/fonts/misc,/usr/lib/X11/fonts/100dpi,/usr/lib/X11/fonts/75dpi"
DEFAULT_VENDOR_STRING="freedesktop.org"
--- xserver.orig/dix/dispatch.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/dix/dispatch.c 2006-03-11 16:30:59.000000000 +0100
@@ -79,7 +79,6 @@
#endif
#include "windowstr.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "gcstruct.h"
#include "selection.h"
--- xserver.orig/dix/glyphcurs.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/dix/glyphcurs.c 2006-03-11 16:31:57.000000000 +0100
@@ -51,7 +51,6 @@
#include <config.h>
#endif
#include "misc.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
--- xserver.orig/dix/main.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/dix/main.c 2006-03-11 16:32:05.000000000 +0100
@@ -89,7 +89,6 @@
#include "colormap.h"
#include "colormapst.h"
#include "cursorstr.h"
-#include "font.h"
#include "opaque.h"
#include "servermd.h"
#include "site.h"
--- xserver.orig/dix/swaprep.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/dix/swaprep.c 2006-03-11 16:32:24.000000000 +0100
@@ -57,7 +57,7 @@
#include <X11/Xproto.h>
#include "misc.h"
#include "dixstruct.h"
-#include "fontstruct.h"
+#include "dixfont.h"
#include "scrnintstr.h"
#include "swaprep.h"
#include "globals.h"
--- xserver.orig/dix/xpstubs.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/dix/xpstubs.c 2006-03-11 16:32:34.000000000 +0100
@@ -31,7 +31,7 @@
#include <config.h>
#endif
#include "misc.h"
-#include "font.h"
+#include "dixfont.h"
Bool
XpClientIsBitmapClient(ClientPtr client)
--- xserver.orig/fb/fbglyph.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/fb/fbglyph.c 2006-03-11 16:52:01.000000000 +0100
@@ -26,7 +26,6 @@
#include <config.h>
#endif
#include "fb.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
Bool
--- xserver.orig/hw/kdrive/epson/epson13806draw.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/hw/kdrive/epson/epson13806draw.c 2006-03-11 16:34:56.000000000 +0100
@@ -38,7 +38,6 @@
#include "pixmapstr.h"
#include "regionstr.h"
#include "mistruct.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "fb.h"
#include "migc.h"
--- xserver.orig/hw/kdrive/i810/i810draw.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/hw/kdrive/i810/i810draw.c 2006-03-11 16:34:41.000000000 +0100
@@ -51,7 +51,6 @@
#include "pixmapstr.h"
#include "regionstr.h"
#include "mistruct.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "fb.h"
#include "migc.h"
--- xserver.orig/hw/kdrive/src/kaa.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/hw/kdrive/src/kaa.c 2006-03-11 16:35:39.000000000 +0100
@@ -29,7 +29,6 @@
#endif
#include "kdrive.h"
#include "kaa.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#define DEBUG_MIGRATE 0
--- xserver.orig/include/dixfont.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/include/dixfont.h 2006-03-11 16:43:25.000000000 +0100
@@ -27,10 +27,10 @@
#define DIXFONT_H 1
#include "dix.h"
-#include "font.h"
-#include "fontconf.h"
+#include <X11/fonts/font.h>
+#include <X11/fonts/fontconf.h>
#include "closure.h"
-#include "fontstruct.h"
+#include <X11/fonts/fontstruct.h>
#define NullDIXFontProp ((DIXFontPropPtr)0)
--- xserver.orig/include/dixfontstr.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/include/dixfontstr.h 2006-03-11 16:43:31.000000000 +0100
@@ -27,7 +27,6 @@
#include "servermd.h"
#include "dixfont.h"
-#include "fontstruct.h"
#include "closure.h"
#define NEED_REPLIES
#include "X11/Xproto.h" /* for xQueryFontReply */
--- xserver.orig/mi/mibstore.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/mibstore.c 2006-03-11 16:36:26.000000000 +0100
@@ -57,7 +57,6 @@
#include "gcstruct.h"
#include "windowstr.h"
#include "pixmapstr.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "dixstruct.h" /* For requestingClient */
#include "mi.h"
--- xserver.orig/mi/miglblt.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/miglblt.c 2006-03-11 16:53:52.000000000 +0100
@@ -55,7 +55,6 @@
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include "misc.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "gcstruct.h"
#include "windowstr.h"
--- xserver.orig/mi/mi.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/mi.h 2006-03-11 16:36:16.000000000 +0100
@@ -54,7 +54,7 @@
#include "validate.h"
#include "window.h"
#include "gc.h"
-#include "font.h"
+#include "dixfont.h"
#include "input.h"
#include "cursor.h"
--- xserver.orig/mi/miinitext.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/miinitext.c 2006-03-11 16:36:41.000000000 +0100
@@ -54,6 +54,8 @@
#include "extension.h"
#include "micmap.h"
#include "xext.h"
+#include "pixmap.h"
+#include "gc.h"
#ifdef NOPEXEXT /* sleaze for Solaris cpp building XsunMono */
#undef PEXEXT
--- xserver.orig/mi/mipolytext.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/mipolytext.c 2006-03-11 16:36:48.000000000 +0100
@@ -63,7 +63,6 @@
#include <X11/Xproto.h>
#include "misc.h"
#include "gcstruct.h"
-#include "fontstruct.h"
#include "dixfontstr.h"
#include "mi.h"
--- xserver.orig/mi/misprite.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/mi/misprite.c 2006-03-11 16:37:00.000000000 +0100
@@ -42,7 +42,6 @@
# include "input.h"
# include "mi.h"
# include "cursorstr.h"
-# include "font.h"
# include "scrnintstr.h"
# include "colormapst.h"
# include "windowstr.h"
@@ -50,7 +49,6 @@
# include "mipointer.h"
# include "mispritest.h"
# include "dixfontstr.h"
-# include "fontstruct.h"
#ifdef RENDER
# include "mipict.h"
#endif
--- xserver.orig/miext/damage/damage.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/damage/damage.c 2006-03-11 16:37:17.000000000 +0100
@@ -28,9 +28,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shadow.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shadow.c 2006-03-11 16:38:13.000000000 +0100
@@ -29,9 +29,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shalloc.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shalloc.c 2006-03-11 16:38:25.000000000 +0100
@@ -29,9 +29,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shpacked.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shpacked.c 2006-03-11 16:38:33.000000000 +0100
@@ -28,9 +28,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shplanar8.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shplanar8.c 2006-03-11 16:38:44.000000000 +0100
@@ -28,9 +28,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shplanar.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shplanar.c 2006-03-11 16:38:39.000000000 +0100
@@ -28,9 +28,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shrotate.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shrotate.c 2006-03-11 16:38:56.000000000 +0100
@@ -28,9 +28,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shrotpack.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shrotpack.h 2006-03-11 16:39:02.000000000 +0100
@@ -30,9 +30,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/miext/shadow/shrotpackYX.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/miext/shadow/shrotpackYX.h 2006-03-11 16:39:08.000000000 +0100
@@ -25,9 +25,7 @@
#include <X11/X.h>
#include "scrnintstr.h"
#include "windowstr.h"
-#include "font.h"
#include "dixfontstr.h"
-#include "fontstruct.h"
#include "mi.h"
#include "regionstr.h"
#include "globals.h"
--- xserver.orig/os/xstrans.c 2006-03-11 16:27:42.000000000 +0100
+++ xserver/os/xstrans.c 2006-03-11 16:39:31.000000000 +0100
@@ -27,4 +27,4 @@
#include "config.h"
-#include <transport.c>
+#include <X11/Xtrans/transport.c>
--- xserver.orig/os/xstrans.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/os/xstrans.h 2006-03-11 16:39:37.000000000 +0100
@@ -25,4 +25,4 @@
#define XSERV_t
#define TRANS_SERVER
-#include <Xtrans.h>
+#include <X11/Xtrans/Xtrans.h>
--- xserver.orig/Xext/shmint.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/Xext/shmint.h 2006-03-11 16:29:24.000000000 +0100
@@ -32,27 +32,6 @@
#include "pixmap.h"
#include "gc.h"
-typedef struct _ShmFuncs {
- PixmapPtr (* CreatePixmap)(ScreenPtr pScreen,
- int width,
- int height,
- int depth,
- char *addr);
- void (* PutImage)(DrawablePtr dst,
- GCPtr pGC,
- int depth,
- unsigned int format,
- int w,
- int h,
- int sx,
- int sy,
- int sw,
- int sh,
- int dx,
- int dy,
- char *data);
-} ShmFuncs, *ShmFuncsPtr;
-
void
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
--- xserver.orig/Xext/syncint.h 2006-03-11 16:27:42.000000000 +0100
+++ xserver/Xext/syncint.h 2006-03-11 16:30:16.000000000 +0100
@@ -48,7 +48,7 @@
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $Id: syncint.h,v 3.1 2003-11-02 19:56:10 keithp Exp $ */
+/* $Id: syncint.h,v 3.2 2005-04-20 18:42:31 clee Exp $ */
#ifndef _SYNCINT_H_
#define _SYNCINT_H_
@@ -57,26 +57,10 @@
#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
-typedef struct _SyncCounter {
- ClientPtr client; /* Owning client. 0 for system counters */
- XSyncCounter id; /* resource ID */
- CARD64 value; /* counter value */
- struct _SyncTriggerList *pTriglist; /* list of triggers */
- Bool beingDestroyed; /* in process of going away */
- struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
-} SyncCounter;
-
/*
* The System Counter interface
*/
-typedef enum {
- XSyncCounterNeverChanges,
- XSyncCounterNeverIncreases,
- XSyncCounterNeverDecreases,
- XSyncCounterUnrestricted
-} SyncCounterType;
-
typedef void
(*SyncQueryValueProcPtr) (pointer pCounter,
CARD64 *freshvalue);
@@ -86,16 +70,6 @@
CARD64 *lessthan,
CARD64 *greaterthan);
-typedef struct _SysCounterInfo {
- char *name;
- CARD64 resolution;
- CARD64 bracket_greater;
- CARD64 bracket_less;
- SyncCounterType counterType; /* how can this counter change */
- SyncQueryValueProcPtr QueryValue;
- SyncBracketValuesProcPtr BracketValues;
-} SysCounterInfo;
-
struct _SyncTrigger;
typedef Bool
@@ -108,55 +82,6 @@
typedef void
(*SyncCounterDestroyedProcPtr) (struct _SyncTrigger *pTrigger);
-typedef struct _SyncTrigger {
- SyncCounter *pCounter;
- CARD64 wait_value; /* wait value */
- unsigned int value_type; /* Absolute or Relative */
- unsigned int test_type; /* transition or Comparision type */
- CARD64 test_value; /* trigger event threshold value */
- SyncCheckTriggerProcPtr CheckTrigger;
- SyncTriggerFiredProcPtr TriggerFired;
- SyncCounterDestroyedProcPtr CounterDestroyed;
-} SyncTrigger;
-
-typedef struct _SyncTriggerList {
- SyncTrigger *pTrigger;
- struct _SyncTriggerList *next;
-} SyncTriggerList;
-
-typedef struct _SyncAlarmClientList {
- ClientPtr client;
- XID delete_id;
- struct _SyncAlarmClientList *next;
-} SyncAlarmClientList;
-
-typedef struct _SyncAlarm {
- SyncTrigger trigger;
- ClientPtr client;
- XSyncAlarm alarm_id;
- CARD64 delta;
- int events;
- int state;
- SyncAlarmClientList *pEventClients;
-} SyncAlarm;
-
-typedef struct {
- ClientPtr client;
- CARD32 delete_id;
- int num_waitconditions;
-} SyncAwaitHeader;
-
-typedef struct {
- SyncTrigger trigger;
- CARD64 event_threshold;
- SyncAwaitHeader *pHeader;
-} SyncAwait;
-
-typedef union {
- SyncAwaitHeader header;
- SyncAwait await;
-} SyncAwaitUnion;
-
pointer
SyncCreateSystemCounter(char *name,
CARD64 inital_value,
@@ -1,18 +0,0 @@
Index: git/composite/compext.c
===================================================================
--- git.orig/composite/compext.c 2007-03-28 16:25:12.000000000 +0200
+++ git/composite/compext.c 2007-03-28 16:25:15.000000000 +0200
@@ -696,11 +696,13 @@
if (GetPictureScreenIfSet(pScreen) == NULL)
return;
}
+#ifdef PANORAMIX
/* Xinerama's rewriting of window drawing before Composite gets to it
* breaks Composite.
*/
if (!noPanoramiXExtension)
return;
+#endif
CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
if (!CompositeClientWindowType)
@@ -1,47 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- xserver/hw/kdrive/linux/linux.c~devfs
+++ xserver/hw/kdrive/linux/linux.c
@@ -82,10 +82,10 @@
vtno = kdVirtualTerminal;
else
{
- if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0)
+ if ((fd = open("/dev/vc/0",O_WRONLY,0)) < 0)
{
FatalError(
- "LinuxInit: Cannot open /dev/tty0 (%s)\n",
+ "LinuxInit: Cannot open /dev/tty/0 (%s)\n",
strerror(errno));
}
if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) ||
@@ -96,7 +96,7 @@
}
close(fd);
- sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */
+ sprintf(vtname,"/dev/vc/%d",vtno); /* /dev/tty1-64 */
if ((LinuxConsoleFd = open(vtname, O_RDWR|O_NDELAY, 0)) < 0)
{
@@ -113,7 +113,7 @@
*
* Why is this needed?
*/
- LinuxCheckChown ("/dev/tty0");
+ LinuxCheckChown ("/dev/vc/0");
/*
* Linux doesn't switch to an active vt after the last close of a vt,
* so we do this ourselves by remembering which is active now.
@@ -453,7 +453,7 @@
activeVT = -1;
}
close(LinuxConsoleFd); /* make the vt-manager happy */
- fd = open ("/dev/tty0", O_RDWR|O_NDELAY, 0);
+ fd = open ("/dev/vc/0", O_RDWR|O_NDELAY, 0);
if (fd >= 0)
{
memset (&vts, '\0', sizeof (vts)); /* valgrind */
@@ -1,37 +0,0 @@
--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
@@ -505,7 +505,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"
+else
REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto"
+fi
REQUIRED_LIBS="xfont xau fontenc"
AM_CONDITIONAL(XV, [test "x$XV" = xyes])
@@ -1514,7 +1526,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
@@ -1534,10 +1548,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],
@@ -1,11 +0,0 @@
--- /tmp/Makefile.am 2006-08-30 09:51:21.000000000 +0200
+++ git/hw/kdrive/Makefile.am 2006-08-30 09:51:44.425780000 +0200
@@ -4,7 +4,7 @@
endif
if KDRIVEFBDEV
-FBDEV_SUBDIRS = fbdev
+FBDEV_SUBDIRS = fbdev epson
endif
if XSDLSERVER
@@ -1,23 +0,0 @@
--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
@@ -1438,6 +1446,10 @@
fi
- # tslib...
+ AC_CHECK_HEADERS([tslib.h])
+ if test "$ac_cv_header_tslib_h" = yes; then
+ AC_DEFINE(TSLIB, 1, [Build kdrive with tslib support])
+ AC_DEFINE(TOUCHSCREEN, 1, [Build kdrive with touchscreen support])
+ fi
# damage shadow extension glx (NOTYET) fb mi
KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src'
@@ -1467,7 +1479,7 @@
AC_SUBST(KDRIVE_CFLAGS)
AC_SUBST(KDRIVE_PURE_LIBS)
AC_SUBST(KDRIVE_LIBS)
-AM_CONDITIONAL(TSLIB, false)
+AM_CONDITIONAL(TSLIB, [test x"$ac_cv_header_tslib_h" = xyes])
AM_CONDITIONAL(H3600_TS, false)
AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
@@ -1,11 +0,0 @@
--- 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
}
@@ -1,241 +0,0 @@
Index: xserver/miext/shadow/shrotate.c
===================================================================
RCS file: /scratch/openbsd/cvs/XF4/xc/programs/Xserver/miext/shadow/shrotate.c,v
retrieving revision 1.2
diff -u -r1.2 shrotate.c
--- xserver/miext/shadow/shrotate.c 3 Nov 2004 00:09:54 -0000 1.2
+++ xserver/miext/shadow/shrotate.c 20 Sep 2005 23:07:58 -0000
@@ -45,6 +45,106 @@
#define TOP_TO_BOTTOM 2
#define BOTTOM_TO_TOP -2
+
+static void
+shadowUpdateRotatePackedSubRectangle(shadowBufPtr pBuf,
+ FbBits *shaLine, int shaFirstShift,
+ int shaStepOverX, int shaStepOverY,
+ int shaStepDownX, int shaStepDownY,
+ int shaBpp, FbBits shaMask,
+ ScreenPtr pScreen,
+ int scr_x1, int scr_y,
+ int scr_h, int scr_w,
+ int pixelsPerBits)
+{
+ FbBits *sha;
+ int shaShift;
+ int scr_x;
+ int w;
+
+ /*
+ * Copy the bits, always write across the physical frame buffer
+ * to take advantage of write combining.
+ */
+ while (scr_h--)
+ {
+ int p;
+ FbBits bits;
+ FbBits *win;
+ int i;
+ CARD32 winSize;
+
+ sha = shaLine;
+ shaShift = shaFirstShift;
+ w = scr_w;
+ scr_x = scr_x1 * shaBpp >> FB_SHIFT;
+
+ while (w)
+ {
+ /*
+ * Map some of this line
+ */
+ win = (FbBits *) (*pBuf->window) (pScreen,
+ scr_y,
+ scr_x << 2,
+ SHADOW_WINDOW_WRITE,
+ &winSize,
+ pBuf->closure);
+ i = (winSize >> 2);
+ if (i > w)
+ i = w;
+ w -= i;
+ scr_x += i;
+ /*
+ * Copy the portion of the line mapped
+ */
+ while (i--)
+ {
+ bits = 0;
+ p = pixelsPerBits;
+ /*
+ * Build one word of output from multiple inputs
+ */
+ while (p--)
+ {
+ bits = FbScrLeft(bits, shaBpp);
+ bits |= FbScrRight (*sha, shaShift) & shaMask;
+
+ shaShift -= shaStepOverX;
+ if (shaShift >= FB_UNIT)
+ {
+ shaShift -= FB_UNIT;
+ sha--;
+ }
+ else if (shaShift < 0)
+ {
+ shaShift += FB_UNIT;
+ sha++;
+ }
+ sha += shaStepOverY;
+ }
+ *win++ = bits;
+ }
+ }
+ scr_y++;
+ shaFirstShift -= shaStepDownX;
+ if (shaFirstShift >= FB_UNIT)
+ {
+ shaFirstShift -= FB_UNIT;
+ shaLine--;
+ }
+ else if (shaFirstShift < 0)
+ {
+ shaFirstShift += FB_UNIT;
+ shaLine++;
+ }
+ shaLine += shaStepDownY;
+ }
+}
+
+#define BLOCKSIZE_HEIGHT 32
+#define BLOCKSIZE_WIDTH 32
+
void
shadowUpdateRotatePacked (ScreenPtr pScreen,
shadowBufPtr pBuf)
@@ -61,7 +161,6 @@
int sha_x1 = 0, sha_y1 = 0;
int scr_x1 = 0, scr_x2 = 0, scr_y1 = 0, scr_y2 = 0, scr_w, scr_h;
int scr_x, scr_y;
- int w;
int pixelsPerBits;
int pixelsMask;
FbStride shaStepOverY = 0, shaStepDownY = 0;
@@ -221,86 +320,46 @@
((sha_x1 * shaBpp) >> FB_SHIFT));
/*
- * Copy the bits, always write across the physical frame buffer
- * to take advantage of write combining.
+ * Copy in blocks of size BLOCKSIZE_WIDTH x BLOCKSIZE_HEIGHT
+ * to reduce the number of cache misses when rotating 90 or
+ * 270 degrees.
*/
- while (scr_h--)
+ for (scr_y = scr_y1; scr_y < scr_y2; scr_y += BLOCKSIZE_HEIGHT)
{
- int p;
- FbBits bits;
- FbBits *win;
- int i;
- CARD32 winSize;
-
sha = shaLine;
shaShift = shaFirstShift;
- w = scr_w;
- scr_x = scr_x1 * shaBpp >> FB_SHIFT;
- while (w)
+ for (scr_x = scr_x1; scr_x < scr_x2; scr_x += BLOCKSIZE_WIDTH)
{
- /*
- * Map some of this line
- */
- win = (FbBits *) (*pBuf->window) (pScreen,
- scr_y,
- scr_x << 2,
- SHADOW_WINDOW_WRITE,
- &winSize,
- pBuf->closure);
- i = (winSize >> 2);
- if (i > w)
- i = w;
- w -= i;
- scr_x += i;
- /*
- * Copy the portion of the line mapped
- */
- while (i--)
- {
- bits = 0;
- p = pixelsPerBits;
- /*
- * Build one word of output from multiple inputs
- *
- * Note that for 90/270 rotations, this will walk
- * down the shadow hitting each scanline once.
- * This is probably not very efficient.
- */
- while (p--)
- {
- bits = FbScrLeft(bits, shaBpp);
- bits |= FbScrRight (*sha, shaShift) & shaMask;
+ int h = BLOCKSIZE_HEIGHT;
+ int w = BLOCKSIZE_WIDTH;
- shaShift -= shaStepOverX;
- if (shaShift >= FB_UNIT)
- {
- shaShift -= FB_UNIT;
- sha--;
- }
- else if (shaShift < 0)
- {
- shaShift += FB_UNIT;
- sha++;
- }
- sha += shaStepOverY;
- }
- *win++ = bits;
- }
- }
- scr_y++;
- shaFirstShift -= shaStepDownX;
- if (shaFirstShift >= FB_UNIT)
- {
- shaFirstShift -= FB_UNIT;
- shaLine--;
- }
- else if (shaFirstShift < 0)
- {
- shaFirstShift += FB_UNIT;
- shaLine++;
+ if (scr_y + h > scr_y2)
+ h = scr_y2 - scr_y;
+ if (scr_x + w > scr_x2)
+ w = scr_x2 - scr_x;
+ w = (w * shaBpp) >> FB_SHIFT;
+
+ shadowUpdateRotatePackedSubRectangle
+ (pBuf,
+ sha, shaShift,
+ shaStepOverX, shaStepOverY,
+ shaStepDownX, shaStepDownY,
+ shaBpp, shaMask,
+ pScreen,
+ scr_x, scr_y,
+ h, w,
+ pixelsPerBits);
+
+ shaShift -= BLOCKSIZE_WIDTH * shaStepOverX;
+ sha += BLOCKSIZE_WIDTH * shaStepOverY;
+ sha -= (shaShift >> FB_SHIFT);
+ shaShift &= FB_MASK;
}
- shaLine += shaStepDownY;
+ shaFirstShift -= BLOCKSIZE_HEIGHT * shaStepDownX;
+ shaLine += BLOCKSIZE_HEIGHT * shaStepDownY;
+ shaLine -= (shaFirstShift >> FB_SHIFT);
+ shaFirstShift &= FB_MASK;
}
}
}
@@ -1,756 +0,0 @@
# Author : Manuel Teira <manuel.teira@telefonica.net> (sirfred in #oe)
# Description: Support for multiple memory video zones in kdrive. Make offscreen
# areas aware of the memory video zone it belongs to. Change the fbdev driver to
# honour this new model.
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c~kdrive-vidmemarea
+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c
@@ -908,9 +908,10 @@
ret = (*pScreen->CloseScreen) (index, pScreen);
else
ret = TRUE;
-
- if (screen->off_screen_base < screen->memory_size)
- KdOffscreenFini (pScreen);
+
+ if (KdHasOffscreen(screen)) {
+ KdOffscreenFini(pScreen);
+ }
if (pScreenPriv->dpmsState != KD_DPMS_NORMAL)
(*card->cfuncs->dpms) (pScreen, KD_DPMS_NORMAL);
@@ -1219,8 +1220,9 @@
if (!(*card->cfuncs->initAccel) (pScreen))
screen->dumb = TRUE;
- if (screen->off_screen_base < screen->memory_size)
- KdOffscreenInit (pScreen);
+ if (KdHasOffscreen(screen)) {
+ KdOffscreenInit(pScreen);
+ }
#ifdef PSEUDO8
(void) p8Init (pScreen, PSEUDO8_USE_DEFAULT);
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.h~kdrive-vidmemarea
+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.h
@@ -63,6 +63,9 @@
#define KD_MAX_CARD_ADDRESS 8
#endif
+#define KD_VIDMEM_MINPRIO 0
+#define KD_VIDMEM_MAXPRIO 255
+
/*
* Configuration information per video card
*/
@@ -115,6 +118,13 @@
typedef void (*KdOffscreenSaveProc) (ScreenPtr pScreen, KdOffscreenArea *area);
+typedef struct _KdVideoMemArea {
+ CARD8 priority;
+ CARD8 *base;
+ CARD32 size;
+ CARD32 available_offset;
+} KdVideoMemArea;
+
typedef enum _KdOffscreenState {
KdOffscreenAvail,
KdOffscreenRemovable,
@@ -127,7 +137,8 @@
int size;
int score;
pointer privData;
-
+ KdVideoMemArea *vidmem;
+ int pool;
KdOffscreenSaveProc save;
KdOffscreenState state;
@@ -138,6 +149,7 @@
#define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270)
#define RR_Reflect_All (RR_Reflect_X|RR_Reflect_Y)
+
typedef struct _KdScreenInfo {
struct _KdScreenInfo *next;
KdCardInfo *card;
@@ -155,9 +167,8 @@
int mynum;
DDXPointRec origin;
KdFrameBuffer fb[KD_MAX_FB];
- CARD8 *memory_base;
- unsigned long memory_size;
- unsigned long off_screen_base;
+ KdVideoMemArea **videomem_areas;
+ int num_videomem_areas;
} KdScreenInfo;
typedef struct _KdCardFuncs {
@@ -187,7 +198,6 @@
void (*getColors) (ScreenPtr, int, int, xColorItem *);
void (*putColors) (ScreenPtr, int, int, xColorItem *);
-
} KdCardFuncs;
#define KD_MAX_PSEUDO_DEPTH 8
@@ -203,7 +213,8 @@
int dpmsState;
- KdOffscreenArea *off_screen_areas;
+ KdOffscreenArea **offscreen_pools;
+ int num_offscreen_pools;
ColormapPtr pInstalledmap[KD_MAX_FB]; /* current colormap */
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE];/* saved windows colors */
@@ -881,6 +892,15 @@
KdOffscreenInit (ScreenPtr pScreen);
KdOffscreenArea *
+KdOffscreenAllocPrio (ScreenPtr pScreen, int size, int align,
+ Bool locked,
+ KdOffscreenSaveProc save,
+ pointer privData,
+ int minPriority,
+ int maxPriority,
+ Bool allowEviction);
+
+KdOffscreenArea *
KdOffscreenAlloc (ScreenPtr pScreen, int size, int align,
Bool locked,
KdOffscreenSaveProc save,
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kaa.c~kdrive-vidmemarea
+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kaa.c
@@ -160,7 +160,7 @@
pPixmap->drawable.width,
pPixmap->drawable.height));
pPixmap->devKind = pitch;
- pPixmap->devPrivate.ptr = (pointer) ((CARD8 *) pScreenPriv->screen->memory_base + pKaaPixmap->area->offset);
+ pPixmap->devPrivate.ptr = (pointer) ((CARD8 *) pKaaPixmap->area->vidmem->base + pKaaPixmap->area->offset);
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
return TRUE;
}
@@ -198,7 +198,7 @@
dst = pPixmap->devPrivate.ptr;
dst_pitch = pPixmap->devKind;
-
+
bytes = src_pitch < dst_pitch ? src_pitch : dst_pitch;
kaaWaitSync (pPixmap->drawable.pScreen);
@@ -336,10 +336,16 @@
{
ScreenPtr pScreen = p->drawable.pScreen;
KdScreenPriv(pScreen);
+ int index;
- return ((unsigned long) ((CARD8 *) p->devPrivate.ptr -
- (CARD8 *) pScreenPriv->screen->memory_base) <
- pScreenPriv->screen->memory_size);
+ for (index = 0; index < pScreenPriv->screen->num_videomem_areas; index++) {
+ KdVideoMemArea *vidmem = pScreenPriv->screen->videomem_areas[index];
+ if ((((CARD8 *)p->devPrivate.ptr) >= vidmem->base) &&
+ (((CARD8 *)p->devPrivate.ptr) <= (vidmem->base + vidmem->size))) {
+ return TRUE;
+ }
+ }
+ return FALSE;
}
PixmapPtr
@@ -1060,6 +1066,7 @@
KdCheckPaintWindow (pWin, pRegion, what);
}
+
Bool
kaaDrawInit (ScreenPtr pScreen,
KaaScreenInfoPtr pScreenInfo)
@@ -1109,7 +1116,7 @@
* Hookup offscreen pixmaps
*/
if ((pKaaScr->info->flags & KAA_OFFSCREEN_PIXMAPS) &&
- screen->off_screen_base < screen->memory_size)
+ KdHasOffscreen(screen))
{
if (!AllocatePixmapPrivate(pScreen, kaaPixmapPrivateIndex,
sizeof (KaaPixmapPrivRec)))
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/koffscreen.c~kdrive-vidmemarea
+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/koffscreen.c
@@ -41,16 +41,20 @@
{
KdScreenPriv (pScreen);
KdOffscreenArea *prev = 0, *area;
-
- assert (pScreenPriv->screen->off_screen_areas->area.offset == 0);
- for (area = pScreenPriv->off_screen_areas; area; area = area->next)
- {
- if (prev)
- assert (prev->offset + prev->size == area->offset);
+ int index;
+
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ area = pScreenPriv->offscreen_pools[index];
+ assert (area->vidmem->available_offset - area.offset == 0);
+ while(area) {
+ if (prev)
+ assert (prev->offset + prev->size == area->offset);
- prev = area;
+ prev = area;
+ area = area->next;
+ }
+ assert (prev->offset + prev->size == prev->vidmem->size);
}
- assert (prev->offset + prev->size == pScreenPriv->screen->memory_size);
}
#else
#define KdOffscreenValidate(s)
@@ -65,101 +69,133 @@
}
KdOffscreenArea *
-KdOffscreenAlloc (ScreenPtr pScreen, int size, int align,
- Bool locked,
- KdOffscreenSaveProc save,
- pointer privData)
+KdOffscreenAllocPrio (ScreenPtr pScreen, int size, int align,
+ Bool locked,
+ KdOffscreenSaveProc save,
+ pointer privData,
+ int minPriority,
+ int maxPriority,
+ Bool allowEviction)
{
KdOffscreenArea *area, *begin, *best;
KdScreenPriv (pScreen);
int tmp, real_size = 0, best_score;
+ int index;
+ Bool canFit = FALSE;
- KdOffscreenValidate (pScreen);
if (!align)
align = 1;
if (!size)
{
- DBG_OFFSCREEN (("Alloc 0x%x -> EMPTY\n", size));
+ DBG_OFFSCREEN(("Alloc 0x%x -> EMPTY\n", size));
return NULL;
}
/* throw out requests that cannot fit */
- if (size > (pScreenPriv->screen->memory_size - pScreenPriv->screen->off_screen_base))
- {
- DBG_OFFSCREEN (("Alloc 0x%x -> TOBIG\n", size));
- return NULL;
+ for (index = 0; index < pScreenPriv->screen->num_videomem_areas; index++) {
+ KdVideoMemArea *vidmem = pScreenPriv->screen->videomem_areas[index];
+ if ((vidmem->priority <= maxPriority) &&
+ (vidmem->priority >= minPriority)) {
+ if (size <= (vidmem->size - vidmem->available_offset)) {
+ canFit = TRUE;
+ break;
+ }
+ }
}
-
- /* Try to find a free space that'll fit. */
- for (area = pScreenPriv->off_screen_areas; area; area = area->next)
+ if (!canFit)
{
- /* skip allocated areas */
- if (area->state != KdOffscreenAvail)
- continue;
+ DBG_OFFSCREEN(("Alloc 0x%x -> TOOBIG\n", size));
+ return NULL;
+ }
- /* adjust size to match alignment requirement */
- real_size = size;
- tmp = area->offset % align;
- if (tmp)
- real_size += (align - tmp);
-
- /* does it fit? */
- if (real_size <= area->size)
- break;
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ /* Look just in the head, as all the areas of the pool have
+ the same vidmem */
+ area = pScreenPriv->offscreen_pools[index];
+ if ((area->vidmem->priority > maxPriority) ||
+ (area->vidmem->priority < minPriority))
+ continue;
+
+ /* Try to find a free space that'll fit. */
+ for (area = pScreenPriv->offscreen_pools[index]; area;
+ area = area->next) {
+ /* skip allocated areas */
+ if (area->state != KdOffscreenAvail)
+ continue;
+
+ /* adjust size to match alignment requirement */
+ real_size = size;
+ tmp = area->offset % align;
+ if (tmp)
+ real_size += (align - tmp);
+
+ /* does it fit? */
+ if (real_size <= area->size)
+ break;
+ }
+ if (area)
+ break;
}
-
- if (!area)
- {
+
+ if (!area && allowEviction) {
/*
* Kick out existing users to make space.
*
* First, locate a region which can hold the desired object.
*/
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ if ((area->vidmem->priority > maxPriority) ||
+ (area->vidmem->priority < minPriority))
+ continue;
- /* prev points at the first object to boot */
- best = NULL;
- best_score = MAXINT;
- for (begin = pScreenPriv->off_screen_areas; begin != NULL;
- begin = begin->next)
- {
- int avail, score;
- KdOffscreenArea *scan;
+ /* prev points at the first object to boot */
+ best = NULL;
+ best_score = MAXINT;
- if (begin->state == KdOffscreenLocked)
- continue;
+ for (begin = pScreenPriv->offscreen_pools[index]; begin != NULL;
+ begin = begin->next) {
+ int avail, score;
+ KdOffscreenArea *scan;
- /* adjust size to match alignment requirement */
- real_size = size;
- tmp = begin->offset % align;
- if (tmp)
- real_size += (align - tmp);
+ if (begin->state == KdOffscreenLocked)
+ continue;
+
+ /* adjust size to match alignment requirement */
+ real_size = size;
+ tmp = begin->offset % align;
+ if (tmp)
+ real_size += (align - tmp);
- avail = 0;
- score = 0;
- /* now see if we can make room here, and how "costly" it'll be. */
- for (scan = begin; scan != NULL; scan = scan->next)
- {
- if (scan->state == KdOffscreenLocked) {
- /* Can't make room here, start after this locked area. */
- begin = scan->next;
- break;
- }
- /* Score should only be non-zero for KdOffscreenRemovable */
- score += scan->score;
- avail += scan->size;
- if (avail >= real_size)
- break;
- }
- /* Is it the best option we've found so far? */
- if (avail >= real_size && score < best_score) {
- best = begin;
- best_score = score;
- }
- }
- area = best;
- if (!area)
- {
+ avail = 0;
+ score = 0;
+ /* now see if we can make room here,
+ and how "costly" it'll be. */
+ for (scan = begin; scan != NULL; scan = scan->next) {
+ if (scan->state == KdOffscreenLocked) {
+ /* Can't make room here,
+ start after this locked area. */
+ begin = scan->next;
+ break;
+ }
+ /* Score should only be non-zero for KdOffscreenRemovable */
+ score += scan->score;
+ avail += scan->size;
+ if (avail >= real_size)
+ break;
+ }
+ /* Is it the best option we've found so far? */
+ if (avail >= real_size && score < best_score) {
+ best = begin;
+ best_score = score;
+ }
+ }
+ area = best;
+ if (area)
+ break;
+ }
+
+ if (!area) {
DBG_OFFSCREEN (("Alloc 0x%x -> NOSPACE\n", size));
/* Could not allocate memory */
KdOffscreenValidate (pScreen);
@@ -180,16 +216,14 @@
/*
* Now get the system to merge the other needed areas together
*/
- while (area->size < real_size)
- {
- assert (area->next && area->next->state == KdOffscreenRemovable);
+ while (area->size < real_size) {
+ assert (area->next && area->next->state == KdOffscreenRemovable);
(void) KdOffscreenKickOut (pScreen, area->next);
}
}
-
+
/* save extra space in new area */
- if (real_size < area->size)
- {
+ if (real_size < area->size) {
KdOffscreenArea *new_area = xalloc (sizeof (KdOffscreenArea));
if (!new_area)
return NULL;
@@ -198,9 +232,14 @@
new_area->state = KdOffscreenAvail;
new_area->save = 0;
new_area->score = 0;
+ new_area->vidmem = area->vidmem;
+ new_area->pool = area->pool;
new_area->next = area->next;
area->next = new_area;
area->size = real_size;
+ DBG_OFFSCREEN (("New OffscreenArea at %p (offset:0x%08x, size:0x%08x, pool:%d\n", area, area->offset, area->size, area->pool));
+
+
}
/*
* Mark this area as in use
@@ -212,42 +251,80 @@
area->privData = privData;
area->save = save;
area->score = 0;
-
+
area->save_offset = area->offset;
{
int tmp = area->offset % align;
if (tmp)
area->offset += (align - tmp);
}
-
+
KdOffscreenValidate (pScreen);
DBG_OFFSCREEN (("Alloc 0x%x -> 0x%x\n", size, area->offset));
return area;
}
+Bool
+KdHasOffscreen(KdScreenInfo *screen)
+{
+ int index;
+ DBG_OFFSCREEN (("KdHasOffscreen\n"));
+
+ for (index = 0; index < screen->num_videomem_areas; index++) {
+ KdVideoMemArea *vidmem = screen->videomem_areas[index];
+ if (vidmem->available_offset < vidmem->size) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+KdOffscreenArea *
+KdOffscreenAlloc (ScreenPtr pScreen, int size, int align,
+ Bool locked,
+ KdOffscreenSaveProc save,
+ pointer privData)
+{
+ DBG_OFFSCREEN (("KdOffscreenAlloc(size:%d, align:%d, locked:%d)\n",
+ size, align, locked));
+ return KdOffscreenAllocPrio(pScreen, size, align,
+ locked,
+ save,
+ privData,
+ KD_VIDMEM_MINPRIO,
+ KD_VIDMEM_MAXPRIO,
+ TRUE);
+}
+
void
KdOffscreenSwapOut (ScreenPtr pScreen)
{
KdScreenPriv (pScreen);
+ int index;
+
+ DBG_OFFSCREEN (("KdOffscreenSwapOut\n"));
KdOffscreenValidate (pScreen);
- /* loop until a single free area spans the space */
- for (;;)
- {
- KdOffscreenArea *area = pScreenPriv->off_screen_areas;
+
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ /* loop until a single free area spans the space */
+ for (;;)
+ {
+ KdOffscreenArea *area = pScreenPriv->offscreen_pools[index];
- if (!area)
- break;
- if (area->state == KdOffscreenAvail)
- {
- area = area->next;
- if (!area)
- break;
- }
- assert (area->state != KdOffscreenAvail);
- (void) KdOffscreenKickOut (pScreen, area);
- KdOffscreenValidate (pScreen);
+ if (!area)
+ break;
+ if (area->state == KdOffscreenAvail)
+ {
+ area = area->next;
+ if (!area)
+ break;
+ }
+ assert (area->state != KdOffscreenAvail);
+ (void) KdOffscreenKickOut (pScreen, area);
+ KdOffscreenValidate (pScreen);
+ }
}
KdOffscreenValidate (pScreen);
KdOffscreenFini (pScreen);
@@ -256,6 +333,8 @@
void
KdOffscreenSwapIn (ScreenPtr pScreen)
{
+ KdScreenPriv (pScreen);
+ DBG_OFFSCREEN (("KdOffscreenSwapIn\n"));
KdOffscreenInit (pScreen);
}
@@ -264,7 +343,7 @@
KdOffscreenMerge (KdOffscreenArea *area)
{
KdOffscreenArea *next = area->next;
-
+ //DBG_OFFSCREEN (("KdOffscreenMerge %p\n", area));
/* account for space */
area->size += next->size;
/* frob pointer */
@@ -278,8 +357,9 @@
KdScreenPriv(pScreen);
KdOffscreenArea *next = area->next;
KdOffscreenArea *prev;
-
- DBG_OFFSCREEN (("Free 0x%x -> 0x%x\n", area->size, area->offset));
+
+ DBG_OFFSCREEN (("KdOffscreenFree 0x%x -> 0x%x\n",
+ area->size, area->offset));
KdOffscreenValidate (pScreen);
area->state = KdOffscreenAvail;
@@ -290,10 +370,11 @@
/*
* Find previous area
*/
- if (area == pScreenPriv->off_screen_areas)
+ if (area == pScreenPriv->offscreen_pools[area->pool])
prev = 0;
else
- for (prev = pScreenPriv->off_screen_areas; prev; prev = prev->next)
+ for (prev = pScreenPriv->offscreen_pools[area->pool];
+ prev; prev = prev->next)
if (prev->next == area)
break;
@@ -317,21 +398,30 @@
{
KaaPixmapPriv (pPixmap);
KdScreenPriv (pPixmap->drawable.pScreen);
+ int index;
static int iter = 0;
+
if (!pKaaPixmap->area)
return;
+ /*
+ DBG_OFFSCREEN(("KdOffscreenMarkUsed(offset:0x%08x, pool:%d)\n",
+ pKaaPixmap->area->offset,
+ pKaaPixmap->area->pool));
+ */
/* The numbers here are arbitrary. We may want to tune these. */
pKaaPixmap->area->score += 100;
if (++iter == 10) {
KdOffscreenArea *area;
- for (area = pScreenPriv->off_screen_areas; area != NULL;
- area = area->next)
- {
- if (area->state == KdOffscreenRemovable)
- area->score = (area->score * 7) / 8;
- }
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ for (area = pScreenPriv->offscreen_pools[index]; area != NULL;
+ area = area->next)
+ {
+ if (area->state == KdOffscreenRemovable)
+ area->score = (area->score * 7) / 8;
+ }
+ }
}
}
@@ -340,23 +430,41 @@
{
KdScreenPriv (pScreen);
KdOffscreenArea *area;
+ KdVideoMemArea *vidmem;
+ int index, num_offscreen;
- /* Allocate a big free area */
- area = xalloc (sizeof (KdOffscreenArea));
+ DBG_OFFSCREEN (("KdOffscreenInit\n"));
+ num_offscreen = 0;
+ pScreenPriv->num_offscreen_pools = 0;
+ pScreenPriv->offscreen_pools = NULL;
- if (!area)
- return FALSE;
+ for (index = 0; index < pScreenPriv->screen->num_videomem_areas; index++) {
+ vidmem = pScreenPriv->screen->videomem_areas[index];
+ DBG_OFFSCREEN (("Searching vidmemarea base:0x%p, size:0x%08x, available_offset:0x%08x\n", vidmem->base, vidmem->size, vidmem->available_offset));
+ if (vidmem->available_offset < vidmem->size) {
+ pScreenPriv->offscreen_pools = xrealloc(pScreenPriv->offscreen_pools,
+ sizeof(KdOffscreenArea*) * (pScreenPriv->num_offscreen_pools + 1));
+ if (!pScreenPriv->offscreen_pools) {
+ return FALSE;
+ }
+ pScreenPriv->offscreen_pools[pScreenPriv->num_offscreen_pools] =
+ area = xcalloc(sizeof(KdOffscreenArea), 1);
+ if (!area)
+ return FALSE;
+
+ area->state = KdOffscreenAvail;
+ area->vidmem = vidmem;
+ area->offset = vidmem->available_offset;
+ area->size = vidmem->size - vidmem->available_offset;
+ area->save = 0;
+ area->pool = pScreenPriv->num_offscreen_pools;
+ area->next = NULL;
+ area->score = 0;
+ pScreenPriv->num_offscreen_pools++;
+ DBG_OFFSCREEN (("New OffscreenArea at %p (offset:0x%08x, size:0x%08x, pool:%d)\n", area, area->offset, area->size, area->pool));
+ }
+ }
- area->state = KdOffscreenAvail;
- area->offset = pScreenPriv->screen->off_screen_base;
- area->size = pScreenPriv->screen->memory_size - area->offset;
- area->save = 0;
- area->next = NULL;
- area->score = 0;
-
- /* Add it to the free areas */
- pScreenPriv->off_screen_areas = area;
-
KdOffscreenValidate (pScreen);
return TRUE;
@@ -367,11 +475,17 @@
{
KdScreenPriv (pScreen);
KdOffscreenArea *area;
-
- /* just free all of the area records */
- while ((area = pScreenPriv->off_screen_areas))
- {
- pScreenPriv->off_screen_areas = area->next;
- xfree (area);
+ int index;
+
+ DBG_OFFSCREEN (("KdOffscreenFini\n"));
+ for (index = 0; index < pScreenPriv->num_offscreen_pools; index++) {
+ /* just free all of the area records */
+ while ((area = pScreenPriv->offscreen_pools[index])) {
+ pScreenPriv->offscreen_pools[index] = area->next;
+ xfree (area);
+ }
}
+ xfree(pScreenPriv->offscreen_pools);
+ pScreenPriv->offscreen_pools = NULL;
+ pScreenPriv->num_offscreen_pools = 0;
}
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c~kdrive-vidmemarea
+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c
@@ -330,6 +330,7 @@
FbdevScrPriv *scrpriv = screen->driver;
KdMouseMatrix m;
FbdevPriv *priv = screen->card->driver;
+ KdVideoMemArea *vidmem;
if (scrpriv->randr != RR_Rotate_0)
scrpriv->shadow = TRUE;
@@ -342,15 +343,20 @@
screen->width = priv->var.xres;
screen->height = priv->var.yres;
- screen->memory_base = (CARD8 *) (priv->fb);
- screen->memory_size = priv->fix.smem_len;
+ screen->videomem_areas = xcalloc(sizeof(KdVideoMemArea*), 1);
+ screen->videomem_areas[0] = vidmem = xcalloc(sizeof(KdVideoMemArea), 1);
+ screen->num_videomem_areas = 1;
+
+ vidmem->priority = KD_VIDMEM_MINPRIO;
+ vidmem->base = (CARD8 *) (priv->fb);
+ vidmem->size = priv->fix.smem_len;
if (scrpriv->shadow)
{
if (!KdShadowFbAlloc (screen, 0,
scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
return FALSE;
- screen->off_screen_base = screen->memory_size;
+ vidmem->available_offset = vidmem->size;
}
else
{
@@ -358,7 +364,7 @@
screen->fb[0].pixelStride = (priv->fix.line_length * 8 /
priv->var.bits_per_pixel);
screen->fb[0].frameBuffer = (CARD8 *) (priv->fb);
- screen->off_screen_base = screen->fb[0].byteStride * screen->height;
+ vidmem->available_offset = screen->fb[0].byteStride * screen->height;
}
return TRUE;
@@ -1,21 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- xserver/hw/kdrive/Makefile.am~onlyfb
+++ xserver/hw/kdrive/Makefile.am
@@ -17,12 +17,4 @@
SUBDIRS = \
src \
linux \
- $(XSDL_SUBDIRS) \
- $(FBDEV_SUBDIRS) \
- $(VESA_SUBDIRS) \
- $(XEPHYR_SUBDIRS) \
- ati \
- fake \
- ephyr \
- i810 \
- epson
+ $(FBDEV_SUBDIRS)
@@ -1,54 +0,0 @@
--- git/Makefile.am.orig 2006-06-09 16:01:51.000000000 +0200
+++ git/Makefile.am 2006-06-09 16:02:59.000000000 +0200
@@ -35,6 +35,10 @@
XINPUT_DIR=Xi
endif
+if XKB
+XKB_DIR=xkb
+endif
+
if DBE
DBE_DIR=dbe
endif
@@ -51,7 +55,7 @@
randr \
render \
$(XINPUT_DIR) \
- xkb \
+ $(XKB_DIR) \
$(DBE_DIR) \
$(MFB_DIR) \
$(AFB_DIR) \
--- git/configure.ac.orig 2006-05-22 22:40:00.000000000 +0200
+++ git/configure.ac 2006-06-10 15:10:14.000000000 +0200
@@ -418,6 +418,7 @@
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMS=$enableval], [DPMSExtension=yes])
AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=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])
@@ -739,12 +740,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'.]))
@@ -1,15 +0,0 @@
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;
File diff suppressed because it is too large Load Diff
@@ -1,351 +0,0 @@
--- xorg-server-X11R7.1-1.1.0/mi/miinitext.c.orig 2006-06-22 14:11:46.000000000 +0200
+++ xorg-server-X11R7.1-1.1.0/mi/miinitext.c 2006-06-22 15:26:17.000000000 +0200
@@ -385,6 +385,9 @@
#ifdef DMXEXT
extern void DMXExtensionInit(INITARGS);
#endif
+#ifdef XCALIBRATE
+extern void XCalibrateExtensionInit(INITARGS);
+#endif
#ifdef XEVIE
extern void XevieExtensionInit(INITARGS);
#endif
@@ -679,6 +682,9 @@
#ifdef DAMAGE
if (!noDamageExtension) DamageExtensionInit();
#endif
+#ifdef XCALIBRATE
+ XCalibrateExtensionInit ();
+#endif
}
void
--- xorg-server-X11R7.1-1.1.0/configure.ac.orig 2006-06-15 17:03:14.000000000 +0200
+++ xorg-server-X11R7.1-1.1.0/configure.ac 2006-06-24 08:21:25.000000000 +0200
@@ -407,6 +407,7 @@
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
+AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
AC_ARG_ENABLE(lbx, AS_HELP_STRING([--disable-lbx], [Build LBX extension (default: no)]), [LBX=$enableval], [LBX=no])
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
@@ -641,6 +642,12 @@
AC_DEFINE(XCSECURITY, 1, [Build Security extension])
fi
+AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
+if test "x$XCALIBRATE" = xyes; then
+ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
+fi
+
AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes])
if test "x$XEVIE" = xyes; then
AC_DEFINE(XEVIE, 1, [Build XEvIE extension])
@@ -1466,7 +1473,7 @@
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
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"
+ KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
--- xorg-server-X11R7.1-1.1.0/include/kdrive-config.h.in.orig 2006-06-22 14:22:07.000000000 +0200
+++ xorg-server-X11R7.1-1.1.0/include/kdrive-config.h.in 2006-06-22 14:33:29.000000000 +0200
@@ -22,4 +22,7 @@
/* Support tslib touchscreen abstraction library */
#undef TSLIB
+/* Enable XCalibrate extension */
+#undef XCALIBRATE
+
#endif /* _KDRIVE_CONFIG_H_ */
--- xorg-server-X11R7.1-1.1.0/Xext/Makefile.am.orig 2006-06-15 17:06:43.000000000 +0200
+++ xorg-server-X11R7.1-1.1.0/Xext/Makefile.am 2006-06-15 18:12:40.000000000 +0200
@@ -78,6 +78,11 @@
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
endif
+XCALIBRATE_SRCS = xcalibrate.c
+if XCALIBRATE
+BUILTIN_SRCS += $(XCALIBRATE_SRCS)
+endif
+
# X EVent Interception Extension: allows accessibility helpers & composite
# managers to intercept events from input devices and transform as needed
# before the clients see them.
@@ -155,6 +160,7 @@
$(SCREENSAVER_SRCS) \
$(XCSECURITY_SRCS) \
$(XINERAMA_SRCS) \
+ $(XCALIBRATE_SRCS) \
$(XEVIE_SRCS) \
$(XPRINT_SRCS) \
$(APPGROUP_SRCS) \
--- xorg-server-X11R7.1-1.1.0/Xext/xcalibrate.c.orig 2006-06-15 17:05:19.000000000 +0200
+++ xorg-server-X11R7.1-1.1.0/Xext/xcalibrate.c 2006-06-22 15:15:09.000000000 +0200
@@ -0,0 +1,262 @@
+/*
+ * $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $
+ *
+ * Copyright © 2003 Philip Blundell
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Philip Blundell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Philip Blundell makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_KDRIVE_CONFIG_H
+#include <kdrive-config.h>
+#endif
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include "swaprep.h"
+
+#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;
+int XCalibrateErrorBase;
+
+static ClientPtr xcalibrate_client;
+
+static void
+xcalibrate_event_hook (int x, int y, int pressure, void *closure)
+{
+ ClientPtr pClient = (ClientPtr) closure;
+ xXCalibrateRawTouchscreenEvent ev;
+
+ ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen;
+ ev.sequenceNumber = pClient->sequence;
+ ev.x = x;
+ ev.y = y;
+ ev.pressure = pressure;
+
+ if (!pClient->clientGone)
+ WriteEventsToClient (pClient, 1, (xEvent *) &ev);
+}
+
+static int
+ProcXCalibrateQueryVersion (ClientPtr client)
+{
+ REQUEST(xXCalibrateQueryVersionReq);
+ xXCalibrateQueryVersionReply rep;
+ CARD16 client_major, client_minor; /* not used */
+
+ REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
+
+ client_major = stuff->majorVersion;
+ client_minor = stuff->minorVersion;
+
+ fprintf(stderr, "%s(): called\n", __func__);
+
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = XCALIBRATE_MAJOR_VERSION;
+ rep.minorVersion = XCALIBRATE_MINOR_VERSION;
+ if (client->swapped) {
+ int n;
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swaps(&rep.majorVersion, n);
+ swaps(&rep.minorVersion, n);
+ }
+ WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep);
+ return (client->noClientException);
+}
+
+static int
+SProcXCalibrateQueryVersion (ClientPtr client)
+{
+ REQUEST(xXCalibrateQueryVersionReq);
+ int n;
+
+ REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
+ swaps(&stuff->majorVersion,n);
+ swaps(&stuff->minorVersion,n);
+ return ProcXCalibrateQueryVersion(client);
+}
+
+static int
+ProcXCalibrateSetRawMode (ClientPtr client)
+{
+ REQUEST(xXCalibrateRawModeReq);
+ xXCalibrateRawModeReply rep;
+
+ REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
+
+ memset (&rep, 0, sizeof (rep));
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+
+ if (stuff->on)
+ {
+ if (xcalibrate_client == NULL)
+ {
+ /* Start calibrating. */
+ xcalibrate_client = client;
+ tslib_raw_event_hook = xcalibrate_event_hook;
+ tslib_raw_event_closure = client;
+ rep.status = GrabSuccess;
+ }
+ else
+ {
+ rep.status = AlreadyGrabbed;
+ }
+ }
+ else
+ {
+ if (xcalibrate_client == client)
+ {
+ /* Stop calibrating. */
+ xcalibrate_client = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
+ rep.status = GrabSuccess;
+
+ /* Cycle input off and on to reload configuration. */
+ KdDisableInput ();
+ KdEnableInput ();
+ }
+ else
+ {
+ rep.status = AlreadyGrabbed;
+ }
+ }
+
+ if (client->swapped)
+ {
+ int n;
+
+ swaps (&rep.sequenceNumber, n);
+ swaps (&rep.status, n);
+ }
+ WriteToClient(client, sizeof (rep), (char *) &rep);
+ return (client->noClientException);
+}
+
+
+static int
+SProcXCalibrateSetRawMode (ClientPtr client)
+{
+ REQUEST(xXCalibrateRawModeReq);
+ int n;
+
+ REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
+
+ swaps(&stuff->on, n);
+
+ return ProcXCalibrateSetRawMode(client);
+}
+
+static void
+XCalibrateResetProc (ExtensionEntry *extEntry)
+{
+}
+
+static int
+ProcXCalibrateDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+ switch (stuff->data) {
+ case X_XCalibrateQueryVersion:
+ return ProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return ProcXCalibrateSetRawMode(client);
+ default: break;
+ }
+
+ return BadRequest;
+}
+
+static int
+SProcXCalibrateDispatch (ClientPtr client)
+{
+ REQUEST(xReq);
+ int n;
+
+ swaps(&stuff->length,n);
+
+ switch (stuff->data) {
+ case X_XCalibrateQueryVersion:
+ return SProcXCalibrateQueryVersion(client);
+ case X_XCalibrateRawMode:
+ return SProcXCalibrateSetRawMode(client);
+
+ default: break;
+ }
+
+ return BadRequest;
+}
+
+static void
+XCalibrateClientCallback (CallbackListPtr *list,
+ pointer closure,
+ pointer data)
+{
+ NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
+ ClientPtr pClient = clientinfo->client;
+
+ if (clientinfo->setup == NULL
+ && xcalibrate_client != NULL
+ && xcalibrate_client == pClient)
+ {
+ /* Stop calibrating. */
+ xcalibrate_client = NULL;
+ tslib_raw_event_hook = NULL;
+ tslib_raw_event_closure = NULL;
+ }
+}
+
+void
+XCalibrateExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+
+ if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0))
+ return;
+
+ extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors,
+ ProcXCalibrateDispatch, SProcXCalibrateDispatch,
+ XCalibrateResetProc, StandardMinorOpcode);
+
+ if (!extEntry)
+ return;
+
+ XCalibrateReqCode = (unsigned char)extEntry->base;
+ XCalibrateEventBase = extEntry->eventBase;
+ XCalibrateErrorBase = extEntry->errorBase;
+
+ xcalibrate_client = 0;
+}
@@ -1,82 +0,0 @@
---
hw/kdrive/fbdev/fbdev.c | 17 ++++++++++++-----
hw/kdrive/fbdev/fbdev.h | 1 +
hw/kdrive/fbdev/fbinit.c | 20 ++++++++++++++++----
3 files changed, 29 insertions(+), 9 deletions(-)
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c
+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.c
@@ -33,16 +33,23 @@
extern int KdTsPhyScreen;
+char *fbdevDevicePath = NULL;
Bool
fbdevInitialize (KdCardInfo *card, FbdevPriv *priv)
{
int k;
unsigned long off;
- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \
- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) {
- perror("Error opening /dev/fb0");
- return FALSE;
- }
+
+ if (fbdevDevicePath == NULL)
+ fbdevDevicePath = "/dev/fb0";
+
+ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0)
+ {
+ ErrorF("Error opening framebuffer %s: %s\n",
+ fbdevDevicePath, strerror(errno));
+ return FALSE;
+ }
+
/* quiet valgrind */
memset (&priv->fix, '\0', sizeof (priv->fix));
if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) {
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.h
+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.h
@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv {
} FbdevScrPriv;
extern KdCardFuncs fbdevFuncs;
+extern char* fbdevDevicePath;
Bool
fbdevInitialize (KdCardInfo *card, FbdevPriv *priv);
--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbinit.c
+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbinit.c
@@ -59,16 +59,28 @@ InitInput (int argc, char **argv)
void
ddxUseMsg (void)
{
- KdUseMsg();
+ KdUseMsg();
+ ErrorF("\nXfbdev Device Usage:\n");
+ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
+ ErrorF("\n");
}
int
ddxProcessArgument (int argc, char **argv, int i)
{
- return KdProcessArgument (argc, argv, i);
-}
-
+ if (!strcmp (argv[i], "-fb"))
+ {
+ if (i+1 < argc)
+ {
+ fbdevDevicePath = argv[i+1];
+ return 2;
+ }
+ UseMsg();
+ exit(1);
+ }
+ return KdProcessArgument (argc, argv, i);
+}
KdCardFuncs fbdevFuncs = {
fbdevCardInit, /* cardinit */
@@ -1,44 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- xserver/hw/kdrive/fbdev/fbdev.c~xserver-kdrive-poodle.patch
+++ xserver/hw/kdrive/fbdev/fbdev.c
@@ -190,6 +190,7 @@
var.nonstd = 0;
var.grayscale = 0;
+ /* commented out for poodle
k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
if (k < 0)
@@ -198,10 +199,11 @@
return FALSE;
}
- /* Re-get the "fixed" parameters since they might have changed */
+ // 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);
@@ -659,13 +661,14 @@
priv->var.activate = FB_ACTIVATE_NOW|FB_CHANGE_CMAP_VBL;
/* display it on the LCD */
+ /* commented out for poodle
k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &priv->var);
if (k < 0)
{
perror ("FBIOPUT_VSCREENINFO");
return FALSE;
}
-
+ */
if (priv->fix.visual == FB_VISUAL_DIRECTCOLOR)
{
struct fb_cmap cmap;
@@ -1,48 +0,0 @@
PV = "1.1.0+git${SRCDATE}"
DEFAULT_PREFERENCE = "-2"
LICENSE = "MIT"
DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto"
PROVIDES = "virtual/xserver"
RPROVIDES = "virtual/xserver"
PACKAGES = "xserver-kdrive-fbdev xserver-kdrive-fake xserver-kdrive-xephyr ${PN}-doc ${PN}-dev ${PN}-locale"
SECTION = "x11/base"
DESCRIPTION = "X server from freedesktop.org"
DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices"
DESCRIPTION_xserver-kdrive-fake = "Fake X server"
DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
FILES_xserver-kdrive-fake = "${bindir}/Xfake"
FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
SRC_URI = "git://anongit.freedesktop.org/xorg/xserver;protocol=git \
file://kmode.patch;patch=1 \
file://disable-apm.patch;patch=1 \
file://no-serial-probing.patch;patch=1 \
file://kdrive-evdev.patch;patch=1 \
file://kdrive-use-evdev.patch;patch=1 \
file://fbdev-not-fix.patch;patch=1 \
file://enable-builtin-fonts.patch;patch=1 \
file://optional-xkb.patch;patch=1 \
# file://disable-xf86-dga-xorgcfg.patch;patch=1 \
file://enable-tslib.patch;patch=1"
SRC_URI_append_mnci = " file://onlyfb.patch;patch=1"
SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1"
PACKAGE_ARCH_poodle = "poodle"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
EXTRA_OECONF = "--enable-composite --enable-kdrive \
--disable-dga --disable-dri --disable-xinerama \
--disable-xf86misc --disable-xf86vidmode \
--disable-xorg --disable-xorgcfg \
--disable-xkb --disable-xnest --disable-xvfb \
--disable-xevie --disable-xprint --disable-xtrap \
--disable-dmx \
--with-default-font-path=built-ins \
ac_cv_file__usr_share_X11_sgml_defs_ent=no"