summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver')
-rw-r--r--meta/recipes-graphics/xorg-xserver/files/macro_tweak.patch18
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-epson.patch11
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-tslib.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-xcalibrate.patch110
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev_use_current.patch41
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fix-newer-xorg-headers.patch18
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch307
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch515
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch54
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/optional-xkb.patch58
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/report-correct-randr12.patch29
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/scheduler.patch151
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch122
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch19
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch20
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch148
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch83
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch61
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch18
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch308
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch515
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch54
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch25
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch58
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive.inc107
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-apm.patch20
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-xf86-dga-xorgcfg.patch39
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive/extra-kmodes.patch83
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch61
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive/no-serial-probing.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-kdrive_1.7.99.2.bb28
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-common.inc33
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/igep0020/xorg.conf47
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/netbook/xorg.conf26
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf68
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf68
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf26
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb17
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc37
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch358
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch20
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch21
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch22
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch50
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch28
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch12
-rwxr-xr-xmeta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch12
-rwxr-xr-xmeta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch23
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch156
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch179
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch38
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch105
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.8.99.904.bb20
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_git.bb31
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite.inc34
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/crosscompile.patch19
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/drmfix.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/fix_open_max_preprocessor_error.patch13
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/libdri-xinerama-symbol.patch50
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/nodolt.patch12
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/revert_make_sys_c_use_unaligned_access_functions.patch256
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-lite_1.7.99.2.bb12
69 files changed, 5000 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/files/macro_tweak.patch b/meta/recipes-graphics/xorg-xserver/files/macro_tweak.patch
new file mode 100644
index 0000000000..6998adffe9
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/files/macro_tweak.patch
@@ -0,0 +1,18 @@
1Index: xorg-server-1.5.0/xorg-server.m4
2===================================================================
3--- xorg-server-1.5.0.orig/xorg-server.m4 2007-05-29 20:36:51.000000000 +0100
4+++ xorg-server-1.5.0/xorg-server.m4 2008-11-04 23:56:55.000000000 +0000
5@@ -28,9 +28,12 @@
6 # Checks for the $1 define in xorg-server.h (from the sdk). If it
7 # is defined, then add $1 to $REQUIRED_MODULES.
8
9+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
10+
11 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
12+ PKG_PROG_PKG_CONFIG
13 SAVE_CFLAGS="$CFLAGS"
14- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
15+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
16 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
17 #include "xorg-server.h"
18 #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch
new file mode 100644
index 0000000000..13a6c2c954
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-builtin-fonts.patch
@@ -0,0 +1,12 @@
1--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
2+++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
3@@ -52,8 +52,8 @@
4 /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
5
6 #define NEED_REPLIES
7 #ifdef HAVE_DIX_CONFIG_H
8-#include <dix-config.h>
9+#include <kdrive-config.h>
10 #endif
11
12 #include <X11/X.h>
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-epson.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-epson.patch
new file mode 100644
index 0000000000..8ec3a37c78
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-epson.patch
@@ -0,0 +1,11 @@
1Index: xorg-server-1.2.0/hw/kdrive/Makefile.am
2===================================================================
3--- xorg-server-1.2.0.orig/hw/kdrive/Makefile.am 2007-03-28 17:11:38.000000000 +0200
4+++ xorg-server-1.2.0/hw/kdrive/Makefile.am 2007-03-28 17:12:28.000000000 +0200
5@@ -1,5 +1,5 @@
6 if KDRIVEFBDEV
7-FBDEV_SUBDIRS = fbdev
8+FBDEV_SUBDIRS = fbdev epson
9 endif
10
11 if KDRIVEIMAGEON
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-tslib.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-tslib.patch
new file mode 100644
index 0000000000..9a59530ed3
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-tslib.patch
@@ -0,0 +1,12 @@
1Index: xorg-server-1.2.0/configure.ac
2===================================================================
3--- xorg-server-1.2.0.orig/configure.ac 2007-03-29 13:28:10.000000000 +0200
4+++ xorg-server-1.2.0/configure.ac 2007-03-29 13:28:35.000000000 +0200
5@@ -1517,6 +1517,7 @@
6 AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
7 fi
8 AC_DEFINE(TSLIB, 1, [Have tslib support])
9+ AC_DEFINE(TOUCHSCREEN, 1, [Have touchscreen support])
10 fi
11
12 # damage shadow extension glx (NOTYET) fb mi
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-xcalibrate.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-xcalibrate.patch
new file mode 100644
index 0000000000..5a971002cd
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/enable-xcalibrate.patch
@@ -0,0 +1,110 @@
1---
2 Xext/Makefile.am | 6 ++++++
3 configure.ac | 11 +++++++++--
4 include/kdrive-config.h.in | 3 +++
5 mi/miinitext.c | 6 ++++++
6 4 files changed, 24 insertions(+), 2 deletions(-)
7
8Index: xorg-server-1.3.0.0/mi/miinitext.c
9===================================================================
10--- xorg-server-1.3.0.0.orig/mi/miinitext.c 2006-11-16 18:01:26.000000000 +0000
11+++ xorg-server-1.3.0.0/mi/miinitext.c 2008-01-11 13:45:57.000000000 +0000
12@@ -372,6 +372,9 @@ extern void ResExtensionInit(INITARGS);
13 #ifdef DMXEXT
14 extern void DMXExtensionInit(INITARGS);
15 #endif
16+#ifdef XCALIBRATE
17+extern void XCalibrateExtensionInit(INITARGS);
18+#endif
19 #ifdef XEVIE
20 extern void XevieExtensionInit(INITARGS);
21 #endif
22@@ -663,6 +666,9 @@ InitExtensions(argc, argv)
23 #ifdef DAMAGE
24 if (!noDamageExtension) DamageExtensionInit();
25 #endif
26+#ifdef XCALIBRATE
27+ XCalibrateExtensionInit ();
28+#endif
29 }
30
31 void
32Index: xorg-server-1.3.0.0/configure.ac
33===================================================================
34--- xorg-server-1.3.0.0.orig/configure.ac 2008-01-11 13:45:57.000000000 +0000
35+++ xorg-server-1.3.0.0/configure.ac 2008-01-11 13:45:58.000000000 +0000
36@@ -421,6 +421,7 @@ AC_ARG_ENABLE(xf86vidmode, AS_HELP_ST
37 AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
38 AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
39 AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE])
40+AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
41 AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY])
42 AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
43 AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
44@@ -653,6 +654,12 @@ if test "x$XCSECURITY" = xyes; then
45 AC_DEFINE(XCSECURITY, 1, [Build Security extension])
46 fi
47
48+AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
49+if test "x$XCALIBRATE" = xyes; then
50+ AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
51+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
52+fi
53+
54 AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes])
55 if test "x$XEVIE" = xyes; then
56 AC_DEFINE(XEVIE, 1, [Build XEvIE extension])
57@@ -1519,7 +1526,7 @@ if test "$KDRIVE" = yes; then
58
59 # tslib...
60 if test "x$TSLIB" = xyes; then
61- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
62+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
63 if test "x$HAVE_TSLIB" = xno; then
64 AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/])
65 fi
66@@ -1547,7 +1554,7 @@ if test "$KDRIVE" = yes; then
67 ;;
68 esac
69 KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
70- KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB $TSLIB_LIBS"
71+ KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB $TSLIB_LIBS"
72
73 # check if we can build Xephyr
74 PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
75Index: xorg-server-1.3.0.0/include/kdrive-config.h.in
76===================================================================
77--- xorg-server-1.3.0.0.orig/include/kdrive-config.h.in 2006-11-16 18:01:26.000000000 +0000
78+++ xorg-server-1.3.0.0/include/kdrive-config.h.in 2008-01-11 13:45:57.000000000 +0000
79@@ -25,4 +25,7 @@
80 /* Verbose debugging output hilarity */
81 #undef DEBUG
82
83+/* Enable XCalibrate extension */
84+#undef XCALIBRATE
85+
86 #endif /* _KDRIVE_CONFIG_H_ */
87Index: xorg-server-1.3.0.0/Xext/Makefile.am
88===================================================================
89--- xorg-server-1.3.0.0.orig/Xext/Makefile.am 2006-10-25 01:25:19.000000000 +0100
90+++ xorg-server-1.3.0.0/Xext/Makefile.am 2008-01-11 13:45:57.000000000 +0000
91@@ -91,6 +91,11 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS)
92 # XCalibrare needs tslib
93 endif
94
95+XCALIBRATE_SRCS = xcalibrate.c
96+if XCALIBRATE
97+BUILTIN_SRCS += $(XCALIBRATE_SRCS)
98+endif
99+
100 # X EVent Interception Extension: allows accessibility helpers & composite
101 # managers to intercept events from input devices and transform as needed
102 # before the clients see them.
103@@ -169,6 +174,7 @@ EXTRA_DIST = \
104 $(XCSECURITY_SRCS) \
105 $(XCALIBRATE_SRCS) \
106 $(XINERAMA_SRCS) \
107+ $(XCALIBRATE_SRCS) \
108 $(XEVIE_SRCS) \
109 $(XPRINT_SRCS) \
110 $(APPGROUP_SRCS) \
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev_use_current.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev_use_current.patch
new file mode 100644
index 0000000000..dc957cc825
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fbdev_use_current.patch
@@ -0,0 +1,41 @@
1---
2 hw/kdrive/fbdev/fbdev.c | 24 ++++++++++++++++--------
3 1 file changed, 16 insertions(+), 8 deletions(-)
4
5Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
6===================================================================
7--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-01-11 14:40:16.000000000 +0000
8+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-01-11 14:40:59.000000000 +0000
9@@ -182,16 +182,24 @@ fbdevScreenInitialize (KdScreenInfo *scr
10 screen->rate = 103; /* FIXME: should get proper value from fb driver */
11 }
12 if (!screen->fb[0].depth)
13- screen->fb[0].depth = 16;
14+ {
15+ if (k >= 0)
16+ screen->fb[0].depth = var.bits_per_pixel;
17+ else
18+ screen->fb[0].depth = 16;
19+ }
20
21- t = KdFindMode (screen, fbdevModeSupported);
22- screen->rate = t->rate;
23- screen->width = t->horizontal;
24- screen->height = t->vertical;
25+ if ((screen->width != var.xres) || (screen->height != var.yres))
26+ {
27+ t = KdFindMode (screen, fbdevModeSupported);
28+ screen->rate = t->rate;
29+ screen->width = t->horizontal;
30+ screen->height = t->vertical;
31
32- /* Now try setting the mode */
33- if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres))
34- fbdevConvertMonitorTiming (t, &var);
35+ /* Now try setting the mode */
36+ if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres))
37+ fbdevConvertMonitorTiming (t, &var);
38+ }
39
40 var.activate = FB_ACTIVATE_NOW;
41 var.bits_per_pixel = screen->fb[0].depth;
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fix-newer-xorg-headers.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fix-newer-xorg-headers.patch
new file mode 100644
index 0000000000..eb98fb82c7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/fix-newer-xorg-headers.patch
@@ -0,0 +1,18 @@
1---
2 render/glyphstr.h | 1 +
3 1 file changed, 1 insertion(+)
4
5--- xorg-server-1.3.0.0.orig/render/glyphstr.h
6+++ xorg-server-1.3.0.0/render/glyphstr.h
7@@ -23,10 +23,11 @@
8 */
9
10 #ifndef _GLYPHSTR_H_
11 #define _GLYPHSTR_H_
12
13+#include <X11/X.h>
14 #include <X11/extensions/renderproto.h>
15 #include "picture.h"
16 #include "screenint.h"
17 #include "regionstr.h"
18 #include "miscstruct.h"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch
new file mode 100644
index 0000000000..c160cd41dc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/hide-cursor-and-ppm-root.patch
@@ -0,0 +1,307 @@
1diff -u -r xorg-server-X11R7.1-1.1.0.orig/dix/window.c xorg-server-X11R7.1-1.1.0/dix/window.c
2--- xorg-server-X11R7.1-1.1.0.orig/dix/window.c 2007-01-08 14:30:38.000000000 +0000
3+++ xorg-server-X11R7.1-1.1.0/dix/window.c 2007-01-16 17:16:19.000000000 +0000
4@@ -185,6 +185,8 @@
5 _X_EXPORT int numSaveUndersViewable = 0;
6 _X_EXPORT int deltaSaveUndersViewable = 0;
7
8+char* RootPPM = NULL;
9+
10 #ifdef DEBUG
11 /******
12 * PrintWindowTree
13@@ -311,6 +313,115 @@
14 #endif
15 }
16
17+static int
18+get_int(FILE *fp)
19+{
20+ int c = 0;
21+
22+ while ((c = getc(fp)) != EOF)
23+ {
24+ if (isspace(c))
25+ continue;
26+
27+ if (c == '#')
28+ while (c = getc(fp))
29+ if (c == EOF)
30+ return 0;
31+ else if (c == '\n')
32+ break;
33+
34+ if (isdigit(c))
35+ {
36+ int val = c - '0';
37+ while ((c = getc(fp)) && isdigit(c))
38+ val = (val * 10) + (c - '0');
39+ return val;
40+ }
41+ }
42+
43+ return 0;
44+}
45+
46+static unsigned char*
47+ppm_load (const char* path, int depth, int *width, int *height)
48+{
49+ FILE *fp;
50+ int max, n = 0, w, h, i, j, bytes_per_line;
51+ unsigned char *data, *res, h1, h2;
52+
53+ if (depth < 16 || depth > 32)
54+ return NULL;
55+
56+ if (depth > 16)
57+ depth = 32;
58+
59+ fp = fopen (path, "r");
60+ if (fp == NULL)
61+ return FALSE;
62+
63+ h1 = getc(fp);
64+ h2 = getc(fp);
65+
66+ /* magic is 'P6' for raw ppm */
67+ if (h1 != 'P' && h2 != '6')
68+ goto fail;
69+
70+ w = get_int(fp);
71+ h = get_int(fp);
72+
73+ if (w == 0 || h == 0)
74+ goto fail;
75+
76+ max = get_int(fp);
77+
78+ if (max != 255)
79+ goto fail;
80+
81+ bytes_per_line = ((w * depth + 31) >> 5) << 2;
82+
83+ res = data = malloc(bytes_per_line * h);
84+
85+ for (i=0; i<h; i++)
86+ {
87+ for (j=0; j<w; j++)
88+ {
89+ unsigned char buf[3];
90+ fread(buf, 1, 3, fp);
91+
92+ switch (depth)
93+ {
94+ case 24:
95+ case 32:
96+ *data = buf[2];
97+ *(data+1) = buf[1];
98+ *(data+2) = buf[0];
99+ data += 4;
100+ break;
101+ case 16:
102+ default:
103+ *(unsigned short*)data
104+ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3);
105+ data += 2;
106+ break;
107+ }
108+ }
109+ data += (bytes_per_line - (w*(depth>>3)));
110+ }
111+
112+ data = res;
113+
114+ *width = w;
115+ *height = h;
116+
117+ fclose(fp);
118+
119+ return res;
120+
121+ fail:
122+ fclose(fp);
123+ return NULL;
124+}
125+
126 static void
127 MakeRootTile(WindowPtr pWin)
128 {
129@@ -321,6 +432,36 @@
130 register unsigned char *from, *to;
131 register int i, j;
132
133+ if (RootPPM != NULL)
134+ {
135+ int w, h;
136+ unsigned char *data;
137+
138+ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL)
139+ {
140+ pWin->background.pixmap
141+ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth);
142+
143+ pWin->backgroundState = BackgroundPixmap;
144+ pGC = GetScratchGC(pScreen->rootDepth, pScreen);
145+ if (!pWin->background.pixmap || !pGC)
146+ FatalError("could not create root tile");
147+
148+ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
149+
150+ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap,
151+ pGC,
152+ pScreen->rootDepth,
153+ 0, 0, w, h, 0, ZPixmap, (char *)data);
154+ FreeScratchGC(pGC);
155+
156+ free(data);
157+ return;
158+ }
159+ else
160+ ErrorF("Unable to load root window image.");
161+ }
162+
163 pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
164 pScreen->rootDepth);
165
166@@ -357,6 +498,7 @@
167
168 }
169
170+
171 WindowPtr
172 AllocateWindow(ScreenPtr pScreen)
173 {
174diff -u -r xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c
175--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c 2007-01-08 14:30:38.000000000 +0000
176+++ xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c 2007-01-15 17:53:06.000000000 +0000
177@@ -58,6 +58,9 @@
178 { 32, 32 }
179 };
180
181+int
182+ProcXFixesHideCursor (ClientPtr client) ;
183+
184 #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
185
186 int kdScreenPrivateIndex;
187@@ -84,6 +87,9 @@
188 KdOsFuncs *kdOsFuncs;
189 extern WindowPtr *WindowTable;
190
191+extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */
192+extern char* RootPPM; /* dix/window.c */
193+
194 void
195 KdSetRootClip (ScreenPtr pScreen, BOOL enable)
196 {
197@@ -312,6 +318,7 @@
198 KdSetRootClip (pScreen, TRUE);
199 if (pScreenPriv->card->cfuncs->dpms)
200 (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
201+
202 return TRUE;
203 }
204
205@@ -686,10 +693,14 @@
206 ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
207 ErrorF("-switchCmd Command to execute on vt switch\n");
208 ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
209+ ErrorF("-hide-cursor Start with cursor hidden\n");
210+ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n");
211 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
212 #ifdef PSEUDO8
213 p8UseMsg ();
214 #endif
215+
216+
217 }
218
219 int
220@@ -761,6 +772,19 @@
221 kdSoftCursor = TRUE;
222 return 1;
223 }
224+ if (!strcmp (argv[i], "-hide-cursor"))
225+ {
226+ CursorInitiallyHidden = TRUE;
227+ return 1;
228+ }
229+ if (!strcmp (argv[i], "-root-ppm"))
230+ {
231+ if ((i+1) < argc)
232+ RootPPM = argv[i+1];
233+ else
234+ UseMsg ();
235+ return 2;
236+ }
237 if (!strcmp (argv[i], "-videoTest"))
238 {
239 kdVideoTest = TRUE;
240diff -u -r xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c xorg-server-X11R7.1-1.1.0/xfixes/cursor.c
241--- xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c 2007-01-08 14:30:38.000000000 +0000
242+++ xorg-server-X11R7.1-1.1.0/xfixes/cursor.c 2007-01-11 16:33:00.000000000 +0000
243@@ -59,9 +59,12 @@
244 static RESTYPE CursorWindowType;
245 static int CursorScreenPrivateIndex = -1;
246 static int CursorGeneration;
247+static Bool CursorGloballyHidden;
248 static CursorPtr CursorCurrent;
249 static CursorPtr pInvisibleCursor = NULL;
250
251+Bool CursorInitiallyHidden = FALSE;
252+
253 static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
254
255 #define VERIFY_CURSOR(pCursor, cursor, client, access) { \
256@@ -130,7 +133,7 @@
257
258 Unwrap (cs, pScreen, DisplayCursor);
259
260- if (cs->pCursorHideCounts != NULL) {
261+ if (cs->pCursorHideCounts != NULL || CursorGloballyHidden) {
262 ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor);
263 } else {
264 ret = (*pScreen->DisplayCursor) (pScreen, pCursor);
265@@ -848,6 +851,12 @@
266 return BadWindow;
267 }
268
269+ /* Is cursor set to be initially hidden ?, if so reset this
270+ * flag as now visibility assumed under control of client.
271+ */
272+ if (CursorGloballyHidden)
273+ CursorGloballyHidden = FALSE;
274+
275 /*
276 * Has client hidden the cursor before on this screen?
277 * If so, just increment the count.
278@@ -899,9 +908,19 @@
279 return BadWindow;
280 }
281
282+ /* X was started with cursor hidden, therefore just reset our flag
283+ * (returning to normal client control) and cause cursor to now be
284+ * shown.
285+ */
286+ if (CursorGloballyHidden == TRUE)
287+ {
288+ CursorGloballyHidden = FALSE;
289+ return (client->noClientException);
290+ }
291+
292 /*
293 * Has client hidden the cursor on this screen?
294- * If not, generate an error.
295+ * If so, generate an error.
296 */
297 pChc = findCursorHideCount(client, pWin->drawable.pScreen);
298 if (pChc == NULL) {
299@@ -1009,6 +1028,8 @@
300 XFixesCursorInit (void)
301 {
302 int i;
303+
304+ CursorGloballyHidden = CursorInitiallyHidden;
305
306 if (CursorGeneration != serverGeneration)
307 {
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch
new file mode 100644
index 0000000000..2dc22bf50e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch
@@ -0,0 +1,515 @@
1# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
2# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
3diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c
4--- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200
5+++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200
6@@ -31,9 +31,11 @@
7 #include <X11/X.h>
8 #include <X11/Xproto.h>
9 #include <X11/Xpoll.h>
10+#include <X11/keysym.h>
11 #include "inputstr.h"
12 #include "scrnintstr.h"
13 #include "kdrive.h"
14+#include "kkeymap.h"
15
16 #define NUM_EVENTS 128
17 #define ABS_UNSET -65535
18@@ -105,9 +107,10 @@
19 {
20 KdMouseInfo *mi = closure;
21 Kevdev *ke = mi->driver;
22- int i;
23+ int i, j;
24 struct input_event events[NUM_EVENTS];
25 int n;
26+ int flags;
27
28 n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
29 if (n <= 0)
30@@ -115,22 +118,64 @@
31 n /= sizeof (struct input_event);
32 for (i = 0; i < n; i++)
33 {
34+ flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState;
35 switch (events[i].type) {
36 case EV_SYN:
37 break;
38 case EV_KEY:
39- EvdevMotion (mi);
40- ASSIGNBIT(ke->key,events[i].code, events[i].value);
41- if (events[i].code < 0x100)
42- ErrorF ("key %d %d\n", events[i].code, events[i].value);
43- else
44- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
45+ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
46+ switch (events[i].code) {
47+ case BTN_LEFT:
48+ if (events[i].value == 1)
49+ flags |= KD_BUTTON_1;
50+ else
51+ flags &= ~KD_BUTTON_1;
52+ break;
53+ case BTN_MIDDLE:
54+ if (events[i].value == 1)
55+ flags |= KD_BUTTON_2;
56+ else
57+ flags &= ~KD_BUTTON_2;
58+ break;
59+ case BTN_RIGHT:
60+ if (events[i].value == 1)
61+ flags |= KD_BUTTON_3;
62+ else
63+ flags &= ~KD_BUTTON_3;
64+ break;
65+ default:
66+ /* Unknow button */
67+ break;
68+ }
69+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
70+ }
71 break;
72 case EV_REL:
73- ke->rel[events[i].code] += events[i].value;
74+ if (events[i].code == REL_X) {
75+ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
76+ }
77+ else if (events[i].code == REL_Y) {
78+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
79+ }
80+ else if (events[i].code == REL_WHEEL) {
81+ for (j = 0; j < abs (events[i].value); j++) {
82+ if (events[i].value > 0)
83+ flags |= KD_BUTTON_4;
84+ else
85+ flags |= KD_BUTTON_5;
86+
87+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
88+
89+ if (events[i].value > 0)
90+ flags &= ~KD_BUTTON_4;
91+ else
92+ flags &= ~KD_BUTTON_5;
93+
94+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
95+ } /* events[i].code == REL_WHEEL */
96+ }
97 break;
98 case EV_ABS:
99- ke->abs[events[i].code] = events[i].value;
100 break;
101 }
102 }
103@@ -173,6 +218,12 @@
104 fd = open (kdefaultEvdev[i], 2);
105 if (fd >= 0)
106 {
107+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
108+ {
109+ close (fd);
110+ continue;
111+ }
112+
113 mi->name = KdSaveString (kdefaultEvdev[i]);
114 break;
115 }
116@@ -287,7 +338,319 @@
117 EvdevFini,
118 };
119
120-#if 0
121+/* Keyboard */
122+
123+int kbd_fd = -1;
124+int EvdevInputType = 0;
125+
126+KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
127+/* These are directly mapped from DOS scanset 0 */
128+/* 1 8 */ XK_Escape, NoSymbol,
129+/* 2 9 */ XK_1, XK_exclam,
130+/* 3 10 */ XK_2, XK_at,
131+/* 4 11 */ XK_3, XK_numbersign,
132+/* 5 12 */ XK_4, XK_dollar,
133+/* 6 13 */ XK_5, XK_percent,
134+/* 7 14 */ XK_6, XK_asciicircum,
135+/* 8 15 */ XK_7, XK_ampersand,
136+/* 9 16 */ XK_8, XK_asterisk,
137+/* 10 17 */ XK_9, XK_parenleft,
138+/* 11 18 */ XK_0, XK_parenright,
139+/* 12 19 */ XK_minus, XK_underscore,
140+/* 13 20 */ XK_equal, XK_plus,
141+/* 14 21 */ XK_BackSpace, NoSymbol,
142+/* 15 22 */ XK_Tab, NoSymbol,
143+/* 16 23 */ XK_Q, NoSymbol,
144+/* 17 24 */ XK_W, NoSymbol,
145+/* 18 25 */ XK_E, NoSymbol,
146+/* 19 26 */ XK_R, NoSymbol,
147+/* 20 27 */ XK_T, NoSymbol,
148+/* 21 28 */ XK_Y, NoSymbol,
149+/* 22 29 */ XK_U, NoSymbol,
150+/* 23 30 */ XK_I, NoSymbol,
151+/* 24 31 */ XK_O, NoSymbol,
152+/* 25 32 */ XK_P, NoSymbol,
153+/* 26 33 */ XK_bracketleft, XK_braceleft,
154+/* 27 34 */ XK_bracketright, XK_braceright,
155+/* 28 35 */ XK_Return, NoSymbol,
156+/* 29 36 */ XK_Control_L, NoSymbol,
157+/* 30 37 */ XK_A, NoSymbol,
158+/* 31 38 */ XK_S, NoSymbol,
159+/* 32 39 */ XK_D, NoSymbol,
160+/* 33 40 */ XK_F, NoSymbol,
161+/* 34 41 */ XK_G, NoSymbol,
162+/* 35 42 */ XK_H, NoSymbol,
163+/* 36 43 */ XK_J, NoSymbol,
164+/* 37 44 */ XK_K, NoSymbol,
165+/* 38 45 */ XK_L, NoSymbol,
166+/* 39 46 */ XK_semicolon, XK_colon,
167+/* 40 47 */ XK_apostrophe, XK_quotedbl,
168+/* 41 48 */ XK_grave, XK_asciitilde,
169+/* 42 49 */ XK_Shift_L, NoSymbol,
170+/* 43 50 */ XK_backslash, XK_bar,
171+/* 44 51 */ XK_Z, NoSymbol,
172+/* 45 52 */ XK_X, NoSymbol,
173+/* 46 53 */ XK_C, NoSymbol,
174+/* 47 54 */ XK_V, NoSymbol,
175+/* 48 55 */ XK_B, NoSymbol,
176+/* 49 56 */ XK_N, NoSymbol,
177+/* 50 57 */ XK_M, NoSymbol,
178+/* 51 58 */ XK_comma, XK_less,
179+/* 52 59 */ XK_period, XK_greater,
180+/* 53 60 */ XK_slash, XK_question,
181+/* 54 61 */ XK_Shift_R, NoSymbol,
182+/* 55 62 */ XK_KP_Multiply, NoSymbol,
183+/* 56 63 */ XK_Alt_L, XK_Meta_L,
184+/* 57 64 */ XK_space, NoSymbol,
185+/* 58 65 */ XK_Caps_Lock, NoSymbol,
186+/* 59 66 */ XK_F1, NoSymbol,
187+/* 60 67 */ XK_F2, NoSymbol,
188+/* 61 68 */ XK_F3, NoSymbol,
189+/* 62 69 */ XK_F4, NoSymbol,
190+/* 63 70 */ XK_F5, NoSymbol,
191+/* 64 71 */ XK_F6, NoSymbol,
192+/* 65 72 */ XK_F7, NoSymbol,
193+/* 66 73 */ XK_F8, NoSymbol,
194+/* 67 74 */ XK_F9, NoSymbol,
195+/* 68 75 */ XK_F10, NoSymbol,
196+/* 69 76 */ XK_Break, XK_Pause,
197+/* 70 77 */ XK_Scroll_Lock, NoSymbol,
198+/* 71 78 */ XK_KP_Home, XK_KP_7,
199+/* 72 79 */ XK_KP_Up, XK_KP_8,
200+/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
201+/* 74 81 */ XK_KP_Subtract, NoSymbol,
202+/* 75 82 */ XK_KP_Left, XK_KP_4,
203+/* 76 83 */ XK_KP_5, NoSymbol,
204+/* 77 84 */ XK_KP_Right, XK_KP_6,
205+/* 78 85 */ XK_KP_Add, NoSymbol,
206+/* 79 86 */ XK_KP_End, XK_KP_1,
207+/* 80 87 */ XK_KP_Down, XK_KP_2,
208+/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
209+/* 82 89 */ XK_KP_Insert, XK_KP_0,
210+/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
211+/* 84 91 */ NoSymbol, NoSymbol,
212+/* 85 92 */ NoSymbol, NoSymbol,
213+/* 86 93 */ NoSymbol, NoSymbol,
214+/* 87 94 */ XK_F11, NoSymbol,
215+/* 88 95 */ XK_F12, NoSymbol,
216+
217+/* These are remapped from the extended set (using ExtendMap) */
218+
219+/* 89 96 */ XK_Control_R, NoSymbol,
220+/* 90 97 */ XK_KP_Enter, NoSymbol,
221+/* 91 98 */ XK_KP_Divide, NoSymbol,
222+/* 92 99 */ XK_Sys_Req, XK_Print,
223+/* 93 100 */ XK_Alt_R, XK_Meta_R,
224+/* 94 101 */ XK_Num_Lock, NoSymbol,
225+/* 95 102 */ XK_Home, NoSymbol,
226+/* 96 103 */ XK_Up, NoSymbol,
227+/* 97 104 */ XK_Page_Up, NoSymbol,
228+/* 98 105 */ XK_Left, NoSymbol,
229+/* 99 106 */ XK_Right, NoSymbol,
230+/* 100 107 */ XK_End, NoSymbol,
231+/* 101 108 */ XK_Down, NoSymbol,
232+/* 102 109 */ XK_Page_Down, NoSymbol,
233+/* 103 110 */ XK_Insert, NoSymbol,
234+/* 104 111 */ XK_Delete, NoSymbol,
235+/* 105 112 */ XK_Super_L, NoSymbol,
236+/* 106 113 */ XK_Super_R, NoSymbol,
237+/* 107 114 */ XK_Menu, NoSymbol,
238+/* 108 115 */ NoSymbol, NoSymbol,
239+/* 109 116 */ NoSymbol, NoSymbol,
240+/* 110 117 */ NoSymbol, NoSymbol,
241+/* 111 118 */ NoSymbol, NoSymbol,
242+/* 112 119 */ NoSymbol, NoSymbol,
243+
244+/* 113 120 */ NoSymbol, NoSymbol,
245+/* 114 121 */ NoSymbol, NoSymbol,
246+/* 115 122 */ NoSymbol, NoSymbol,
247+/* 116 123 */ NoSymbol, NoSymbol,
248+/* 117 124 */ NoSymbol, NoSymbol,
249+/* 118 125 */ NoSymbol, NoSymbol,
250+/* 119 126 */ NoSymbol, NoSymbol,
251+/* 120 127 */ NoSymbol, NoSymbol,
252+/* 121 128 */ NoSymbol, NoSymbol,
253+/* 122 129 */ NoSymbol, NoSymbol,
254+/* 123 130 */ NoSymbol, NoSymbol,
255+/* 124 131 */ NoSymbol, NoSymbol,
256+/* 125 132 */ NoSymbol, NoSymbol,
257+/* 126 133 */ NoSymbol, NoSymbol,
258+/* 127 134 */ NoSymbol, NoSymbol,
259+/* 128 135 */ NoSymbol, NoSymbol,
260+/* 129 136 */ NoSymbol, NoSymbol,
261+/* 130 137 */ NoSymbol, NoSymbol,
262+/* 131 138 */ NoSymbol, NoSymbol,
263+/* 132 139 */ NoSymbol, NoSymbol,
264+/* 133 140 */ NoSymbol, NoSymbol,
265+/* 134 141 */ NoSymbol, NoSymbol,
266+/* 135 142 */ NoSymbol, NoSymbol,
267+/* 136 143 */ NoSymbol, NoSymbol,
268+/* 137 144 */ NoSymbol, NoSymbol,
269+/* 138 145 */ NoSymbol, NoSymbol,
270+/* 139 146 */ NoSymbol, NoSymbol,
271+/* 140 147 */ NoSymbol, NoSymbol,
272+/* 141 148 */ NoSymbol, NoSymbol,
273+/* 142 149 */ NoSymbol, NoSymbol,
274+/* 143 150 */ NoSymbol, NoSymbol,
275+/* 144 151 */ NoSymbol, NoSymbol,
276+/* 145 152 */ NoSymbol, NoSymbol,
277+/* 146 153 */ NoSymbol, NoSymbol,
278+/* 147 154 */ NoSymbol, NoSymbol,
279+/* 148 155 */ NoSymbol, NoSymbol,
280+/* 149 156 */ NoSymbol, NoSymbol,
281+/* 150 157 */ NoSymbol, NoSymbol,
282+/* 151 158 */ NoSymbol, NoSymbol,
283+/* 152 159 */ NoSymbol, NoSymbol,
284+/* 153 160 */ NoSymbol, NoSymbol,
285+/* 154 161 */ NoSymbol, NoSymbol,
286+/* 155 162 */ NoSymbol, NoSymbol,
287+/* 156 163 */ NoSymbol, NoSymbol,
288+/* 157 164 */ NoSymbol, NoSymbol,
289+/* 158 165 */ NoSymbol, NoSymbol,
290+/* 159 166 */ NoSymbol, NoSymbol,
291+/* 160 167 */ NoSymbol, NoSymbol,
292+/* 161 168 */ NoSymbol, NoSymbol,
293+/* 162 169 */ NoSymbol, NoSymbol,
294+/* 163 170 */ NoSymbol, NoSymbol,
295+/* 164 171 */ NoSymbol, NoSymbol,
296+/* 165 172 */ NoSymbol, NoSymbol,
297+/* 166 173 */ NoSymbol, NoSymbol,
298+/* 167 174 */ NoSymbol, NoSymbol,
299+/* 168 175 */ NoSymbol, NoSymbol,
300+/* 169 176 */ NoSymbol, NoSymbol,
301+/* 170 177 */ NoSymbol, NoSymbol,
302+/* 171 178 */ NoSymbol, NoSymbol,
303+/* 172 179 */ NoSymbol, NoSymbol,
304+/* 173 180 */ NoSymbol, NoSymbol,
305+/* 174 181 */ NoSymbol, NoSymbol,
306+/* 175 182 */ NoSymbol, NoSymbol,
307+/* 176 183 */ NoSymbol, NoSymbol,
308+/* 177 184 */ NoSymbol, NoSymbol,
309+/* 178 185 */ NoSymbol, NoSymbol,
310+/* 179 186 */ NoSymbol, NoSymbol,
311+/* 180 187 */ NoSymbol, NoSymbol,
312+/* 181 188 */ NoSymbol, NoSymbol,
313+/* 182 189 */ NoSymbol, NoSymbol,
314+/* 183 190 */ NoSymbol, NoSymbol,
315+/* 184 191 */ NoSymbol, NoSymbol,
316+/* 185 192 */ NoSymbol, NoSymbol,
317+/* 186 193 */ NoSymbol, NoSymbol,
318+/* 187 194 */ NoSymbol, NoSymbol,
319+/* 188 195 */ NoSymbol, NoSymbol,
320+/* 189 196 */ NoSymbol, NoSymbol,
321+/* 190 197 */ NoSymbol, NoSymbol,
322+/* 191 198 */ NoSymbol, NoSymbol,
323+/* 192 199 */ NoSymbol, NoSymbol,
324+/* 193 200 */ NoSymbol, NoSymbol,
325+/* 194 201 */ NoSymbol, NoSymbol,
326+};
327+
328+static void
329+EvdevKbdRead (int fd, void *closure)
330+{
331+ int i, n;
332+ struct input_event events[NUM_EVENTS];
333+
334+ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
335+ if (n <= 0)
336+ return;
337+
338+ n /= sizeof (struct input_event);
339+
340+ for (i = 0; i < n; i++)
341+ {
342+ if (events[i].type == EV_KEY)
343+ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
344+ }
345+}
346+
347+static void
348+EvdevKbdLoad (void)
349+{
350+ kdMinScanCode = 0;
351+ kdMaxScanCode = 193;
352+ kdKeymapWidth = 2;
353+ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
354+}
355+
356+static int
357+EvdevKbdInit (void)
358+{
359+ int fd, i;
360+
361+ if (!EvdevInputType)
362+ EvdevInputType = KdAllocInputType ();
363+
364+ if (!kdKeyboard)
365+ {
366+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
367+ {
368+ fd = open (kdefaultEvdev[i], 2);
369+ if (fd >= 0)
370+ {
371+ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
372+ break;
373+ }
374+ }
375+ }
376+ else
377+ {
378+ fd = open (kdKeyboard, O_RDWR);
379+ if (fd < 0)
380+ return FALSE;
381+ }
382+
383+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
384+ {
385+ close (fd);
386+ return FALSE;
387+ }
388+
389+ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
390+ return FALSE;
391+
392+ kbd_fd = fd;
393+ return TRUE;
394+}
395+
396+static void
397+EvdevKbdFini (void)
398+{
399+}
400+
401+static void
402+EvdevKbdLeds (int leds)
403+{
404+ struct input_event event;
405+
406+ memset(&event, 0, sizeof(event));
407+
408+ event.type = EV_LED;
409+ event.code = LED_CAPSL;
410+ event.value = leds & (1 << 0) ? 1 : 0;
411+ write(kbd_fd, (char *) &event, sizeof(event));
412+
413+ event.type = EV_LED;
414+ event.code = LED_NUML;
415+ event.value = leds & (1 << 1) ? 1 : 0;
416+ write(kbd_fd, (char *) &event, sizeof(event));
417+
418+ event.type = EV_LED;
419+ event.code = LED_SCROLLL;
420+ event.value = leds & (1 << 2) ? 1 : 0;
421+ write(kbd_fd, (char *) &event, sizeof(event));
422+
423+ event.type = EV_LED;
424+ event.code = LED_COMPOSE;
425+ event.value = leds & (1 << 3) ? 1 : 0;
426+ write(kbd_fd, (char *) &event, sizeof(event));
427+}
428+
429+static void
430+EvdevKbdBell (int volume, int frequency, int duration)
431+{
432+}
433+
434 KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
435 EvdevKbdLoad,
436 EvdevKbdInit,
437@@ -296,4 +659,4 @@
438 EvdevKbdFini,
439 0,
440 };
441-#endif
442+
443diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c
444--- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200
445+++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200
446@@ -73,6 +73,7 @@
447 Bool kdEnabled;
448 int kdSubpixelOrder;
449 int kdVirtualTerminal = -1;
450+char *kdKeyboard = 0;
451 Bool kdSwitchPending;
452 char *kdSwitchCmd;
453 DDXPointRec kdOrigin;
454@@ -795,6 +796,14 @@
455 UseMsg ();
456 return 2;
457 }
458+ if (!strcmp (argv[i], "-keyboard"))
459+ {
460+ if ((i+1) < argc)
461+ kdKeyboard = argv[i+1];
462+ else
463+ UseMsg ();
464+ return 2;
465+ }
466 if (!strcmp (argv[i], "-rgba"))
467 {
468 if ((i+1) < argc)
469diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h
470--- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200
471+++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200
472@@ -416,6 +416,7 @@
473 extern Bool kdDisableZaphod;
474 extern Bool kdDontZap;
475 extern int kdVirtualTerminal;
476+extern char *kdKeyboard;
477 extern char *kdSwitchCmd;
478 extern KdOsFuncs *kdOsFuncs;
479
480@@ -769,7 +770,7 @@
481 ProcessInputEvents (void);
482
483 extern KdMouseFuncs LinuxMouseFuncs;
484-extern KdMouseFuncs LinuxEvdevFuncs;
485+extern KdMouseFuncs LinuxEvdevMouseFuncs;
486 extern KdMouseFuncs Ps2MouseFuncs;
487 extern KdMouseFuncs BusMouseFuncs;
488 extern KdMouseFuncs MsMouseFuncs;
489@@ -777,6 +778,7 @@
490 extern KdMouseFuncs TsFuncs;
491 #endif
492 extern KdKeyboardFuncs LinuxKeyboardFuncs;
493+extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
494 extern KdOsFuncs LinuxFuncs;
495
496 extern KdMouseFuncs VxWorksMouseFuncs;
497diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c
498--- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200
499+++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200
500@@ -1300,6 +1300,7 @@
501 xE.u.u.type = KeyPress;
502 xE.u.u.detail = key_code;
503
504+#ifndef XKB
505 switch (KEYCOL1(key_code))
506 {
507 case XK_Num_Lock:
508@@ -1313,6 +1314,7 @@
509 else
510 xE.u.u.type = KeyPress;
511 }
512+#endif
513
514 /*
515 * Check pressed keys which are already down
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch
new file mode 100644
index 0000000000..28d7325601
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-use-evdev.patch
@@ -0,0 +1,54 @@
1--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
2+++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
3@@ -28,6 +28,8 @@
4 #endif
5 #include <fbdev.h>
6
7+extern int use_evdev;
8+
9 void
10 InitCard (char *name)
11 {
12@@ -45,7 +47,10 @@
13 void
14 InitInput (int argc, char **argv)
15 {
16- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
17+ if (use_evdev)
18+ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
19+ else
20+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
21 #ifdef TOUCHSCREEN
22 KdAddMouseDriver (&TsFuncs);
23 #endif
24--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
25+++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
26@@ -44,6 +44,8 @@
27 #include "dpmsproc.h"
28 #endif
29
30+int use_evdev = 0;
31+
32 typedef struct _kdDepths {
33 CARD8 depth;
34 CARD8 bpp;
35@@ -687,6 +689,7 @@
36 ErrorF("-videoTest Start the server, pause momentarily and exit\n");
37 ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
38 ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
39+ ErrorF("-use-evdev Use Linux evdev input\n");
40 ErrorF("-switchCmd Command to execute on vt switch\n");
41 ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
42 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
43@@ -796,6 +799,11 @@
44 UseMsg ();
45 return 2;
46 }
47+ if (!strcmp (argv[i], "-use-evdev"))
48+ {
49+ use_evdev = 1;
50+ return 1;
51+ }
52 if (!strcmp (argv[i], "-keyboard"))
53 {
54 if ((i+1) < argc)
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/optional-xkb.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/optional-xkb.patch
new file mode 100644
index 0000000000..a580b500b7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/optional-xkb.patch
@@ -0,0 +1,58 @@
1Index: xorg-server-1.2.0/Makefile.am
2===================================================================
3--- xorg-server-1.2.0.orig/Makefile.am 2007-01-23 06:39:15.000000000 +0100
4+++ xorg-server-1.2.0/Makefile.am 2007-03-28 20:26:19.000000000 +0200
5@@ -30,6 +30,10 @@
6 XINPUT_DIR=Xi
7 endif
8
9+if XKB
10+XKB_DIR=xkb
11+endif
12+
13 if DBE
14 DBE_DIR=dbe
15 endif
16@@ -46,7 +50,7 @@
17 randr \
18 render \
19 $(XINPUT_DIR) \
20- xkb \
21+ $(XKB_DIR) \
22 $(DBE_DIR) \
23 $(MFB_DIR) \
24 $(AFB_DIR) \
25Index: xorg-server-1.2.0/configure.ac
26===================================================================
27--- xorg-server-1.2.0.orig/configure.ac 2007-01-23 06:39:15.000000000 +0100
28+++ xorg-server-1.2.0/configure.ac 2007-03-28 20:27:13.000000000 +0200
29@@ -428,6 +428,7 @@
30 AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
31 AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
32 AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
33+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
34
35 dnl DDXes.
36 AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
37@@ -754,12 +755,15 @@
38
39 AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
40
41-AC_DEFINE(XKB, 1, [Build XKB])
42-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
43-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
44-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
45-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
46-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
47+AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
48+if test "x$XKB" = xyes; then
49+ AC_DEFINE(XKB, 1, [Build XKB])
50+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
51+ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
52+ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
53+ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
54+ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
55+fi
56
57 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
58 [Do not have `strcasecmp'.]))
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/report-correct-randr12.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/report-correct-randr12.patch
new file mode 100644
index 0000000000..72c8a18add
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/report-correct-randr12.patch
@@ -0,0 +1,29 @@
1Server reports XRandR version provided by libxrandr instead of XRandR
2version implemented. It confuses applications that execute XRandR
3version dependent code (e. g. gtk+ >= 2.18.0).
4
5Index: xorg-server-1.3.0.0/randr/rrdispatch.c
6===================================================================
7--- xorg-server-1.3.0.0.orig/randr/rrdispatch.c
8+++ xorg-server-1.3.0.0/randr/rrdispatch.c
9@@ -22,6 +22,9 @@
10
11 #include "randrstr.h"
12
13+#define SERVER_RANDR_MAJOR 1
14+#define SERVER_RANDR_MINOR 2
15+
16 Bool
17 RRClientKnowsRates (ClientPtr pClient)
18 {
19@@ -49,8 +52,8 @@ ProcRRQueryVersion (ClientPtr client)
20 * Report the current version; the current
21 * spec says they're all compatible after 1.0
22 */
23- rep.majorVersion = RANDR_MAJOR;
24- rep.minorVersion = RANDR_MINOR;
25+ rep.majorVersion = SERVER_RANDR_MAJOR;
26+ rep.minorVersion = SERVER_RANDR_MINOR;
27 if (client->swapped) {
28 swaps(&rep.sequenceNumber, n);
29 swapl(&rep.length, n);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/scheduler.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/scheduler.patch
new file mode 100644
index 0000000000..395bc7d511
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/scheduler.patch
@@ -0,0 +1,151 @@
1>From 48e4d08e99de41047c6b6fde5ba9d12787881c23 Mon Sep 17 00:00:00 2001
2From: root <root@benny.jf.intel.com>
3Date: Sun, 28 Oct 2007 09:37:52 +0100
4Subject: [PATCH] The smart scheduler itimer currently always fires after each request
5 (which in turn causes the CPU to wake out of idle, burning precious power).
6 Rather than doing this, just stop the timer before going into the select()
7 portion of the WaitFor loop. It's a cheap system call, and it will only get
8 called if there's no more commands batched up from the active fd.
9
10This change also allows some of the functions to be simplified; setitimer()
11will only fail if it's passed invalid data, and we don't do that... so make
12it void and remove all the conditional code that deals with failure.
13
14The change also allows us to remove a few variables that were used for
15housekeeping between the signal handler and the main loop.
16---
17 include/dixstruct.h | 6 ++----
18 os/WaitFor.c | 11 +++--------
19 os/utils.c | 28 +++-------------------------
20 3 files changed, 8 insertions(+), 37 deletions(-)
21
22diff --git a/include/dixstruct.h b/include/dixstruct.h
23index dd6347f..bed31dc 100644
24--- a/include/dixstruct.h
25+++ b/include/dixstruct.h
26@@ -150,11 +150,9 @@ extern long SmartScheduleTime;
27 extern long SmartScheduleInterval;
28 extern long SmartScheduleSlice;
29 extern long SmartScheduleMaxSlice;
30-extern unsigned long SmartScheduleIdleCount;
31 extern Bool SmartScheduleDisable;
32-extern Bool SmartScheduleIdle;
33-extern Bool SmartScheduleTimerStopped;
34-extern Bool SmartScheduleStartTimer(void);
35+extern void SmartScheduleStartTimer(void);
36+extern void SmartScheduleStopTimer(void);
37 #define SMART_MAX_PRIORITY (20)
38 #define SMART_MIN_PRIORITY (-20)
39
40diff --git a/os/WaitFor.c b/os/WaitFor.c
41index ec1592c..7683477 100644
42--- a/os/WaitFor.c
43+++ b/os/WaitFor.c
44@@ -217,7 +217,8 @@ WaitForSomething(int *pClientsReady)
45 XFD_COPYSET(&AllSockets, &LastSelectMask);
46 #ifdef SMART_SCHEDULE
47 }
48- SmartScheduleIdle = TRUE;
49+ SmartScheduleStopTimer ();
50+
51 #endif
52 BlockHandler((pointer)&wt, (pointer)&LastSelectMask);
53 if (NewOutputPending)
54@@ -237,13 +238,7 @@ WaitForSomething(int *pClientsReady)
55 selecterr = GetErrno();
56 WakeupHandler(i, (pointer)&LastSelectMask);
57 #ifdef SMART_SCHEDULE
58- if (i >= 0)
59- {
60- SmartScheduleIdle = FALSE;
61- SmartScheduleIdleCount = 0;
62- if (SmartScheduleTimerStopped)
63- (void) SmartScheduleStartTimer ();
64- }
65+ SmartScheduleStartTimer ();
66 #endif
67 if (i <= 0) /* An error or timeout occurred */
68 {
69diff --git a/os/utils.c b/os/utils.c
70index 31cb0af..6fc1f7d 100644
71--- a/os/utils.c
72+++ b/os/utils.c
73@@ -1513,10 +1513,6 @@ XNFstrdup(const char *s)
74
75 #ifdef SMART_SCHEDULE
76
77-unsigned long SmartScheduleIdleCount;
78-Bool SmartScheduleIdle;
79-Bool SmartScheduleTimerStopped;
80-
81 #ifdef SIGVTALRM
82 #define SMART_SCHEDULE_POSSIBLE
83 #endif
84@@ -1526,7 +1522,7 @@ Bool SmartScheduleTimerStopped;
85 #define SMART_SCHEDULE_TIMER ITIMER_REAL
86 #endif
87
88-static void
89+void
90 SmartScheduleStopTimer (void)
91 {
92 #ifdef SMART_SCHEDULE_POSSIBLE
93@@ -1537,38 +1533,28 @@ SmartScheduleStopTimer (void)
94 timer.it_value.tv_sec = 0;
95 timer.it_value.tv_usec = 0;
96 (void) setitimer (ITIMER_REAL, &timer, 0);
97- SmartScheduleTimerStopped = TRUE;
98 #endif
99 }
100
101-Bool
102+void
103 SmartScheduleStartTimer (void)
104 {
105 #ifdef SMART_SCHEDULE_POSSIBLE
106 struct itimerval timer;
107
108- SmartScheduleTimerStopped = FALSE;
109 timer.it_interval.tv_sec = 0;
110 timer.it_interval.tv_usec = SmartScheduleInterval * 1000;
111 timer.it_value.tv_sec = 0;
112 timer.it_value.tv_usec = SmartScheduleInterval * 1000;
113- return setitimer (ITIMER_REAL, &timer, 0) >= 0;
114+ setitimer (ITIMER_REAL, &timer, 0);
115 #endif
116- return FALSE;
117 }
118
119 #ifdef SMART_SCHEDULE_POSSIBLE
120 static void
121 SmartScheduleTimer (int sig)
122 {
123- int olderrno = errno;
124-
125 SmartScheduleTime += SmartScheduleInterval;
126- if (SmartScheduleIdle)
127- {
128- SmartScheduleStopTimer ();
129- }
130- errno = olderrno;
131 }
132 #endif
133
134@@ -1592,14 +1578,6 @@ SmartScheduleInit (void)
135 perror ("sigaction for smart scheduler");
136 return FALSE;
137 }
138- /* Set up the virtual timer */
139- if (!SmartScheduleStartTimer ())
140- {
141- perror ("scheduling timer");
142- return FALSE;
143- }
144- /* stop the timer and wait for WaitForSomething to start it */
145- SmartScheduleStopTimer ();
146 return TRUE;
147 #else
148 return FALSE;
149--
1501.5.3.4
151
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch
new file mode 100644
index 0000000000..e0cca5428b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch
@@ -0,0 +1,122 @@
1---
2 Xext/xcalibrate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
3 hw/kdrive/src/kdrive.h | 3 +++
4 hw/kdrive/src/kinput.c | 12 ++++++++++++
5 3 files changed, 61 insertions(+), 1 deletion(-)
6
7Index: xorg-server-1.3.0.0/Xext/xcalibrate.c
8===================================================================
9--- xorg-server-1.3.0.0.orig/Xext/xcalibrate.c 2007-06-29 17:30:03.000000000 +0100
10+++ xorg-server-1.3.0.0/Xext/xcalibrate.c 2007-06-30 14:04:40.000000000 +0100
11@@ -166,7 +166,6 @@ ProcXCalibrateSetRawMode (ClientPtr clie
12 return (client->noClientException);
13 }
14
15-
16 static int
17 SProcXCalibrateSetRawMode (ClientPtr client)
18 {
19@@ -180,6 +179,47 @@ SProcXCalibrateSetRawMode (ClientPtr cli
20 return ProcXCalibrateSetRawMode(client);
21 }
22
23+static int
24+ProcXCalibrateScreenToCoord (ClientPtr client)
25+{
26+ REQUEST(xXCalibrateScreenToCoordReq);
27+ xXCalibrateScreenToCoordReply rep;
28+
29+ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq);
30+
31+ memset (&rep, 0, sizeof (rep));
32+ rep.type = X_Reply;
33+ rep.sequenceNumber = client->sequence;
34+ rep.x = stuff->x;
35+ rep.y = stuff->y;
36+
37+ KdScreenToMouseCoords(&rep.x, &rep.y);
38+
39+ if (client->swapped)
40+ {
41+ int n;
42+
43+ swaps (&rep.x, n);
44+ swaps (&rep.y, n);
45+ }
46+ WriteToClient(client, sizeof (rep), (char *) &rep);
47+ return (client->noClientException);
48+}
49+
50+static int
51+SProcXCalibrateScreenToCoord (ClientPtr client)
52+{
53+ REQUEST(xXCalibrateScreenToCoordReq);
54+ int n;
55+
56+ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq);
57+
58+ swaps(&stuff->x, n);
59+ swaps(&stuff->y, n);
60+
61+ return ProcXCalibrateScreenToCoord(client);
62+}
63+
64 static void
65 XCalibrateResetProc (ExtensionEntry *extEntry)
66 {
67@@ -194,6 +234,9 @@ ProcXCalibrateDispatch (ClientPtr client
68 return ProcXCalibrateQueryVersion(client);
69 case X_XCalibrateRawMode:
70 return ProcXCalibrateSetRawMode(client);
71+ case X_XCalibrateScreenToCoord:
72+ return ProcXCalibrateScreenToCoord(client);
73+
74 default: break;
75 }
76
77@@ -213,6 +256,8 @@ SProcXCalibrateDispatch (ClientPtr clien
78 return SProcXCalibrateQueryVersion(client);
79 case X_XCalibrateRawMode:
80 return SProcXCalibrateSetRawMode(client);
81+ case X_XCalibrateScreenToCoord:
82+ return SProcXCalibrateScreenToCoord(client);
83
84 default: break;
85 }
86Index: xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h
87===================================================================
88--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kdrive.h 2007-06-30 13:43:45.000000000 +0100
89+++ xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h 2007-06-30 13:45:03.000000000 +0100
90@@ -746,6 +746,9 @@ void
91 KdSetMouseMatrix (KdMouseMatrix *matrix);
92
93 void
94+KdScreenToMouseCoords (int *x, int *y);
95+
96+void
97 KdComputeMouseMatrix (KdMouseMatrix *matrix, Rotation randr, int width, int height);
98
99 void
100Index: xorg-server-1.3.0.0/hw/kdrive/src/kinput.c
101===================================================================
102--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kinput.c 2007-06-29 17:30:16.000000000 +0100
103+++ xorg-server-1.3.0.0/hw/kdrive/src/kinput.c 2007-06-30 15:52:16.000000000 +0100
104@@ -381,6 +381,18 @@ KdSetMouseMatrix (KdMouseMatrix *matrix)
105 }
106
107 void
108+KdScreenToMouseCoords (int *x, int *y)
109+{
110+ int (*m)[3] = kdMouseMatrix.matrix;
111+ int div = m[0][1] * m[1][0] - m[1][1] * m[0][0];
112+ int sx = *x;
113+ int sy = *y;
114+
115+ *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div;
116+ *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div;
117+}
118+
119+void
120 KdComputeMouseMatrix (KdMouseMatrix *m, Rotation randr, int width, int height)
121 {
122 int x_dir = 1, y_dir = 1;
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch
new file mode 100644
index 0000000000..2341e40bca
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/crosscompile.patch
@@ -0,0 +1,19 @@
1Index: xorg-server-1.7.99.2/configure.ac
2===================================================================
3--- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
4+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
5@@ -503,14 +503,10 @@
6
7 dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
8 dnl otherwise uses standard subdirectories of FONTROOTDIR
9-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
10- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
11- [
12 DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
13 case $host_os in
14 darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
15 esac
16- ])
17 AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
18 [ FONTPATH="$withval" ],
19 [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch
new file mode 100644
index 0000000000..bd8842721b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/disable-apm.patch
@@ -0,0 +1,20 @@
1--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
2+++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
3@@ -342,7 +342,7 @@
4 /*
5 * Open the APM driver
6 */
7- LinuxApmFd = open ("/dev/apm_bios", 2);
8+ /*LinuxApmFd = open ("/dev/apm_bios", 2);
9 if (LinuxApmFd < 0 && errno == ENOENT)
10 LinuxApmFd = open ("/dev/misc/apm_bios", 2);
11 if (LinuxApmFd >= 0)
12@@ -352,7 +352,7 @@
13 RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
14 AddEnabledDevice (LinuxApmFd);
15 }
16-
17+ */
18 /*
19 * now get the VT
20 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch
new file mode 100644
index 0000000000..13a6c2c954
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-builtin-fonts.patch
@@ -0,0 +1,12 @@
1--- xorg-server-X11R7.1-1.1.0/dix/dixfonts.c.orig 2006-06-08 14:49:12.158684250 +0200
2+++ xorg-server-X11R7.1-1.1.0/dix/dixfonts.c 2006-06-08 14:49:52.493205000 +0200
3@@ -52,8 +52,8 @@
4 /* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */
5
6 #define NEED_REPLIES
7 #ifdef HAVE_DIX_CONFIG_H
8-#include <dix-config.h>
9+#include <kdrive-config.h>
10 #endif
11
12 #include <X11/X.h>
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch
new file mode 100644
index 0000000000..9794e98cb0
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/enable-xcalibrate.patch
@@ -0,0 +1,148 @@
1---
2 Xext/Makefile.am | 6 ++++++
3 configure.ac | 11 +++++++++--
4 include/kdrive-config.h.in | 3 +++
5 mi/miinitext.c | 6 ++++++
6 4 files changed, 24 insertions(+), 2 deletions(-)
7
8Index: xorg-server-1.7.99.2/mi/miinitext.c
9===================================================================
10--- xorg-server-1.7.99.2.orig/mi/miinitext.c 2010-02-10 18:54:11.959086237 +0000
11+++ xorg-server-1.7.99.2/mi/miinitext.c 2010-02-10 18:54:12.429078513 +0000
12@@ -264,6 +264,9 @@
13 #ifdef DMXEXT
14 extern void DMXExtensionInit(INITARGS);
15 #endif
16+#ifdef XCALIBRATE
17+extern void XCalibrateExtensionInit(INITARGS);
18+#endif
19 #ifdef XFIXES
20 extern void XFixesExtensionInit(INITARGS);
21 #endif
22@@ -493,6 +496,9 @@
23 GlxPushProvider(&__glXDRISWRastProvider);
24 if (!noGlxExtension) GlxExtensionInit();
25 #endif
26+#ifdef XCALIBRATE
27+ XCalibrateExtensionInit ();
28+#endif
29 }
30
31 #else /* XFree86LOADER */
32Index: xorg-server-1.7.99.2/configure.ac
33===================================================================
34--- xorg-server-1.7.99.2.orig/configure.ac 2010-02-10 18:54:11.959086237 +0000
35+++ xorg-server-1.7.99.2/configure.ac 2010-02-11 11:49:50.710736962 +0000
36@@ -1985,7 +1985,7 @@
37 fi
38
39
40- PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
41+ PKG_CHECK_MODULES([TSLIB], [tslib-1.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
42 if test "x$HAVE_TSLIB" = xno; then
43 AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
44 fi
45@@ -2039,7 +2039,7 @@
46 KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
47 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
48 KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
49- KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
50+ KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $TSLIB_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
51
52 AC_SUBST([XEPHYR_LIBS])
53 AC_SUBST([XEPHYR_INCS])
54Index: xorg-server-1.7.99.2/include/kdrive-config.h.in
55===================================================================
56--- xorg-server-1.7.99.2.orig/include/kdrive-config.h.in 2010-02-10 18:54:11.959086237 +0000
57+++ xorg-server-1.7.99.2/include/kdrive-config.h.in 2010-02-10 18:54:12.429078513 +0000
58@@ -28,4 +28,7 @@
59 /* Have execinfo.h for backtrace(). */
60 #undef HAVE_EXECINFO_H
61
62+/* Enable XCalibrate extension */
63+#undef XCALIBRATE
64+
65 #endif /* _KDRIVE_CONFIG_H_ */
66Index: xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c
67===================================================================
68--- xorg-server-1.7.99.2.orig/hw/kdrive/linux/tslib.c 2010-02-10 18:58:12.669078495 +0000
69+++ xorg-server-1.7.99.2/hw/kdrive/linux/tslib.c 2010-02-10 19:04:56.927828767 +0000
70@@ -50,12 +50,15 @@
71 int fd;
72 int lastx, lasty;
73 struct tsdev *tsDev;
74- void (*raw_event_hook)(int x, int y, int pressure, void *closure);
75- void *raw_event_closure;
76 int phys_screen;
77 };
78
79
80+/* For XCalibrate extension */
81+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
82+void *tslib_raw_event_closure;
83+
84+
85 static void
86 TsRead (int fd, void *closure)
87 {
88@@ -65,10 +68,10 @@
89 long x = 0, y = 0;
90 unsigned long flags;
91
92- if (private->raw_event_hook) {
93+ if (tslib_raw_event_hook) {
94 while (ts_read_raw(private->tsDev, &event, 1) == 1)
95- private->raw_event_hook (event.x, event.y, event.pressure,
96- private->raw_event_closure);
97+ tslib_raw_event_hook (event.x, event.y, event.pressure,
98+ tslib_raw_event_closure);
99 return;
100 }
101
102@@ -111,8 +114,8 @@
103 {
104 struct TslibPrivate *private = pi->driverPrivate;
105
106- private->raw_event_hook = NULL;
107- private->raw_event_closure = NULL;
108+ tslib_raw_event_hook = NULL;
109+ tslib_raw_event_closure = NULL;
110 if (!pi->path) {
111 pi->path = strdup("/dev/input/touchscreen0");
112 ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
113Index: xorg-server-1.7.99.2/Xext/xcalibrate.c
114===================================================================
115--- xorg-server-1.7.99.2.orig/Xext/xcalibrate.c 2010-02-10 18:59:24.097829840 +0000
116+++ xorg-server-1.7.99.2/Xext/xcalibrate.c 2010-02-11 11:51:00.930735731 +0000
117@@ -115,6 +115,7 @@
118
119 memset (&rep, 0, sizeof (rep));
120 rep.type = X_Reply;
121+ rep.length = 0;
122 rep.sequenceNumber = client->sequence;
123
124 if (stuff->on)
125@@ -158,6 +159,7 @@
126
127 swaps (&rep.sequenceNumber, n);
128 swaps (&rep.status, n);
129+ swapl (&rep.length, n);
130 }
131 WriteToClient(client, sizeof (rep), (char *) &rep);
132 return (client->noClientException);
133@@ -186,6 +188,7 @@
134
135 memset (&rep, 0, sizeof (rep));
136 rep.type = X_Reply;
137+ rep.length = 0;
138 rep.sequenceNumber = client->sequence;
139 rep.x = stuff->x;
140 rep.y = stuff->y;
141@@ -198,6 +201,7 @@
142
143 swaps (&rep.x, n);
144 swaps (&rep.y, n);
145+ swapl (&rep.length, n);
146 }
147 WriteToClient(client, sizeof (rep), (char *) &rep);
148 return (client->noClientException);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch
new file mode 100644
index 0000000000..14cf99055b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/extra-kmodes.patch
@@ -0,0 +1,83 @@
1Add some extra video modes and change the default to VGA.
2
3---
4 hw/kdrive/src/kmode.c | 41 +++++++++++++++++++++++++++++++++++++++--
5 1 file changed, 39 insertions(+), 2 deletions(-)
6
7Index: xorg-server-1.3.0.0/hw/kdrive/src/kmode.c
8===================================================================
9--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kmode.c 2008-01-11 14:20:47.000000000 +0000
10+++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2008-01-11 14:21:18.000000000 +0000
11@@ -32,6 +32,31 @@ const KdMonitorTiming kdMonitorTimings[
12 /* H V Hz KHz */
13 /* FP BP BLANK POLARITY */
14
15+ /* Treo 650 */
16+
17+ { 320, 320, 64, 16256,
18+ 17, 12, 32, KdSyncNegative,
19+ 1, 11, 14, KdSyncNegative,
20+ },
21+
22+ { 320, 320, 64, 0,
23+ 0, 0, 0, KdSyncNegative,
24+ 0, 0, 0, KdSyncNegative,
25+ },
26+
27+ /* LifeDrive/T3/TX modes */
28+
29+ { 320, 480, 64, 16256,
30+ 17, 12, 32, KdSyncNegative,
31+ 1, 11, 14, KdSyncNegative,
32+ },
33+
34+ { 480, 320, 64, 0,
35+ 0, 0, 0, KdSyncNegative,
36+ 0, 0, 0, KdSyncNegative,
37+ },
38+
39+
40 /* IPAQ modeline:
41 *
42 * Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254"
43@@ -41,6 +66,11 @@ const KdMonitorTiming kdMonitorTimings[
44 1, 11, 14, KdSyncNegative,
45 },
46
47+ { 240, 320, 64, 0,
48+ 0, 0, 0, KdSyncNegative,
49+ 0, 0, 0, KdSyncNegative,
50+ },
51+
52 /* Other VESA modes */
53 { 640, 350, 85, 31500, /* VESA */
54 32, 96, 192, KdSyncPositive, /* 26.413 */
55@@ -76,10 +106,19 @@ const KdMonitorTiming kdMonitorTimings[
56 16, 120, 176, KdSyncNegative, /* 37.861 */
57 1, 20, 24, KdSyncNegative, /* 72.809 */
58 },
59+ /* DEFAULT */
60+#define MONITOR_TIMING_DEFAULT 13
61 { 640, 480, 60, 25175, /* VESA */
62 16, 48, 160, KdSyncNegative, /* 31.469 */
63 10, 33, 45, KdSyncNegative, /* 59.940 */
64 },
65+
66+
67+ { 480, 640, 60, 0, /* VESA */
68+ 0, 0, 0, KdSyncNegative, /* 31.469 */
69+ 0, 0, 0, KdSyncNegative, /* 59.940 */
70+ },
71+
72
73 /* 800x600 modes */
74 { 800, 600, 85, 56250, /* VESA */
75@@ -90,8 +129,6 @@ const KdMonitorTiming kdMonitorTimings[
76 16, 160, 256, KdSyncPositive, /* 46.875 */
77 1, 21, 25, KdSyncPositive, /* 75.000 */
78 },
79- /* DEFAULT */
80-#define MONITOR_TIMING_DEFAULT 9
81 { 800, 600, 72, 50000, /* VESA */
82 56, 64, 240, KdSyncPositive, /* 48.077 */
83 37, 23, 66, KdSyncPositive, /* 72.188 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
new file mode 100644
index 0000000000..a5c22a5efc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fbdev_xrandr_ioctl.patch
@@ -0,0 +1,61 @@
1Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
2===================================================================
3--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
4+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
5@@ -498,6 +498,7 @@
6 KdScreenInfo *screen = pScreenPriv->screen;
7 FbdevScrPriv *scrpriv = screen->driver;
8 Bool wasEnabled = pScreenPriv->enabled;
9+ FbdevPriv *priv = screen->card->driver;
10 FbdevScrPriv oldscr;
11 int oldwidth;
12 int oldheight;
13@@ -525,11 +526,46 @@
14 oldheight = screen->height;
15 oldmmwidth = pScreen->mmWidth;
16 oldmmheight = pScreen->mmHeight;
17-
18+
19 /*
20 * Set new configuration
21 */
22-
23+
24+ if (newwidth != oldwidth || newheight != oldheight)
25+ {
26+ struct fb_var_screeninfo var;
27+ int k;
28+
29+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
30+
31+ if (k < 0)
32+ {
33+ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
34+ return FALSE;
35+ }
36+
37+ var.xres = newwidth;
38+ var.yres = newheight;
39+ var.activate = FB_ACTIVATE_NOW;
40+
41+ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
42+
43+ if (k >= 0)
44+ {
45+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
46+ {
47+ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
48+ close (priv->fd);
49+ return FALSE;
50+ }
51+ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
52+ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
53+ close (priv->fd);
54+ return FALSE;
55+ }
56+ }
57+ }
58+
59 scrpriv->randr = KdAddRotation (screen->randr, randr);
60
61 KdOffscreenSwapOut (screen->pScreen);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch
new file mode 100644
index 0000000000..eb98fb82c7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/fix-newer-xorg-headers.patch
@@ -0,0 +1,18 @@
1---
2 render/glyphstr.h | 1 +
3 1 file changed, 1 insertion(+)
4
5--- xorg-server-1.3.0.0.orig/render/glyphstr.h
6+++ xorg-server-1.3.0.0/render/glyphstr.h
7@@ -23,10 +23,11 @@
8 */
9
10 #ifndef _GLYPHSTR_H_
11 #define _GLYPHSTR_H_
12
13+#include <X11/X.h>
14 #include <X11/extensions/renderproto.h>
15 #include "picture.h"
16 #include "screenint.h"
17 #include "regionstr.h"
18 #include "miscstruct.h"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch
new file mode 100644
index 0000000000..73f30ee716
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/hide-cursor-and-ppm-root.patch
@@ -0,0 +1,308 @@
1Index: xorg-server-1.7.99.2/dix/window.c
2===================================================================
3--- xorg-server-1.7.99.2.orig/dix/window.c 2009-11-04 16:25:50.000000000 +0000
4+++ xorg-server-1.7.99.2/dix/window.c 2010-02-10 17:42:22.719078216 +0000
5@@ -179,6 +179,8 @@
6
7 #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
8
9+char* RootPPM = NULL;
10+
11 #ifdef DEBUG
12 /******
13 * PrintWindowTree
14@@ -304,6 +306,115 @@
15 #endif
16 }
17
18+static int
19+get_int(FILE *fp)
20+{
21+ int c = 0;
22+
23+ while ((c = getc(fp)) != EOF)
24+ {
25+ if (isspace(c))
26+ continue;
27+
28+ if (c == '#')
29+ while (c = getc(fp))
30+ if (c == EOF)
31+ return 0;
32+ else if (c == '\n')
33+ break;
34+
35+ if (isdigit(c))
36+ {
37+ int val = c - '0';
38+ while ((c = getc(fp)) && isdigit(c))
39+ val = (val * 10) + (c - '0');
40+ return val;
41+ }
42+ }
43+
44+ return 0;
45+}
46+
47+static unsigned char*
48+ppm_load (const char* path, int depth, int *width, int *height)
49+{
50+ FILE *fp;
51+ int max, n = 0, w, h, i, j, bytes_per_line;
52+ unsigned char *data, *res, h1, h2;
53+
54+ if (depth < 16 || depth > 32)
55+ return NULL;
56+
57+ if (depth > 16)
58+ depth = 32;
59+
60+ fp = fopen (path, "r");
61+ if (fp == NULL)
62+ return FALSE;
63+
64+ h1 = getc(fp);
65+ h2 = getc(fp);
66+
67+ /* magic is 'P6' for raw ppm */
68+ if (h1 != 'P' && h2 != '6')
69+ goto fail;
70+
71+ w = get_int(fp);
72+ h = get_int(fp);
73+
74+ if (w == 0 || h == 0)
75+ goto fail;
76+
77+ max = get_int(fp);
78+
79+ if (max != 255)
80+ goto fail;
81+
82+ bytes_per_line = ((w * depth + 31) >> 5) << 2;
83+
84+ res = data = malloc(bytes_per_line * h);
85+
86+ for (i=0; i<h; i++)
87+ {
88+ for (j=0; j<w; j++)
89+ {
90+ unsigned char buf[3];
91+ fread(buf, 1, 3, fp);
92+
93+ switch (depth)
94+ {
95+ case 24:
96+ case 32:
97+ *data = buf[2];
98+ *(data+1) = buf[1];
99+ *(data+2) = buf[0];
100+ data += 4;
101+ break;
102+ case 16:
103+ default:
104+ *(unsigned short*)data
105+ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3);
106+ data += 2;
107+ break;
108+ }
109+ }
110+ data += (bytes_per_line - (w*(depth>>3)));
111+ }
112+
113+ data = res;
114+
115+ *width = w;
116+ *height = h;
117+
118+ fclose(fp);
119+
120+ return res;
121+
122+ fail:
123+ fclose(fp);
124+ return NULL;
125+}
126+
127 static void
128 MakeRootTile(WindowPtr pWin)
129 {
130@@ -314,6 +425,36 @@
131 unsigned char *from, *to;
132 int i, j;
133
134+ if (RootPPM != NULL)
135+ {
136+ int w, h;
137+ unsigned char *data;
138+
139+ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL)
140+ {
141+ pWin->background.pixmap
142+ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth, 0);
143+
144+ pWin->backgroundState = BackgroundPixmap;
145+ pGC = GetScratchGC(pScreen->rootDepth, pScreen);
146+ if (!pWin->background.pixmap || !pGC)
147+ FatalError("could not create root tile");
148+
149+ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
150+
151+ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap,
152+ pGC,
153+ pScreen->rootDepth,
154+ 0, 0, w, h, 0, ZPixmap, (char *)data);
155+ FreeScratchGC(pGC);
156+
157+ free(data);
158+ return;
159+ }
160+ else
161+ ErrorF("Unable to load root window image.");
162+ }
163+
164 pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
165 pScreen->rootDepth, 0);
166
167@@ -530,6 +671,7 @@
168 }
169
170
171+
172 WindowPtr
173 RealChildHead(WindowPtr pWin)
174 {
175Index: xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c
176===================================================================
177--- xorg-server-1.7.99.2.orig/hw/kdrive/src/kdrive.c 2010-02-10 17:36:36.000000000 +0000
178+++ xorg-server-1.7.99.2/hw/kdrive/src/kdrive.c 2010-02-10 17:43:07.797828099 +0000
179@@ -60,6 +60,9 @@
180 { 32, 32 }
181 };
182
183+int
184+ProcXFixesHideCursor (ClientPtr client) ;
185+
186 #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0]))
187
188 #define KD_DEFAULT_BUTTONS 5
189@@ -92,6 +95,9 @@
190
191 KdOsFuncs *kdOsFuncs;
192
193+extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */
194+extern char* RootPPM; /* dix/window.c */
195+
196 void
197 KdSetRootClip (ScreenPtr pScreen, BOOL enable)
198 {
199@@ -275,6 +281,7 @@
200 KdSetRootClip (pScreen, TRUE);
201 if (pScreenPriv->card->cfuncs->dpms)
202 (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
203+
204 return TRUE;
205 }
206
207@@ -553,6 +560,8 @@
208 ErrorF("-switchCmd Command to execute on vt switch\n");
209 ErrorF("-zap Terminate server on Ctrl+Alt+Backspace\n");
210 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
211+ ErrorF("-hide-cursor Start with cursor hidden\n");
212+ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n");
213 }
214
215 int
216@@ -616,6 +625,19 @@
217 kdSoftCursor = TRUE;
218 return 1;
219 }
220+ if (!strcmp (argv[i], "-hide-cursor"))
221+ {
222+ CursorInitiallyHidden = TRUE;
223+ return 1;
224+ }
225+ if (!strcmp (argv[i], "-root-ppm"))
226+ {
227+ if ((i+1) < argc)
228+ RootPPM = argv[i+1];
229+ else
230+ UseMsg ();
231+ return 2;
232+ }
233 if (!strcmp (argv[i], "-videoTest"))
234 {
235 kdVideoTest = TRUE;
236Index: xorg-server-1.7.99.2/xfixes/cursor.c
237===================================================================
238--- xorg-server-1.7.99.2.orig/xfixes/cursor.c 2009-12-19 01:43:53.000000000 +0000
239+++ xorg-server-1.7.99.2/xfixes/cursor.c 2010-02-10 17:45:02.089079491 +0000
240@@ -57,6 +57,7 @@
241 static RESTYPE CursorClientType;
242 static RESTYPE CursorHideCountType;
243 static RESTYPE CursorWindowType;
244+static Bool CursorGloballyHidden;
245 static CursorPtr CursorCurrent[MAXDEVICES];
246 static CursorPtr pInvisibleCursor = NULL;
247
248@@ -65,6 +66,8 @@
249
250 static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
251
252+Bool CursorInitiallyHidden = FALSE;
253+
254 #define VERIFY_CURSOR(pCursor, cursor, client, access) \
255 do { \
256 int err; \
257@@ -150,7 +153,7 @@
258 if (ConnectionInfo)
259 CursorVisible = EnableCursor;
260
261- if (cs->pCursorHideCounts != NULL || !CursorVisible) {
262+ if (cs->pCursorHideCounts != NULL || !CursorVisible || CursorGloballyHidden) {
263 ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
264 (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
265 } else {
266@@ -887,6 +890,12 @@
267 return (ret == BadValue) ? BadWindow : ret;
268 }
269
270+ /* Is cursor set to be initially hidden ?, if so reset this
271+ * flag as now visibility assumed under control of client.
272+ */
273+ if (CursorGloballyHidden)
274+ CursorGloballyHidden = FALSE;
275+
276 /*
277 * Has client hidden the cursor before on this screen?
278 * If so, just increment the count.
279@@ -950,9 +959,19 @@
280 return (rc == BadValue) ? BadWindow : rc;
281 }
282
283+ /* X was started with cursor hidden, therefore just reset our flag
284+ * (returning to normal client control) and cause cursor to now be
285+ * shown.
286+ */
287+ if (CursorGloballyHidden == TRUE)
288+ {
289+ CursorGloballyHidden = FALSE;
290+ return (client->noClientException);
291+ }
292+
293 /*
294 * Has client hidden the cursor on this screen?
295- * If not, generate an error.
296+ * If so, generate an error.
297 */
298 pChc = findCursorHideCount(client, pWin->drawable.pScreen);
299 if (pChc == NULL) {
300@@ -1068,6 +1087,8 @@
301 {
302 int i;
303
304+ CursorGloballyHidden = CursorInitiallyHidden;
305+
306 if (party_like_its_1989)
307 CursorVisible = EnableCursor;
308
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch
new file mode 100644
index 0000000000..2dc22bf50e
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-evdev.patch
@@ -0,0 +1,515 @@
1# Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at
2# http://lists.freedesktop.org/archives/xorg/2005-December/011635.html
3diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c
4--- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200
5+++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200
6@@ -31,9 +31,11 @@
7 #include <X11/X.h>
8 #include <X11/Xproto.h>
9 #include <X11/Xpoll.h>
10+#include <X11/keysym.h>
11 #include "inputstr.h"
12 #include "scrnintstr.h"
13 #include "kdrive.h"
14+#include "kkeymap.h"
15
16 #define NUM_EVENTS 128
17 #define ABS_UNSET -65535
18@@ -105,9 +107,10 @@
19 {
20 KdMouseInfo *mi = closure;
21 Kevdev *ke = mi->driver;
22- int i;
23+ int i, j;
24 struct input_event events[NUM_EVENTS];
25 int n;
26+ int flags;
27
28 n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event));
29 if (n <= 0)
30@@ -115,22 +118,64 @@
31 n /= sizeof (struct input_event);
32 for (i = 0; i < n; i++)
33 {
34+ flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState;
35 switch (events[i].type) {
36 case EV_SYN:
37 break;
38 case EV_KEY:
39- EvdevMotion (mi);
40- ASSIGNBIT(ke->key,events[i].code, events[i].value);
41- if (events[i].code < 0x100)
42- ErrorF ("key %d %d\n", events[i].code, events[i].value);
43- else
44- ErrorF ("key 0x%x %d\n", events[i].code, events[i].value);
45+ if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) {
46+ switch (events[i].code) {
47+ case BTN_LEFT:
48+ if (events[i].value == 1)
49+ flags |= KD_BUTTON_1;
50+ else
51+ flags &= ~KD_BUTTON_1;
52+ break;
53+ case BTN_MIDDLE:
54+ if (events[i].value == 1)
55+ flags |= KD_BUTTON_2;
56+ else
57+ flags &= ~KD_BUTTON_2;
58+ break;
59+ case BTN_RIGHT:
60+ if (events[i].value == 1)
61+ flags |= KD_BUTTON_3;
62+ else
63+ flags &= ~KD_BUTTON_3;
64+ break;
65+ default:
66+ /* Unknow button */
67+ break;
68+ }
69+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
70+ }
71 break;
72 case EV_REL:
73- ke->rel[events[i].code] += events[i].value;
74+ if (events[i].code == REL_X) {
75+ KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0);
76+ }
77+ else if (events[i].code == REL_Y) {
78+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value);
79+ }
80+ else if (events[i].code == REL_WHEEL) {
81+ for (j = 0; j < abs (events[i].value); j++) {
82+ if (events[i].value > 0)
83+ flags |= KD_BUTTON_4;
84+ else
85+ flags |= KD_BUTTON_5;
86+
87+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
88+
89+ if (events[i].value > 0)
90+ flags &= ~KD_BUTTON_4;
91+ else
92+ flags &= ~KD_BUTTON_5;
93+
94+ KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0);
95+ } /* events[i].code == REL_WHEEL */
96+ }
97 break;
98 case EV_ABS:
99- ke->abs[events[i].code] = events[i].value;
100 break;
101 }
102 }
103@@ -173,6 +218,12 @@
104 fd = open (kdefaultEvdev[i], 2);
105 if (fd >= 0)
106 {
107+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
108+ {
109+ close (fd);
110+ continue;
111+ }
112+
113 mi->name = KdSaveString (kdefaultEvdev[i]);
114 break;
115 }
116@@ -287,7 +338,319 @@
117 EvdevFini,
118 };
119
120-#if 0
121+/* Keyboard */
122+
123+int kbd_fd = -1;
124+int EvdevInputType = 0;
125+
126+KeySym evdevKeymap[(194 - 1 + 1) * 2] = {
127+/* These are directly mapped from DOS scanset 0 */
128+/* 1 8 */ XK_Escape, NoSymbol,
129+/* 2 9 */ XK_1, XK_exclam,
130+/* 3 10 */ XK_2, XK_at,
131+/* 4 11 */ XK_3, XK_numbersign,
132+/* 5 12 */ XK_4, XK_dollar,
133+/* 6 13 */ XK_5, XK_percent,
134+/* 7 14 */ XK_6, XK_asciicircum,
135+/* 8 15 */ XK_7, XK_ampersand,
136+/* 9 16 */ XK_8, XK_asterisk,
137+/* 10 17 */ XK_9, XK_parenleft,
138+/* 11 18 */ XK_0, XK_parenright,
139+/* 12 19 */ XK_minus, XK_underscore,
140+/* 13 20 */ XK_equal, XK_plus,
141+/* 14 21 */ XK_BackSpace, NoSymbol,
142+/* 15 22 */ XK_Tab, NoSymbol,
143+/* 16 23 */ XK_Q, NoSymbol,
144+/* 17 24 */ XK_W, NoSymbol,
145+/* 18 25 */ XK_E, NoSymbol,
146+/* 19 26 */ XK_R, NoSymbol,
147+/* 20 27 */ XK_T, NoSymbol,
148+/* 21 28 */ XK_Y, NoSymbol,
149+/* 22 29 */ XK_U, NoSymbol,
150+/* 23 30 */ XK_I, NoSymbol,
151+/* 24 31 */ XK_O, NoSymbol,
152+/* 25 32 */ XK_P, NoSymbol,
153+/* 26 33 */ XK_bracketleft, XK_braceleft,
154+/* 27 34 */ XK_bracketright, XK_braceright,
155+/* 28 35 */ XK_Return, NoSymbol,
156+/* 29 36 */ XK_Control_L, NoSymbol,
157+/* 30 37 */ XK_A, NoSymbol,
158+/* 31 38 */ XK_S, NoSymbol,
159+/* 32 39 */ XK_D, NoSymbol,
160+/* 33 40 */ XK_F, NoSymbol,
161+/* 34 41 */ XK_G, NoSymbol,
162+/* 35 42 */ XK_H, NoSymbol,
163+/* 36 43 */ XK_J, NoSymbol,
164+/* 37 44 */ XK_K, NoSymbol,
165+/* 38 45 */ XK_L, NoSymbol,
166+/* 39 46 */ XK_semicolon, XK_colon,
167+/* 40 47 */ XK_apostrophe, XK_quotedbl,
168+/* 41 48 */ XK_grave, XK_asciitilde,
169+/* 42 49 */ XK_Shift_L, NoSymbol,
170+/* 43 50 */ XK_backslash, XK_bar,
171+/* 44 51 */ XK_Z, NoSymbol,
172+/* 45 52 */ XK_X, NoSymbol,
173+/* 46 53 */ XK_C, NoSymbol,
174+/* 47 54 */ XK_V, NoSymbol,
175+/* 48 55 */ XK_B, NoSymbol,
176+/* 49 56 */ XK_N, NoSymbol,
177+/* 50 57 */ XK_M, NoSymbol,
178+/* 51 58 */ XK_comma, XK_less,
179+/* 52 59 */ XK_period, XK_greater,
180+/* 53 60 */ XK_slash, XK_question,
181+/* 54 61 */ XK_Shift_R, NoSymbol,
182+/* 55 62 */ XK_KP_Multiply, NoSymbol,
183+/* 56 63 */ XK_Alt_L, XK_Meta_L,
184+/* 57 64 */ XK_space, NoSymbol,
185+/* 58 65 */ XK_Caps_Lock, NoSymbol,
186+/* 59 66 */ XK_F1, NoSymbol,
187+/* 60 67 */ XK_F2, NoSymbol,
188+/* 61 68 */ XK_F3, NoSymbol,
189+/* 62 69 */ XK_F4, NoSymbol,
190+/* 63 70 */ XK_F5, NoSymbol,
191+/* 64 71 */ XK_F6, NoSymbol,
192+/* 65 72 */ XK_F7, NoSymbol,
193+/* 66 73 */ XK_F8, NoSymbol,
194+/* 67 74 */ XK_F9, NoSymbol,
195+/* 68 75 */ XK_F10, NoSymbol,
196+/* 69 76 */ XK_Break, XK_Pause,
197+/* 70 77 */ XK_Scroll_Lock, NoSymbol,
198+/* 71 78 */ XK_KP_Home, XK_KP_7,
199+/* 72 79 */ XK_KP_Up, XK_KP_8,
200+/* 73 80 */ XK_KP_Page_Up, XK_KP_9,
201+/* 74 81 */ XK_KP_Subtract, NoSymbol,
202+/* 75 82 */ XK_KP_Left, XK_KP_4,
203+/* 76 83 */ XK_KP_5, NoSymbol,
204+/* 77 84 */ XK_KP_Right, XK_KP_6,
205+/* 78 85 */ XK_KP_Add, NoSymbol,
206+/* 79 86 */ XK_KP_End, XK_KP_1,
207+/* 80 87 */ XK_KP_Down, XK_KP_2,
208+/* 81 88 */ XK_KP_Page_Down, XK_KP_3,
209+/* 82 89 */ XK_KP_Insert, XK_KP_0,
210+/* 83 90 */ XK_KP_Delete, XK_KP_Decimal,
211+/* 84 91 */ NoSymbol, NoSymbol,
212+/* 85 92 */ NoSymbol, NoSymbol,
213+/* 86 93 */ NoSymbol, NoSymbol,
214+/* 87 94 */ XK_F11, NoSymbol,
215+/* 88 95 */ XK_F12, NoSymbol,
216+
217+/* These are remapped from the extended set (using ExtendMap) */
218+
219+/* 89 96 */ XK_Control_R, NoSymbol,
220+/* 90 97 */ XK_KP_Enter, NoSymbol,
221+/* 91 98 */ XK_KP_Divide, NoSymbol,
222+/* 92 99 */ XK_Sys_Req, XK_Print,
223+/* 93 100 */ XK_Alt_R, XK_Meta_R,
224+/* 94 101 */ XK_Num_Lock, NoSymbol,
225+/* 95 102 */ XK_Home, NoSymbol,
226+/* 96 103 */ XK_Up, NoSymbol,
227+/* 97 104 */ XK_Page_Up, NoSymbol,
228+/* 98 105 */ XK_Left, NoSymbol,
229+/* 99 106 */ XK_Right, NoSymbol,
230+/* 100 107 */ XK_End, NoSymbol,
231+/* 101 108 */ XK_Down, NoSymbol,
232+/* 102 109 */ XK_Page_Down, NoSymbol,
233+/* 103 110 */ XK_Insert, NoSymbol,
234+/* 104 111 */ XK_Delete, NoSymbol,
235+/* 105 112 */ XK_Super_L, NoSymbol,
236+/* 106 113 */ XK_Super_R, NoSymbol,
237+/* 107 114 */ XK_Menu, NoSymbol,
238+/* 108 115 */ NoSymbol, NoSymbol,
239+/* 109 116 */ NoSymbol, NoSymbol,
240+/* 110 117 */ NoSymbol, NoSymbol,
241+/* 111 118 */ NoSymbol, NoSymbol,
242+/* 112 119 */ NoSymbol, NoSymbol,
243+
244+/* 113 120 */ NoSymbol, NoSymbol,
245+/* 114 121 */ NoSymbol, NoSymbol,
246+/* 115 122 */ NoSymbol, NoSymbol,
247+/* 116 123 */ NoSymbol, NoSymbol,
248+/* 117 124 */ NoSymbol, NoSymbol,
249+/* 118 125 */ NoSymbol, NoSymbol,
250+/* 119 126 */ NoSymbol, NoSymbol,
251+/* 120 127 */ NoSymbol, NoSymbol,
252+/* 121 128 */ NoSymbol, NoSymbol,
253+/* 122 129 */ NoSymbol, NoSymbol,
254+/* 123 130 */ NoSymbol, NoSymbol,
255+/* 124 131 */ NoSymbol, NoSymbol,
256+/* 125 132 */ NoSymbol, NoSymbol,
257+/* 126 133 */ NoSymbol, NoSymbol,
258+/* 127 134 */ NoSymbol, NoSymbol,
259+/* 128 135 */ NoSymbol, NoSymbol,
260+/* 129 136 */ NoSymbol, NoSymbol,
261+/* 130 137 */ NoSymbol, NoSymbol,
262+/* 131 138 */ NoSymbol, NoSymbol,
263+/* 132 139 */ NoSymbol, NoSymbol,
264+/* 133 140 */ NoSymbol, NoSymbol,
265+/* 134 141 */ NoSymbol, NoSymbol,
266+/* 135 142 */ NoSymbol, NoSymbol,
267+/* 136 143 */ NoSymbol, NoSymbol,
268+/* 137 144 */ NoSymbol, NoSymbol,
269+/* 138 145 */ NoSymbol, NoSymbol,
270+/* 139 146 */ NoSymbol, NoSymbol,
271+/* 140 147 */ NoSymbol, NoSymbol,
272+/* 141 148 */ NoSymbol, NoSymbol,
273+/* 142 149 */ NoSymbol, NoSymbol,
274+/* 143 150 */ NoSymbol, NoSymbol,
275+/* 144 151 */ NoSymbol, NoSymbol,
276+/* 145 152 */ NoSymbol, NoSymbol,
277+/* 146 153 */ NoSymbol, NoSymbol,
278+/* 147 154 */ NoSymbol, NoSymbol,
279+/* 148 155 */ NoSymbol, NoSymbol,
280+/* 149 156 */ NoSymbol, NoSymbol,
281+/* 150 157 */ NoSymbol, NoSymbol,
282+/* 151 158 */ NoSymbol, NoSymbol,
283+/* 152 159 */ NoSymbol, NoSymbol,
284+/* 153 160 */ NoSymbol, NoSymbol,
285+/* 154 161 */ NoSymbol, NoSymbol,
286+/* 155 162 */ NoSymbol, NoSymbol,
287+/* 156 163 */ NoSymbol, NoSymbol,
288+/* 157 164 */ NoSymbol, NoSymbol,
289+/* 158 165 */ NoSymbol, NoSymbol,
290+/* 159 166 */ NoSymbol, NoSymbol,
291+/* 160 167 */ NoSymbol, NoSymbol,
292+/* 161 168 */ NoSymbol, NoSymbol,
293+/* 162 169 */ NoSymbol, NoSymbol,
294+/* 163 170 */ NoSymbol, NoSymbol,
295+/* 164 171 */ NoSymbol, NoSymbol,
296+/* 165 172 */ NoSymbol, NoSymbol,
297+/* 166 173 */ NoSymbol, NoSymbol,
298+/* 167 174 */ NoSymbol, NoSymbol,
299+/* 168 175 */ NoSymbol, NoSymbol,
300+/* 169 176 */ NoSymbol, NoSymbol,
301+/* 170 177 */ NoSymbol, NoSymbol,
302+/* 171 178 */ NoSymbol, NoSymbol,
303+/* 172 179 */ NoSymbol, NoSymbol,
304+/* 173 180 */ NoSymbol, NoSymbol,
305+/* 174 181 */ NoSymbol, NoSymbol,
306+/* 175 182 */ NoSymbol, NoSymbol,
307+/* 176 183 */ NoSymbol, NoSymbol,
308+/* 177 184 */ NoSymbol, NoSymbol,
309+/* 178 185 */ NoSymbol, NoSymbol,
310+/* 179 186 */ NoSymbol, NoSymbol,
311+/* 180 187 */ NoSymbol, NoSymbol,
312+/* 181 188 */ NoSymbol, NoSymbol,
313+/* 182 189 */ NoSymbol, NoSymbol,
314+/* 183 190 */ NoSymbol, NoSymbol,
315+/* 184 191 */ NoSymbol, NoSymbol,
316+/* 185 192 */ NoSymbol, NoSymbol,
317+/* 186 193 */ NoSymbol, NoSymbol,
318+/* 187 194 */ NoSymbol, NoSymbol,
319+/* 188 195 */ NoSymbol, NoSymbol,
320+/* 189 196 */ NoSymbol, NoSymbol,
321+/* 190 197 */ NoSymbol, NoSymbol,
322+/* 191 198 */ NoSymbol, NoSymbol,
323+/* 192 199 */ NoSymbol, NoSymbol,
324+/* 193 200 */ NoSymbol, NoSymbol,
325+/* 194 201 */ NoSymbol, NoSymbol,
326+};
327+
328+static void
329+EvdevKbdRead (int fd, void *closure)
330+{
331+ int i, n;
332+ struct input_event events[NUM_EVENTS];
333+
334+ n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event));
335+ if (n <= 0)
336+ return;
337+
338+ n /= sizeof (struct input_event);
339+
340+ for (i = 0; i < n; i++)
341+ {
342+ if (events[i].type == EV_KEY)
343+ KdEnqueueKeyboardEvent (events[i].code, !events[i].value);
344+ }
345+}
346+
347+static void
348+EvdevKbdLoad (void)
349+{
350+ kdMinScanCode = 0;
351+ kdMaxScanCode = 193;
352+ kdKeymapWidth = 2;
353+ memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap));
354+}
355+
356+static int
357+EvdevKbdInit (void)
358+{
359+ int fd, i;
360+
361+ if (!EvdevInputType)
362+ EvdevInputType = KdAllocInputType ();
363+
364+ if (!kdKeyboard)
365+ {
366+ for (i = 0; i < NUM_DEFAULT_EVDEV; i++)
367+ {
368+ fd = open (kdefaultEvdev[i], 2);
369+ if (fd >= 0)
370+ {
371+ kdKeyboard = KdSaveString (kdefaultEvdev[i]);
372+ break;
373+ }
374+ }
375+ }
376+ else
377+ {
378+ fd = open (kdKeyboard, O_RDWR);
379+ if (fd < 0)
380+ return FALSE;
381+ }
382+
383+ if (ioctl (fd, EVIOCGRAB, 1) < 0)
384+ {
385+ close (fd);
386+ return FALSE;
387+ }
388+
389+ if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL))
390+ return FALSE;
391+
392+ kbd_fd = fd;
393+ return TRUE;
394+}
395+
396+static void
397+EvdevKbdFini (void)
398+{
399+}
400+
401+static void
402+EvdevKbdLeds (int leds)
403+{
404+ struct input_event event;
405+
406+ memset(&event, 0, sizeof(event));
407+
408+ event.type = EV_LED;
409+ event.code = LED_CAPSL;
410+ event.value = leds & (1 << 0) ? 1 : 0;
411+ write(kbd_fd, (char *) &event, sizeof(event));
412+
413+ event.type = EV_LED;
414+ event.code = LED_NUML;
415+ event.value = leds & (1 << 1) ? 1 : 0;
416+ write(kbd_fd, (char *) &event, sizeof(event));
417+
418+ event.type = EV_LED;
419+ event.code = LED_SCROLLL;
420+ event.value = leds & (1 << 2) ? 1 : 0;
421+ write(kbd_fd, (char *) &event, sizeof(event));
422+
423+ event.type = EV_LED;
424+ event.code = LED_COMPOSE;
425+ event.value = leds & (1 << 3) ? 1 : 0;
426+ write(kbd_fd, (char *) &event, sizeof(event));
427+}
428+
429+static void
430+EvdevKbdBell (int volume, int frequency, int duration)
431+{
432+}
433+
434 KdKeyboardFuncs LinuxEvdevKeyboardFuncs = {
435 EvdevKbdLoad,
436 EvdevKbdInit,
437@@ -296,4 +659,4 @@
438 EvdevKbdFini,
439 0,
440 };
441-#endif
442+
443diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c
444--- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200
445+++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200
446@@ -73,6 +73,7 @@
447 Bool kdEnabled;
448 int kdSubpixelOrder;
449 int kdVirtualTerminal = -1;
450+char *kdKeyboard = 0;
451 Bool kdSwitchPending;
452 char *kdSwitchCmd;
453 DDXPointRec kdOrigin;
454@@ -795,6 +796,14 @@
455 UseMsg ();
456 return 2;
457 }
458+ if (!strcmp (argv[i], "-keyboard"))
459+ {
460+ if ((i+1) < argc)
461+ kdKeyboard = argv[i+1];
462+ else
463+ UseMsg ();
464+ return 2;
465+ }
466 if (!strcmp (argv[i], "-rgba"))
467 {
468 if ((i+1) < argc)
469diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h
470--- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200
471+++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200
472@@ -416,6 +416,7 @@
473 extern Bool kdDisableZaphod;
474 extern Bool kdDontZap;
475 extern int kdVirtualTerminal;
476+extern char *kdKeyboard;
477 extern char *kdSwitchCmd;
478 extern KdOsFuncs *kdOsFuncs;
479
480@@ -769,7 +770,7 @@
481 ProcessInputEvents (void);
482
483 extern KdMouseFuncs LinuxMouseFuncs;
484-extern KdMouseFuncs LinuxEvdevFuncs;
485+extern KdMouseFuncs LinuxEvdevMouseFuncs;
486 extern KdMouseFuncs Ps2MouseFuncs;
487 extern KdMouseFuncs BusMouseFuncs;
488 extern KdMouseFuncs MsMouseFuncs;
489@@ -777,6 +778,7 @@
490 extern KdMouseFuncs TsFuncs;
491 #endif
492 extern KdKeyboardFuncs LinuxKeyboardFuncs;
493+extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs;
494 extern KdOsFuncs LinuxFuncs;
495
496 extern KdMouseFuncs VxWorksMouseFuncs;
497diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c
498--- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200
499+++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200
500@@ -1300,6 +1300,7 @@
501 xE.u.u.type = KeyPress;
502 xE.u.u.detail = key_code;
503
504+#ifndef XKB
505 switch (KEYCOL1(key_code))
506 {
507 case XK_Num_Lock:
508@@ -1313,6 +1314,7 @@
509 else
510 xE.u.u.type = KeyPress;
511 }
512+#endif
513
514 /*
515 * Check pressed keys which are already down
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch
new file mode 100644
index 0000000000..28d7325601
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/kdrive-use-evdev.patch
@@ -0,0 +1,54 @@
1--- xserver/hw/kdrive/fbdev/fbinit.c~ 2006-01-31 17:09:33.000000000 +0100
2+++ xserver/hw/kdrive/fbdev/fbinit.c 2006-01-31 17:11:55.000000000 +0100
3@@ -28,6 +28,8 @@
4 #endif
5 #include <fbdev.h>
6
7+extern int use_evdev;
8+
9 void
10 InitCard (char *name)
11 {
12@@ -45,7 +47,10 @@
13 void
14 InitInput (int argc, char **argv)
15 {
16- KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
17+ if (use_evdev)
18+ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
19+ else
20+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
21 #ifdef TOUCHSCREEN
22 KdAddMouseDriver (&TsFuncs);
23 #endif
24--- xserver/hw/kdrive/src/kdrive.c.orig 2006-01-31 17:13:28.000000000 +0100
25+++ xserver/hw/kdrive/src/kdrive.c 2006-01-31 17:15:28.000000000 +0100
26@@ -44,6 +44,8 @@
27 #include "dpmsproc.h"
28 #endif
29
30+int use_evdev = 0;
31+
32 typedef struct _kdDepths {
33 CARD8 depth;
34 CARD8 bpp;
35@@ -687,6 +689,7 @@
36 ErrorF("-videoTest Start the server, pause momentarily and exit\n");
37 ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
38 ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
39+ ErrorF("-use-evdev Use Linux evdev input\n");
40 ErrorF("-switchCmd Command to execute on vt switch\n");
41 ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
42 ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
43@@ -796,6 +799,11 @@
44 UseMsg ();
45 return 2;
46 }
47+ if (!strcmp (argv[i], "-use-evdev"))
48+ {
49+ use_evdev = 1;
50+ return 1;
51+ }
52 if (!strcmp (argv[i], "-keyboard"))
53 {
54 if ((i+1) < argc)
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch
new file mode 100644
index 0000000000..d614b547a8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/keyboard-resume-workaround.patch
@@ -0,0 +1,25 @@
1Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
2===================================================================
3--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c 2007-09-29 18:31:15.000000000 +0200
4+++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
5@@ -486,6 +486,8 @@
6 ki->minScanCode = minKeyCode;
7 ki->maxScanCode = maxKeyCode;
8 #endif
9+ ki->minScanCode = 0;
10+ ki->maxScanCode = NR_KEYS;
11 }
12
13 /*
14@@ -743,11 +743,6 @@
15 cfsetispeed(&nTty, 9600);
16 cfsetospeed(&nTty, 9600);
17 tcsetattr(fd, TCSANOW, &nTty);
18- /*
19- * Flush any pending keystrokes
20- */
21- while ((n = read (fd, buf, sizeof (buf))) > 0)
22- ;
23 KdRegisterFd (fd, LinuxKeyboardRead, ki);
24 return Success;
25 }
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch
new file mode 100644
index 0000000000..35ccadaa8d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/no-serial-probing.patch
@@ -0,0 +1,13 @@
1--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
2+++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
3@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
4 "/dev/psaux",
5 "/dev/input/mice",
6 "/dev/adbmouse",
7+#ifdef BREAK_MY_SERIAL_CONSOLE
8 "/dev/ttyS0",
9 "/dev/ttyS1",
10+#endif
11 };
12
13 #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch
new file mode 100644
index 0000000000..6b34032a39
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/nodolt.patch
@@ -0,0 +1,12 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
4+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
5@@ -62,7 +62,6 @@
6 AC_LIBTOOL_WIN32_DLL
7 AC_DISABLE_STATIC
8 AC_PROG_LIBTOOL
9-DOLT
10 AC_PROG_MAKE_SET
11 PKG_PROG_PKG_CONFIG
12 AC_PROG_LEX
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch
new file mode 100644
index 0000000000..a580b500b7
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.7.99.2/optional-xkb.patch
@@ -0,0 +1,58 @@
1Index: xorg-server-1.2.0/Makefile.am
2===================================================================
3--- xorg-server-1.2.0.orig/Makefile.am 2007-01-23 06:39:15.000000000 +0100
4+++ xorg-server-1.2.0/Makefile.am 2007-03-28 20:26:19.000000000 +0200
5@@ -30,6 +30,10 @@
6 XINPUT_DIR=Xi
7 endif
8
9+if XKB
10+XKB_DIR=xkb
11+endif
12+
13 if DBE
14 DBE_DIR=dbe
15 endif
16@@ -46,7 +50,7 @@
17 randr \
18 render \
19 $(XINPUT_DIR) \
20- xkb \
21+ $(XKB_DIR) \
22 $(DBE_DIR) \
23 $(MFB_DIR) \
24 $(AFB_DIR) \
25Index: xorg-server-1.2.0/configure.ac
26===================================================================
27--- xorg-server-1.2.0.orig/configure.ac 2007-01-23 06:39:15.000000000 +0100
28+++ xorg-server-1.2.0/configure.ac 2007-03-28 20:27:13.000000000 +0200
29@@ -428,6 +428,7 @@
30 AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
31 AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
32 AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
33+AC_ARG_ENABLE(xkb, AS_HELP_STRING([--disable-xkb], [Build XKB (default: enabled)]), [XKB=$enableval], [XKB=yes])
34
35 dnl DDXes.
36 AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
37@@ -754,12 +755,15 @@
38
39 AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
40
41-AC_DEFINE(XKB, 1, [Build XKB])
42-AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
43-AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
44-REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
45-XKB_LIB='$(top_builddir)/xkb/libxkb.la'
46-XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
47+AM_CONDITIONAL(XKB, [test "x$XKB" = xyes])
48+if test "x$XKB" = xyes; then
49+ AC_DEFINE(XKB, 1, [Build XKB])
50+ AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server])
51+ AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default])
52+ REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
53+ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
54+ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
55+fi
56
57 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
58 [Do not have `strcasecmp'.]))
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive.inc b/meta/recipes-graphics/xorg-xserver/xserver-kdrive.inc
new file mode 100644
index 0000000000..8c93127657
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive.inc
@@ -0,0 +1,107 @@
1LICENSE = "MIT"
2DEPENDS = "compositeproto damageproto fixesproto recordproto resourceproto scrnsaverproto xineramaproto videoproto xextproto xproto \
3 libxau libxext libxdmcp libxfont libxrandr tslib virtual/libx11 xtrans bigreqsproto xcmiscproto"
4
5PROVIDES = "virtual/xserver"
6PACKAGES =+ "xserver-kdrive-fbdev \
7 xserver-kdrive-sdl \
8 xserver-kdrive-fake \
9 xserver-kdrive-xephyr \
10 xserver-kdrive-epson \
11 xserver-kdrive-ati \
12 xserver-kdrive-chips \
13 xserver-kdrive-i810 \
14 xserver-kdrive-mach64 \
15 xserver-kdrive-mga \
16 xserver-kdrive-neomagic \
17 xserver-kdrive-nvidia \
18 xserver-kdrive-pm2 \
19 xserver-kdrive-r128 \
20 xserver-kdrive-smi \
21 xserver-kdrive-vesa \
22 xserver-kdrive-via \
23 xserver-kdrive-w100 \
24 "
25
26SECTION = "x11/base"
27DESCRIPTION = "X server from freedesktop.org"
28DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices"
29DESCRIPTION_xserver-kdrive-fake = "Fake X server"
30DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window"
31DESCRIPTION_xserver-kdrive-epson = "X server from freedesktop.org, supporting Epson S1D13806 devices"
32DESCRIPTION_xserver-kdrive-sdl = "X server from freedesktop.org, SDL version"
33DESCRIPTION_xserver-kdrive-w100 = "X server from freedesktop.org, supporting the ATI imageon w100 chipset"
34DESCRIPTION_xserver-kdrive-ati = "X server from freedesktop.org, supporting ATI devices"
35DESCRIPTION_xserver-kdrive-chips = "X server from freedesktop.org, supporting Chips chipsets"
36DESCRIPTION_xserver-kdrive-i810 = "X server from freedesktop.org, supporting Intel chipsets"
37DESCRIPTION_xserver-kdrive-imageon = "X server from freedesktop.org, supporting the ATI imageon 100 chipset"
38DESCRIPTION_xserver-kdrive-mach64 = "X server from freedesktop.org, supporting mach64 chipsets"
39DESCRIPTION_xserver-kdrive-mga = "X server from freedesktop.org, supporting mga chipsets"
40DESCRIPTION_xserver-kdrive-neomagic = "X server from freedesktop.org, supporting neomagic chipsets"
41DESCRIPTION_xserver-kdrive-nvidia = "X server from freedesktop.org, supporting nvidia devices"
42DESCRIPTION_xserver-kdrive-pm2 = "X server from freedesktop.org, supporting Permedia2 chipsets"
43DESCRIPTION_xserver-kdrive-r128 = "X server from freedesktop.org, supporting rage128 chipsets"
44DESCRIPTION_xserver-kdrive-smi = "X server from freedesktop.org, supporting Silicon Motion devices"
45DESCRIPTION_xserver-kdrive-vesa = "X server from freedesktop.org, supporting any card with a VESA, VGA or even EGA BIOS. x86 hardware only"
46DESCRIPTION_xserver-kdrive-via = "X server from freedesktop.org, supporting VIA chipsets"
47
48FILES_${PN} += "${libdir}/xserver/SecurityPolicy"
49ALLOW_EMPTY_${PN} = "1"
50
51FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev"
52FILES_xserver-kdrive-fake = "${bindir}/Xfake"
53FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr"
54FILES_xserver-kdrive-epson = "${bindir}/Xepson"
55FILES_xserver-kdrive-sdl = "${bindir}/Xsdl"
56FILES_xserver-kdrive-w100 = "${bindir}/Xw100"
57FILES_xserver-kdrive-ati = "${bindir}/Xati"
58FILES_xserver-kdrive-chips = "${bindir}/Xchips"
59FILES_xserver-kdrive-i810 = "${bindir}/Xi810"
60FILES_xserver-kdrive-imageon = "${bindir}/Ximageon"
61FILES_xserver-kdrive-mach64 = "${bindir}/Xmach64"
62FILES_xserver-kdrive-mga = "${bindir}/Xmga"
63FILES_xserver-kdrive-neomagic = "${bindir}/Xneomagic"
64FILES_xserver-kdrive-nvidia = "${bindir}/Xnvidia"
65FILES_xserver-kdrive-pm2 = "${bindir}/Xpm2"
66FILES_xserver-kdrive-r128 = "${bindir}/Xr128"
67FILES_xserver-kdrive-smi = "${bindir}/Xsmi"
68FILES_xserver-kdrive-vesa = "${bindir}/Xvesa"
69FILES_xserver-kdrive-via = "${bindir}/Xvia"
70
71RDEPENDS_xserver-kdrive-fbdev = "${PN}"
72RDEPENDS_xserver-kdrive-fake = "${PN}"
73RDEPENDS_xserver-kdrive-xephyr = "${PN}"
74RDEPENDS_xserver-kdrive-epson = "${PN}"
75RDEPENDS_xserver-kdrive-sdl = "${PN}"
76RDEPENDS_xserver-kdrive-w100 = "${PN}"
77RDEPENDS_xserver-kdrive-ati = "${PN}"
78RDEPENDS_xserver-kdrive-chips = "${PN}"
79RDEPENDS_xserver-kdrive-i810 = "${PN}"
80RDEPENDS_xserver-kdrive-mach64 = "${PN}"
81RDEPENDS_xserver-kdrive-mga = "${PN}"
82RDEPENDS_xserver-kdrive-neomagic = "${PN}"
83RDEPENDS_xserver-kdrive-nvidia = "${PN}"
84RDEPENDS_xserver-kdrive-pm2 = "${PN}"
85RDEPENDS_xserver-kdrive-r128 = "${PN}"
86RDEPENDS_xserver-kdrive-smi = "${PN}"
87RDEPENDS_xserver-kdrive-vesa = "${PN}"
88RDEPENDS_xserver-kdrive-via = "${PN}"
89
90inherit autotools pkgconfig
91
92ARM_INSTRUCTION_SET = "arm"
93
94EXTRA_OECONF = "--enable-composite --enable-kdrive \
95 --disable-dga --disable-dri --disable-xinerama \
96 --disable-xf86misc --disable-xf86vidmode \
97 --disable-xorg --disable-xorgcfg \
98 --disable-xkb --disable-xnest --disable-xvfb \
99 --disable-xevie --disable-xprint --disable-xtrap \
100 --disable-dmx \
101 --with-default-font-path=built-ins \
102 --enable-tslib --enable-xcalibrate \
103 ac_cv_file__usr_share_X11_sgml_defs_ent=no"
104
105do_configure_prepend() {
106 sed -i -e 's/tslib-0.0/tslib-1.0/' ${S}/configure.ac
107}
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-apm.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-apm.patch
new file mode 100644
index 0000000000..bd8842721b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-apm.patch
@@ -0,0 +1,20 @@
1--- xserver/hw/kdrive/linux/linux.c.orig 2005-04-23 15:56:13.988849232 +0000
2+++ xserver/hw/kdrive/linux/linux.c 2005-04-23 15:57:05.001094192 +0000
3@@ -342,7 +342,7 @@
4 /*
5 * Open the APM driver
6 */
7- LinuxApmFd = open ("/dev/apm_bios", 2);
8+ /*LinuxApmFd = open ("/dev/apm_bios", 2);
9 if (LinuxApmFd < 0 && errno == ENOENT)
10 LinuxApmFd = open ("/dev/misc/apm_bios", 2);
11 if (LinuxApmFd >= 0)
12@@ -352,7 +352,7 @@
13 RegisterBlockAndWakeupHandlers (LinuxApmBlock, LinuxApmWakeup, 0);
14 AddEnabledDevice (LinuxApmFd);
15 }
16-
17+ */
18 /*
19 * now get the VT
20 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-xf86-dga-xorgcfg.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-xf86-dga-xorgcfg.patch
new file mode 100644
index 0000000000..ccc19139c8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/disable-xf86-dga-xorgcfg.patch
@@ -0,0 +1,39 @@
1Index: xorg-server-1.3.0.0/configure.ac
2===================================================================
3--- xorg-server-1.3.0.0.orig/configure.ac 2007-04-20 03:23:40.000000000 +0200
4+++ xorg-server-1.3.0.0/configure.ac 2007-05-09 16:51:34.000000000 +0200
5@@ -520,7 +520,11 @@
6 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
7
8 dnl Core modules for most extensions, et al.
9+if test "$KDRIVE" = yes; then
10+REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]"
11+else
12 REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto [kbproto >= 1.0.3]"
13+fi
14 REQUIRED_LIBS="xfont xau fontenc"
15
16 AM_CONDITIONAL(XV, [test "x$XV" = xyes])
17@@ -1603,7 +1607,9 @@
18 AC_SUBST(XKB_COMPILED_DIR)
19
20 dnl and the rest of these are generic, so they're in config.h
21+if test ! x"$KDRIVE" = xyes; then
22 AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
23+fi
24 AC_DEFINE(XResExtension, 1, [Build XRes extension])
25
26 AC_TRY_COMPILE([
27@@ -1616,10 +1622,12 @@
28
29 AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
30
31+if test ! "x$KDRIVE" = xyes ; then
32 dnl xorgconfig CLI configuration utility
33 PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11])
34 AC_SUBST(XORGCONFIG_DEP_CFLAGS)
35 AC_SUBST(XORGCONFIG_DEP_LIBS)
36+fi
37
38 dnl xorgcfg GUI configuration utility
39 AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive/extra-kmodes.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/extra-kmodes.patch
new file mode 100644
index 0000000000..14cf99055b
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/extra-kmodes.patch
@@ -0,0 +1,83 @@
1Add some extra video modes and change the default to VGA.
2
3---
4 hw/kdrive/src/kmode.c | 41 +++++++++++++++++++++++++++++++++++++++--
5 1 file changed, 39 insertions(+), 2 deletions(-)
6
7Index: xorg-server-1.3.0.0/hw/kdrive/src/kmode.c
8===================================================================
9--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kmode.c 2008-01-11 14:20:47.000000000 +0000
10+++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2008-01-11 14:21:18.000000000 +0000
11@@ -32,6 +32,31 @@ const KdMonitorTiming kdMonitorTimings[
12 /* H V Hz KHz */
13 /* FP BP BLANK POLARITY */
14
15+ /* Treo 650 */
16+
17+ { 320, 320, 64, 16256,
18+ 17, 12, 32, KdSyncNegative,
19+ 1, 11, 14, KdSyncNegative,
20+ },
21+
22+ { 320, 320, 64, 0,
23+ 0, 0, 0, KdSyncNegative,
24+ 0, 0, 0, KdSyncNegative,
25+ },
26+
27+ /* LifeDrive/T3/TX modes */
28+
29+ { 320, 480, 64, 16256,
30+ 17, 12, 32, KdSyncNegative,
31+ 1, 11, 14, KdSyncNegative,
32+ },
33+
34+ { 480, 320, 64, 0,
35+ 0, 0, 0, KdSyncNegative,
36+ 0, 0, 0, KdSyncNegative,
37+ },
38+
39+
40 /* IPAQ modeline:
41 *
42 * Modeline "320x240" 5.7222 320 337 340 352 240 241 244 254"
43@@ -41,6 +66,11 @@ const KdMonitorTiming kdMonitorTimings[
44 1, 11, 14, KdSyncNegative,
45 },
46
47+ { 240, 320, 64, 0,
48+ 0, 0, 0, KdSyncNegative,
49+ 0, 0, 0, KdSyncNegative,
50+ },
51+
52 /* Other VESA modes */
53 { 640, 350, 85, 31500, /* VESA */
54 32, 96, 192, KdSyncPositive, /* 26.413 */
55@@ -76,10 +106,19 @@ const KdMonitorTiming kdMonitorTimings[
56 16, 120, 176, KdSyncNegative, /* 37.861 */
57 1, 20, 24, KdSyncNegative, /* 72.809 */
58 },
59+ /* DEFAULT */
60+#define MONITOR_TIMING_DEFAULT 13
61 { 640, 480, 60, 25175, /* VESA */
62 16, 48, 160, KdSyncNegative, /* 31.469 */
63 10, 33, 45, KdSyncNegative, /* 59.940 */
64 },
65+
66+
67+ { 480, 640, 60, 0, /* VESA */
68+ 0, 0, 0, KdSyncNegative, /* 31.469 */
69+ 0, 0, 0, KdSyncNegative, /* 59.940 */
70+ },
71+
72
73 /* 800x600 modes */
74 { 800, 600, 85, 56250, /* VESA */
75@@ -90,8 +129,6 @@ const KdMonitorTiming kdMonitorTimings[
76 16, 160, 256, KdSyncPositive, /* 46.875 */
77 1, 21, 25, KdSyncPositive, /* 75.000 */
78 },
79- /* DEFAULT */
80-#define MONITOR_TIMING_DEFAULT 9
81 { 800, 600, 72, 50000, /* VESA */
82 56, 64, 240, KdSyncPositive, /* 48.077 */
83 37, 23, 66, KdSyncPositive, /* 72.188 */
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch
new file mode 100644
index 0000000000..a5c22a5efc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/fbdev_xrandr_ioctl.patch
@@ -0,0 +1,61 @@
1Index: xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c
2===================================================================
3--- xorg-server-1.3.0.0.orig/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:12.000000000 +0100
4+++ xorg-server-1.3.0.0/hw/kdrive/fbdev/fbdev.c 2008-09-25 21:55:46.000000000 +0100
5@@ -498,6 +498,7 @@
6 KdScreenInfo *screen = pScreenPriv->screen;
7 FbdevScrPriv *scrpriv = screen->driver;
8 Bool wasEnabled = pScreenPriv->enabled;
9+ FbdevPriv *priv = screen->card->driver;
10 FbdevScrPriv oldscr;
11 int oldwidth;
12 int oldheight;
13@@ -525,11 +526,46 @@
14 oldheight = screen->height;
15 oldmmwidth = pScreen->mmWidth;
16 oldmmheight = pScreen->mmHeight;
17-
18+
19 /*
20 * Set new configuration
21 */
22-
23+
24+ if (newwidth != oldwidth || newheight != oldheight)
25+ {
26+ struct fb_var_screeninfo var;
27+ int k;
28+
29+ k = ioctl (priv->fd, FBIOGET_VSCREENINFO, &var);
30+
31+ if (k < 0)
32+ {
33+ ErrorF("Error with framebuffer ioctl FBIOGET_VSCREENINFO: %s", strerror (errno));
34+ return FALSE;
35+ }
36+
37+ var.xres = newwidth;
38+ var.yres = newheight;
39+ var.activate = FB_ACTIVATE_NOW;
40+
41+ k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
42+
43+ if (k >= 0)
44+ {
45+ if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0)
46+ {
47+ perror("Error with framebuffer ioctl FIOGET_FSCREENINFO");
48+ close (priv->fd);
49+ return FALSE;
50+ }
51+ if ((k=ioctl(priv->fd, FBIOGET_VSCREENINFO, &priv->var)) < 0) {
52+ perror("Error framebuffer ioctl FIOGET_VSCREENINFO");
53+ close (priv->fd);
54+ return FALSE;
55+ }
56+ }
57+ }
58+
59 scrpriv->randr = KdAddRotation (screen->randr, randr);
60
61 KdOffscreenSwapOut (screen->pScreen);
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive/no-serial-probing.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/no-serial-probing.patch
new file mode 100644
index 0000000000..35ccadaa8d
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive/no-serial-probing.patch
@@ -0,0 +1,13 @@
1--- xserver/hw/kdrive/linux/mouse.c.orig 2004-05-13 14:25:51.000000000 -0700
2+++ xserver/hw/kdrive/linux/mouse.c 2005-09-22 12:20:47.000000000 -0700
3@@ -927,8 +927,10 @@ char *kdefaultMouse[] = {
4 "/dev/psaux",
5 "/dev/input/mice",
6 "/dev/adbmouse",
7+#ifdef BREAK_MY_SERIAL_CONSOLE
8 "/dev/ttyS0",
9 "/dev/ttyS1",
10+#endif
11 };
12
13 #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0]))
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive_1.7.99.2.bb b/meta/recipes-graphics/xorg-xserver/xserver-kdrive_1.7.99.2.bb
new file mode 100644
index 0000000000..7ca88e64e2
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-kdrive_1.7.99.2.bb
@@ -0,0 +1,28 @@
1require xserver-kdrive.inc
2
3DEPENDS += "libxkbfile libxcalibrate font-util"
4
5RDEPENDS_${PN} += "xkeyboard-config"
6
7EXTRA_OECONF += "--disable-glx"
8
9PE = "1"
10PR = "r25"
11
12SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
13 file://extra-kmodes.patch;patch=1 \
14 file://disable-apm.patch;patch=1 \
15 file://no-serial-probing.patch;patch=1 \
16# file://kdrive-evdev.patch;patch=1 \
17# file://kdrive-use-evdev.patch;patch=1 \
18# file://enable-builtin-fonts.patch;patch=1 \
19# file://optional-xkb.patch;patch=1 \
20 file://keyboard-resume-workaround.patch;patch=1 \
21 file://enable-xcalibrate.patch;patch=1 \
22 file://hide-cursor-and-ppm-root.patch;patch=1 \
23 file://fbdev_xrandr_ioctl.patch;patch=1 \
24 file://fix-newer-xorg-headers.patch;patch=1 \
25 file://crosscompile.patch;patch=1 \
26 file://nodolt.patch;patch=1"
27
28S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-common.inc b/meta/recipes-graphics/xorg-xserver/xserver-xf86-common.inc
new file mode 100644
index 0000000000..cf69a1e156
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-common.inc
@@ -0,0 +1,33 @@
1DESCRIPTION = "The X.Org X server"
2HOMEPAGE = "http://www.x.org"
3SECTION = "x11/base"
4LICENSE = "MIT-X"
5
6# xf86-*-* packages depend on an X server built with the xfree86 DDX
7# so we have a virtual to represent that:
8PROVIDES = "virtual/xserver-xf86"
9
10# Other packages tend to just care that there is *an* X server:
11PROVIDES += "virtual/xserver"
12
13XORG_PN = "xorg-server"
14SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2"
15
16S = "${WORKDIR}/${XORG_PN}-${PV}"
17
18inherit autotools pkgconfig
19
20PACKAGES =+ "${PN}-utils"
21
22RDEPENDS_${PN} += "xserver-xf86-config xkeyboard-config"
23
24FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl"
25FILES_${PN} = "${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/xserver/SecurityPolicy ${libdir}/xorg/modules/*.so ${libdir}/xorg/modules/*/*.so ${libdir}/xorg/modules/*/*/*.so /etc/X11 "
26FILES_${PN}-doc += "${libdir}/X11/doc /usr/share/X11/xkb/compiled/README.compiled"
27
28FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \
29 ${libdir}/xorg/modules/*/.debug \
30 ${libdir}/xorg/modules/*/*/.debug \
31 "
32
33SRC_URI += "file://macro_tweak.patch"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/igep0020/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/igep0020/xorg.conf
new file mode 100644
index 0000000000..ae8a395a05
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/igep0020/xorg.conf
@@ -0,0 +1,47 @@
1
2Section "Files"
3EndSection
4
5Section "InputDevice"
6 Identifier "Generic Keyboard"
7 Driver "kbd"
8 Option "CoreKeyboard"
9 Option "XkbRules" "xorg"
10 Option "XkbModel" "pc105"
11 Option "XkbLayout" "us"
12EndSection
13
14Section "InputDevice"
15 Identifier "Configured Mouse"
16 Driver "mouse"
17 Option "CorePointer"
18 Option "Device" "/dev/input/mice"
19 Option "Protocol" "ImPS/2"
20 Option "ZAxisMapping" "4 5"
21 Option "Emulate3Buttons" "true"
22EndSection
23
24Section "Device"
25 Identifier "OMAPFB Graphics Controller"
26 Driver "omapfb"
27EndSection
28
29Section "Monitor"
30 Identifier "Generic Monitor"
31 Option "DPMS"
32EndSection
33
34Section "Screen"
35 Identifier "Default Screen"
36 Device "OMAPFB Graphics Controller"
37 Monitor "Generic Monitor"
38EndSection
39
40Section "ServerLayout"
41 Identifier "Default Layout"
42 Screen "Default Screen"
43 InputDevice "Generic Keyboard"
44 InputDevice "Configured Mouse"
45 Option "AllowEmptyInput" "no"
46EndSection
47
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/netbook/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/netbook/xorg.conf
new file mode 100644
index 0000000000..e18b911199
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/netbook/xorg.conf
@@ -0,0 +1,26 @@
1Section "Device"
2 Identifier "Intel Graphics Driver"
3 Driver "intel"
4EndSection
5
6Section "Monitor"
7 Identifier "Generic Monitor"
8 Option "DPMS"
9EndSection
10
11Section "Screen"
12 Identifier "Default Screen"
13 Device "Intel Graphics Driver"
14 Monitor "Generic Monitor"
15 DefaultDepth 24
16EndSection
17
18Section "ServerLayout"
19 Identifier "Default Layout"
20 Screen "Default Screen"
21EndSection
22
23Section "ServerFlags"
24 Option "DontZap" "0"
25 Option "AutoAddDevices" "False"
26EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
new file mode 100644
index 0000000000..4216de7bdf
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
@@ -0,0 +1,68 @@
1
2Section "Files"
3EndSection
4
5Section "InputDevice"
6 Identifier "Generic Keyboard"
7 Driver "kbd"
8 Option "CoreKeyboard"
9 Option "XkbRules" "xorg"
10 Option "XkbModel" "pc105"
11 Option "XkbLayout" "us"
12EndSection
13
14Section "InputDevice"
15 Identifier "Configured Mouse"
16 Driver "vmmouse"
17 Option "CorePointer"
18 Option "Device" "/dev/input/mice"
19 Option "Protocol" "ImPS/2"
20 Option "ZAxisMapping" "4 5"
21 Option "Emulate3Buttons" "true"
22EndSection
23
24Section "InputDevice"
25 Identifier "Qemu Tablet"
26 Driver "evdev"
27 Option "CorePointer"
28 Option "Device" "/dev/input/touchscreen0"
29 Option "USB" "on"
30EndSection
31
32Section "Device"
33 Identifier "Graphics Controller"
34 Driver "vmware"
35EndSection
36
37Section "Monitor"
38 Identifier "Generic Monitor"
39 Option "DPMS"
40 # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz
41 Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync
42 # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
43 ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
44 # 640x480 @ 72Hz (VESA) hsync: 37.9kHz
45 ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync
46 # 640x480 @ 75Hz (VESA) hsync: 37.5kHz
47 ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
48 # 640x480 @ 85Hz (VESA) hsync: 43.3kHz
49 ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
50EndSection
51
52Section "Screen"
53 Identifier "Default Screen"
54 Device "Graphics Controller"
55 Monitor "Generic Monitor"
56 SubSection "Display"
57 Modes "640x480"
58 EndSubSection
59EndSection
60
61Section "ServerLayout"
62 Identifier "Default Layout"
63 Screen "Default Screen"
64 InputDevice "Generic Keyboard"
65 # InputDevice "Configured Mouse"
66 InputDevice "QEMU Tablet"
67 Option "AllowEmptyInput" "no"
68EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
new file mode 100644
index 0000000000..4216de7bdf
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
@@ -0,0 +1,68 @@
1
2Section "Files"
3EndSection
4
5Section "InputDevice"
6 Identifier "Generic Keyboard"
7 Driver "kbd"
8 Option "CoreKeyboard"
9 Option "XkbRules" "xorg"
10 Option "XkbModel" "pc105"
11 Option "XkbLayout" "us"
12EndSection
13
14Section "InputDevice"
15 Identifier "Configured Mouse"
16 Driver "vmmouse"
17 Option "CorePointer"
18 Option "Device" "/dev/input/mice"
19 Option "Protocol" "ImPS/2"
20 Option "ZAxisMapping" "4 5"
21 Option "Emulate3Buttons" "true"
22EndSection
23
24Section "InputDevice"
25 Identifier "Qemu Tablet"
26 Driver "evdev"
27 Option "CorePointer"
28 Option "Device" "/dev/input/touchscreen0"
29 Option "USB" "on"
30EndSection
31
32Section "Device"
33 Identifier "Graphics Controller"
34 Driver "vmware"
35EndSection
36
37Section "Monitor"
38 Identifier "Generic Monitor"
39 Option "DPMS"
40 # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz
41 Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync
42 # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz
43 ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync
44 # 640x480 @ 72Hz (VESA) hsync: 37.9kHz
45 ModeLine "640x480" 31.5 640 664 704 832 480 489 491 520 -hsync -vsync
46 # 640x480 @ 75Hz (VESA) hsync: 37.5kHz
47 ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
48 # 640x480 @ 85Hz (VESA) hsync: 43.3kHz
49 ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
50EndSection
51
52Section "Screen"
53 Identifier "Default Screen"
54 Device "Graphics Controller"
55 Monitor "Generic Monitor"
56 SubSection "Display"
57 Modes "640x480"
58 EndSubSection
59EndSection
60
61Section "ServerLayout"
62 Identifier "Default Layout"
63 Screen "Default Screen"
64 InputDevice "Generic Keyboard"
65 # InputDevice "Configured Mouse"
66 InputDevice "QEMU Tablet"
67 Option "AllowEmptyInput" "no"
68EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf
new file mode 100644
index 0000000000..9c3d49019f
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/xorg.conf
@@ -0,0 +1,26 @@
1
2Section "Device"
3 Identifier "Intel Graphics Driver"
4 Driver "intel"
5EndSection
6
7Section "Monitor"
8 Identifier "Generic Monitor"
9 Option "DPMS"
10EndSection
11
12Section "Screen"
13 Identifier "Default Screen"
14 Device "Intel Graphics Driver"
15 Monitor "Generic Monitor"
16 DefaultDepth 24
17EndSection
18
19Section "ServerLayout"
20 Identifier "Default Layout"
21 Screen "Default Screen"
22EndSection
23
24Section "ServerFlags"
25 Option "DontZap" "0"
26EndSection
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
new file mode 100644
index 0000000000..fc91285f27
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "X.Org X server configuration file"
2HOMEPAGE = "http://www.x.org"
3SECTION = "x11/base"
4LICENSE = "MIT-X"
5PR = "r9"
6
7SRC_URI = "file://xorg.conf"
8
9CONFFILES_${PN} += "${sysconfdir}/X11/xorg.conf"
10
11PACKAGE_ARCH = "${MACHINE_ARCH}"
12
13do_install () {
14 install -d ${D}/${sysconfdir}/X11
15 install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/
16}
17
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
new file mode 100644
index 0000000000..db2d1266bb
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
@@ -0,0 +1,37 @@
1require xserver-xf86-common.inc
2
3PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86rushproto xf86vidmodeproto xf86bigfontproto compositeproto recordproto resourceproto videoproto scrnsaverproto evieext trapproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto glproto"
4
5LIB_DEPS = "pixman virtual/libgl libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess openssl"
6
7DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}"
8
9RDEPENDS_${PN} += "hal xorg-minimal-fonts"
10
11FILES_${PN} += "${bindir}/Xorg "
12
13EXTRA_OECONF += "--disable-static \
14 --disable-acfb \
15 --disable-ccfb \
16 --disable-mcfb \
17 --disable-dga \
18 --disable-xinerama \
19 --disable-xf86misc \
20 --disable-xorgcfg \
21 --disable-record \
22 --disable-dmx \
23 --disable-xnest \
24 --disable-xvfb \
25 --enable-composite \
26 --enable-glx-tls \
27 --sysconfdir=/etc/X11 \
28 --localstatedir=/var \
29 --with-pic \
30 --with-int10=x86emu \
31 --with-fontdir=/usr/share/fonts/X11 \
32 --with-xkb-output=/var/lib/xkb \
33 ac_cv_file__usr_share_sgml_X11_defs_ent=no"
34
35# Due to mesa-dri
36COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
37
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
new file mode 100644
index 0000000000..b121bba655
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
@@ -0,0 +1,358 @@
1From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
2From: Yan Li <yan.i.li@intel.com>
3Date: Tue, 12 May 2009 17:49:07 +0800
4Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
5Organization: Intel
6
7xkbcomp outputs will be cached in files with hashed keymap as
8names. This saves boot time for around 1s on commodity netbooks.
9
10Signed-off-by: Yan Li <yan.i.li@intel.com>
11---
12 configure.ac | 6 +-
13 xkb/README.compiled | 8 +-
14 xkb/ddxLoad.c | 192 +++++++++++++++++++++++++++++++++++++++++---------
15 3 files changed, 164 insertions(+), 42 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 4c4c797..7a5020a 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -476,9 +476,9 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [
22 AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
23 [ XKBPATH="$withval" ],
24 [ XKBPATH="${datadir}/X11/xkb" ])
25-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
26+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
27 [ XKBOUTPUT="$withval" ],
28- [ XKBOUTPUT="compiled" ])
29+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
30 AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH],
31 [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]),
32 [ SERVERCONFIG="$withval" ],
33@@ -1757,7 +1757,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir])
34 XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
35
36 if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then
37- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
38+ AC_MSG_ERROR([xkb-output must be an absolute path.])
39 fi
40
41 # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
42diff --git a/xkb/README.compiled b/xkb/README.compiled
43index 71caa2f..a4a2ae0 100644
44--- a/xkb/README.compiled
45+++ b/xkb/README.compiled
46@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients. The X server
47 or some other tool might destroy or replace the files in this directory,
48 so it is not a safe place to store compiled keymaps for long periods of
49 time. The default keymap for any server is usually stored in:
50- X<num>-default.xkm
51-where <num> is the display number of the server in question, which makes
52-it possible for several servers *on the same host* to share the same
53-directory.
54+ server-<SHA1>.xkm
55+
56+where <SHA1> is the SHA1 hash of keymap source, so that compiled
57+keymap of different keymap sources are stored in different files.
58
59 Unless the X server is modified, sharing this directory between servers on
60 different hosts could cause problems.
61diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
62index 4d5dfb6..60a68af 100644
63--- a/xkb/ddxLoad.c
64+++ b/xkb/ddxLoad.c
65@@ -32,6 +32,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
66 #include <xkb-config.h>
67 #endif
68
69+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
70+# include <sha1.h>
71+#else /* Use OpenSSL's libcrypto */
72+# include <stddef.h> /* buggy openssl/sha.h wants size_t */
73+# include <openssl/sha.h>
74+#endif
75 #include <stdio.h>
76 #include <ctype.h>
77 #define NEED_EVENTS 1
78@@ -46,24 +52,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
79 #define XKBSRV_NEED_FILE_FUNCS
80 #include <xkbsrv.h>
81 #include <X11/extensions/XI.h>
82+#include <errno.h>
83 #include "xkb.h"
84
85 #if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
86 #include <paths.h>
87 #endif
88
89- /*
90- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
91- * relative to the top-level XKB configuration directory.
92- * Making the server write to a subdirectory of that directory
93- * requires some work in the general case (install procedure
94- * has to create links to /var or somesuch on many machines),
95- * so we just compile into /usr/tmp for now.
96- */
97-#ifndef XKM_OUTPUT_DIR
98-#define XKM_OUTPUT_DIR "compiled/"
99-#endif
100-
101 #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
102 #define ERROR_PREFIX "\"> \""
103 #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
104@@ -179,6 +174,45 @@ OutputDirectory(
105 }
106
107 static Bool
108+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
109+{
110+ int i;
111+ unsigned char sha1[SHA_DIGEST_LENGTH];
112+
113+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
114+ SHA1_CTX ctx;
115+
116+ SHA1Init (&ctx);
117+ SHA1Update (&ctx, input, strlen(input));
118+ SHA1Final (sha1, &ctx);
119+#else /* Use OpenSSL's libcrypto */
120+ SHA_CTX ctx;
121+ int success;
122+
123+ success = SHA1_Init (&ctx);
124+ if (! success)
125+ return BadAlloc;
126+
127+ success = SHA1_Update (&ctx, input, strlen(input));
128+ if (! success)
129+ return BadAlloc;
130+
131+ success = SHA1_Final (sha1, &ctx);
132+ if (! success)
133+ return BadAlloc;
134+#endif
135+
136+ /* convert sha1 to sha1_asc */
137+ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
138+ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
139+ }
140+
141+ return Success;
142+}
143+
144+/* call xkbcomp and compile XKB keymap, return xkm file name in
145+ nameRtrn */
146+static Bool
147 XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
148 XkbComponentNamesPtr names,
149 unsigned want,
150@@ -187,7 +221,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
151 int nameRtrnLen)
152 {
153 FILE * out;
154- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
155+ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
156+ char * tmpXkmFile = NULL;
157+ char * canonicalXkmFileName = NULL;
158+ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
159+ int ret, result;
160
161 const char *emptystring = "";
162 const char *xkbbasedirflag = emptystring;
163@@ -198,16 +236,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
164 /* WIN32 has no popen. The input must be stored in a file which is
165 used as input for xkbcomp. xkbcomp does not read from stdin. */
166 char tmpname[PATH_MAX];
167- const char *xkmfile = tmpname;
168+ const char *xkbfile = tmpname;
169 #else
170- const char *xkmfile = "-";
171+ const char *xkbfile = "-";
172 #endif
173
174- snprintf(keymap, sizeof(keymap), "server-%s", display);
175+ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
176+ of which SHA1 is generated and used as result xkm file name */
177+ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
178+ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
179+ if (NULL == out) {
180+ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
181+ return False;
182+ }
183+ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
184+ if (fclose(out) !=0)
185+ {
186+ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
187+ return False;
188+ }
189+#ifdef DEBUG
190+ if (xkbDebugFlags) {
191+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
192+ fputs(xkbKeyMapBuf, stderr);
193+ }
194+#endif
195+ if (!ret) {
196+ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
197+ return False;
198+ }
199+
200+ DebugF("[xkb] computing SHA1 of keymap\n");
201+ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
202+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
203+ }
204+ else {
205+ ErrorF("[xkb] Computing SHA1 of keymap failed, "
206+ "using display name instead as xkm file name\n");
207+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
208+ }
209
210- XkbEnsureSafeMapName(keymap);
211+ XkbEnsureSafeMapName(xkmfile);
212 OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
213
214+ /* set nameRtrn, fail if it's too small */
215+ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
216+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
217+ return False;
218+ }
219+ strncpy(nameRtrn, xkmfile, nameRtrnLen);
220+
221+ /* if the xkm file already exists, reuse it */
222+ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
223+ if (access(canonicalXkmFileName, R_OK) == 0) {
224+ /* yes, we can reuse the old xkm file */
225+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
226+ result = True;
227+ goto _ret;
228+ }
229+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
230+
231+ /* continue to call xkbcomp to compile the keymap. to avoid race
232+ condition, we compile it to a tmpfile then rename it to
233+ xkmfile */
234+
235 #ifdef WIN32
236 strcpy(tmpname, Win32TempDir());
237 strcat(tmpname, "\\xkb_XXXXXX");
238@@ -230,19 +322,30 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
239 }
240 }
241
242+ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
243+ ErrorF("[xkb] Can't generate temp xkm file name");
244+ result = False;
245+ goto _ret;
246+ }
247+
248 buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
249- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
250+ "-em1 %s -emp %s -eml %s \"%s\"",
251 xkbbindir, xkbbindirsep,
252 ( (xkbDebugFlags < 2) ? 1 :
253 ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
254- xkbbasedirflag, xkmfile,
255+ xkbbasedirflag, xkbfile,
256 PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
257- xkm_output_dir, keymap);
258+ tmpXkmFile);
259
260 if (xkbbasedirflag != emptystring) {
261 xfree(xkbbasedirflag);
262 }
263
264+ /* there's a potential race condition between calling tempnam()
265+ and invoking xkbcomp to write the result file (potential temp
266+ file name conflicts), but since xkbcomp is a standalone
267+ program, we have to live with this */
268+
269 #ifndef WIN32
270 out= Popen(buf,"w");
271 #else
272@@ -250,31 +353,43 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
273 #endif
274
275 if (out!=NULL) {
276-#ifdef DEBUG
277- if (xkbDebugFlags) {
278- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
279- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
280+ /* write XKBKeyMapBuf to xkbcomp */
281+ if (EOF==fputs(xkbKeyMapBuf, out))
282+ {
283+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
284+ result = False;
285+ goto _ret;
286 }
287-#endif
288- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
289 #ifndef WIN32
290 if (Pclose(out)==0)
291 #else
292 if (fclose(out)==0 && System(buf) >= 0)
293 #endif
294 {
295+ /* xkbcomp success */
296 if (xkbDebugFlags)
297 DebugF("[xkb] xkb executes: %s\n",buf);
298- if (nameRtrn) {
299- strncpy(nameRtrn,keymap,nameRtrnLen);
300- nameRtrn[nameRtrnLen-1]= '\0';
301+
302+ /* if canonicalXkmFileName already exists now, we simply
303+ overwrite it, this is OK */
304+ ret = rename(tmpXkmFile, canonicalXkmFileName);
305+ if (0 != ret) {
306+ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
307+ tmpXkmFile, canonicalXkmFileName,
308+ strerror(errno));
309+
310+ /* in case of error, don't unlink tmpXkmFile, leave it
311+ for debugging */
312+
313+ result = False;
314+ goto _ret;
315 }
316- if (buf != NULL)
317- xfree (buf);
318- return True;
319+
320+ result = True;
321+ goto _ret;
322 }
323 else
324- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
325+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
326 #ifdef WIN32
327 /* remove the temporary file */
328 unlink(tmpname);
329@@ -289,9 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
330 }
331 if (nameRtrn)
332 nameRtrn[0]= '\0';
333+ result = False;
334+
335+_ret:
336+ if (tmpXkmFile)
337+ free(tmpXkmFile);
338+ if (canonicalXkmFileName)
339+ xfree(canonicalXkmFileName);
340 if (buf != NULL)
341 xfree (buf);
342- return False;
343+
344+ return result;
345 }
346
347 static FILE *
348@@ -375,7 +498,6 @@ unsigned missing;
349 DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
350 }
351 fclose(file);
352- (void) unlink (fileName);
353 return (need|want)&(~missing);
354 }
355
356--
3571.5.6.5
358
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
new file mode 100644
index 0000000000..8b82de2223
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
@@ -0,0 +1,20 @@
1diff --git a/configure.ac b/configure.ac
2index b3b752c..600500b 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
6 dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
7 dnl compiling, assume default font path uses standard FONTROOTDIR directories.
8 DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
9-if test "$cross_compiling" != yes; then
10- AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
11- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
12- [case $host_os in
13+ case $host_os in
14 darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
15- esac])
16-fi
17+ esac
18 AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
19 [ FONTPATH="$withval" ],
20 [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
new file mode 100644
index 0000000000..092a712903
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
@@ -0,0 +1,13 @@
1Index: xorg-server-1.6.0/hw/xfree86/common/Makefile.am
2===================================================================
3--- xorg-server-1.6.0.orig/hw/xfree86/common/Makefile.am 2010-02-01 14:04:53.247789918 +0000
4+++ xorg-server-1.6.0/hw/xfree86/common/Makefile.am 2010-02-01 14:05:27.787817002 +0000
5@@ -46,7 +46,7 @@
6 sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
7 xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
8 xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \
9- $(XVSDKINCS) xorgVersion.h \
10+ xorgVersion.h \
11 xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h
12
13 DISTCLEANFILES = xf86Build.h
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
new file mode 100644
index 0000000000..a62a767f23
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
@@ -0,0 +1,13 @@
1Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
2===================================================================
3--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
4+++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
5@@ -41,7 +41,7 @@
6
7 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
8
9-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
10+INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
11
12 # FIXME: These need to be added to the build
13 LNX_EXTRA_SRCS = \
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
new file mode 100644
index 0000000000..eed491b4d9
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
@@ -0,0 +1,21 @@
1We need to insert the sysroot path into compiler commandlines for this
2kind of variable use, otherwise we're looking into /usr/include/.
3
4RP - 26/11/09
5
6Index: git/xorg-server.m4
7===================================================================
8--- git.orig/xorg-server.m4 2009-11-10 12:04:34.000000000 +0000
9+++ git/xorg-server.m4 2009-11-27 00:05:02.000000000 +0000
10@@ -28,9 +28,10 @@
11 # Checks for the $1 define in xorg-server.h (from the sdk). If it
12 # is defined, then add $1 to $REQUIRED_MODULES.
13
14+m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
15 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
16 SAVE_CFLAGS="$CFLAGS"
17- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
18+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
19 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
20 #include "xorg-server.h"
21 #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
new file mode 100644
index 0000000000..94852f0dea
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
@@ -0,0 +1,22 @@
1We need to insert the sysroot path into compiler commandlines for this
2kind of variable use, otherwise we're looking into /usr/include/.
3
4RP - 26/11/09
5
6Index: git/xorg-server.m4
7===================================================================
8--- git.orig/xorg-server.m4 2010-02-05 10:00:55.000000000 +0000
9+++ git/xorg-server.m4 2010-02-05 10:02:12.000000000 +0000
10@@ -28,10 +28,11 @@
11 # Checks for the $1 define in xorg-server.h (from the sdk). If it
12 # is defined, then add $1 to $REQUIRED_MODULES.
13
14+m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
15 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
16 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
17 SAVE_CFLAGS="$CFLAGS"
18- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
19+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
20 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
21 #include "xorg-server.h"
22 #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
new file mode 100644
index 0000000000..565832eed8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
@@ -0,0 +1,13 @@
1Index: git/os/osdep.h
2===================================================================
3--- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
4+++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
5@@ -92,7 +92,7 @@
6 * like sysconf(_SC_OPEN_MAX) is not supported.
7 */
8
9-#if OPEN_MAX <= 256
10+#if 0
11 #define MAXSOCKS (OPEN_MAX - 1)
12 #else
13 #define MAXSOCKS 256
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
new file mode 100644
index 0000000000..db29da93ca
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
@@ -0,0 +1,50 @@
1Index: xorg-server-1.5.0/hw/xfree86/dri/dri.c
2===================================================================
3--- xorg-server-1.5.0.orig/hw/xfree86/dri/dri.c 2008-09-24 17:43:04.000000000 +0100
4+++ xorg-server-1.5.0/hw/xfree86/dri/dri.c 2008-09-24 17:46:38.000000000 +0100
5@@ -73,10 +73,6 @@
6
7 #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
8
9-#if !defined(PANORAMIX)
10-extern Bool noPanoramiXExtension;
11-#endif
12-
13 static int DRIEntPrivIndex = -1;
14 static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
15 static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
16@@ -307,7 +303,6 @@
17 drm_context_t * reserved;
18 int reserved_count;
19 int i;
20- Bool xineramaInCore = FALSE;
21 DRIEntPrivPtr pDRIEntPriv;
22 ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
23 DRIContextFlags flags = 0;
24@@ -320,20 +315,13 @@
25 return FALSE;
26 }
27
28- /*
29- * If Xinerama is on, don't allow DRI to initialise. It won't be usable
30- * anyway.
31- */
32- if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
33- xineramaInCore = TRUE;
34-
35- if (xineramaInCore) {
36- if (!noPanoramiXExtension) {
37- DRIDrvMsg(pScreen->myNum, X_WARNING,
38- "Direct rendering is not supported when Xinerama is enabled\n");
39- return FALSE;
40- }
41+#if defined(PANORAMIX)
42+ if (!noPanoramiXExtension) {
43+ DRIDrvMsg(pScreen->myNum, X_WARNING,
44+ "Direct rendering is not supported when Xinerama is enabled\n");
45+ return FALSE;
46 }
47+#endif
48
49 if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize,
50 pDRIInfo->busIdString,
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
new file mode 100644
index 0000000000..cd408c7bc2
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
@@ -0,0 +1,28 @@
1This is the revised version of files/macro_tweak.patch for
2xorg-server 1.8.99.904.
3
4the files/macro_tweak.patch can not removed now since it is used by
5xserver-kdrive-1.7.99.2 and xserver-xf86-lite_1.7.99.2. Once they
6are all upgraded to 1.8.99.904, the the files/macro_tweak.patch
7can be safely replace by this patch.
8
9Signed-off-by: Yu Ke <ke.yu@intel.com>
10
11diff --git a/xorg-server.m4 b/xorg-server.m4
12index bdecf62..040fdb8 100644
13--- a/xorg-server.m4
14+++ b/xorg-server.m4
15@@ -28,10 +28,12 @@ dnl
16 # Checks for the $1 define in xorg-server.h (from the sdk). If it
17 # is defined, then add $1 to $REQUIRED_MODULES.
18
19+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
20+
21 AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
22 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
23 SAVE_CFLAGS="$CFLAGS"
24- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
25+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
26 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
27 #include "xorg-server.h"
28 #if !defined $1
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
new file mode 100644
index 0000000000..6b34032a39
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
@@ -0,0 +1,12 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
4+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
5@@ -62,7 +62,6 @@
6 AC_LIBTOOL_WIN32_DLL
7 AC_DISABLE_STATIC
8 AC_PROG_LIBTOOL
9-DOLT
10 AC_PROG_MAKE_SET
11 PKG_PROG_PKG_CONFIG
12 AC_PROG_LEX
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
new file mode 100755
index 0000000000..3d2fa1669a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
@@ -0,0 +1,12 @@
1diff -urN xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c
2--- xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c 2008-09-01 03:26:37.000000000 +0800
3+++ xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c 2008-09-18 00:28:16.000000000 +0800
4@@ -39,7 +39,7 @@
5 #include "scrnintstr.h"
6 #include "windowstr.h"
7 #include "dri2.h"
8-#include <GL/internal/dri_sarea.h>
9+//#include <GL/internal/dri_sarea.h>
10
11 #include "xf86.h"
12
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
new file mode 100755
index 0000000000..7ff3658d0c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
@@ -0,0 +1,23 @@
1commit 67b9b3a77a8b86eef03af36a0f4be3a07411efee
2Author: Eric Anholt <eric@anholt.net>
3Date: Thu Sep 11 16:18:17 2008 -0700
4
5 Enable DRI2 build.
6
7diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
8index eff2c31..98d7ec8 100644
9--- a/hw/xfree86/Makefile.am
10+++ b/hw/xfree86/Makefile.am
11@@ -4,9 +4,9 @@ if DRI
12 DRI_SUBDIR = dri
13 endif
14
15-#if DRI2
16-#DRI2_SUBDIR = dri2
17-#endif
18+if DRI2
19+DRI2_SUBDIR = dri2
20+endif
21
22 if XF86UTILS
23 XF86UTILS_SUBDIR = utils
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
new file mode 100644
index 0000000000..ef53689bd0
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
@@ -0,0 +1,156 @@
1From a3e15680da24cb8259f6a83dee0c930dab024290 Mon Sep 17 00:00:00 2001
2From: Kristian <krh@redhat.com>
3Date: Fri, 15 Aug 2008 15:15:14 +1000
4Subject: [PATCH] Add nr for background=none root
5
6---
7 dix/globals.c | 1 +
8 dix/window.c | 22 ++++++++++++----------
9 hw/xfree86/common/xf86Init.c | 11 +++++++++++
10 hw/xfree86/common/xf86str.h | 5 ++++-
11 include/opaque.h | 1 +
12 os/utils.c | 3 +++
13 6 files changed, 32 insertions(+), 11 deletions(-)
14
15diff --git a/dix/globals.c b/dix/globals.c
16index 973dc43..dbd76bb 100644
17--- a/dix/globals.c
18+++ b/dix/globals.c
19@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
20 CursorPtr rootCursor;
21 Bool party_like_its_1989 = FALSE;
22 Bool whiteRoot = FALSE;
23+Bool bgNoneRoot = FALSE;
24
25 int cursorScreenDevPriv[MAXSCREENS];
26
27diff --git a/dix/window.c b/dix/window.c
28index c31fa87..8bb178d 100644
29--- a/dix/window.c
30+++ b/dix/window.c
31@@ -482,23 +482,24 @@ InitRootWindow(WindowPtr pWin)
32 pWin->cursorIsNone = FALSE;
33 pWin->optional->cursor = rootCursor;
34 rootCursor->refcnt++;
35-
36+ pWin->backingStore = defaultBackingStore;
37+ pWin->forcedBS = (defaultBackingStore != NotUseful);
38
39 if (party_like_its_1989) {
40 MakeRootTile(pWin);
41 backFlag |= CWBackPixmap;
42+ pScreen->ChangeWindowAttributes(pWin, backFlag);
43+ } else if (bgNoneRoot) {
44+ /* nothing, handled in xf86CreateRootWindow */
45 } else {
46 if (whiteRoot)
47 pWin->background.pixel = pScreen->whitePixel;
48 else
49 pWin->background.pixel = pScreen->blackPixel;
50 backFlag |= CWBackPixel;
51- }
52
53- pWin->backingStore = defaultBackingStore;
54- pWin->forcedBS = (defaultBackingStore != NotUseful);
55- /* We SHOULD check for an error value here XXX */
56- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
57+ pScreen->ChangeWindowAttributes(pWin, backFlag);
58+ }
59
60 MapWindow(pWin, serverClient);
61 }
62diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
63index 236c00b..083a6ac 100644
64--- a/hw/xfree86/common/xf86Init.c
65+++ b/hw/xfree86/common/xf86Init.c
66@@ -79,6 +79,7 @@
67 #ifdef RENDER
68 #include "picturestr.h"
69 #endif
70+#include "xace.h"
71
72 #include "globals.h"
73
74@@ -328,6 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin)
75 int ret = TRUE;
76 int err = Success;
77 ScreenPtr pScreen = pWin->drawable.pScreen;
78+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
79 RootWinPropPtr pProp;
80 CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
81 dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
82@@ -381,6 +383,15 @@ xf86CreateRootWindow(WindowPtr pWin)
83 }
84 }
85
86+ if (bgNoneRoot && pScrn->canDoBGNoneRoot || 1) {
87+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
88+ pWin->background.pixel = pScreen->whitePixel;
89+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
90+ } else {
91+ pWin->background.pixel = pScreen->blackPixel;
92+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
93+ }
94+
95 #ifdef DEBUG
96 ErrorF("xf86CreateRootWindow() returns %d\n", ret);
97 #endif
98diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
99index 904c369..8c38f69 100644
100--- a/hw/xfree86/common/xf86str.h
101+++ b/hw/xfree86/common/xf86str.h
102@@ -531,7 +531,7 @@ typedef struct _confdrirec {
103 } confDRIRec, *confDRIPtr;
104
105 /* These values should be adjusted when new fields are added to ScrnInfoRec */
106-#define NUM_RESERVED_INTS 16
107+#define NUM_RESERVED_INTS 15
108 #define NUM_RESERVED_POINTERS 15
109 #define NUM_RESERVED_FUNCS 11
110
111@@ -959,6 +959,9 @@ typedef struct _ScrnInfoRec {
112 ClockRangesPtr clockRanges;
113 int adjustFlags;
114
115+ /* -nr support */
116+ int canDoBGNoneRoot;
117+
118 /*
119 * These can be used when the minor ABI version is incremented.
120 * The NUM_* parameters must be reduced appropriately to keep the
121diff --git a/include/opaque.h b/include/opaque.h
122index 07a0715..be1577b 100644
123--- a/include/opaque.h
124+++ b/include/opaque.h
125@@ -71,6 +71,7 @@ extern Bool defeatAccessControl;
126 extern long maxBigRequestSize;
127 extern Bool party_like_its_1989;
128 extern Bool whiteRoot;
129+extern Bool bgNoneRoot;
130
131 extern Bool CoreDump;
132
133diff --git a/os/utils.c b/os/utils.c
134index b100949..c41b45b 100644
135--- a/os/utils.c
136+++ b/os/utils.c
137@@ -515,6 +515,7 @@ void UseMsg(void)
138 #endif
139 ErrorF("-nolisten string don't listen on protocol\n");
140 ErrorF("-noreset don't reset after last client exists\n");
141+ ErrorF("-nr create root window with no background\n");
142 ErrorF("-reset reset after last client exists\n");
143 ErrorF("-p # screen-saver pattern duration (minutes)\n");
144 ErrorF("-pn accept failure to listen on all ports\n");
145@@ -859,6 +860,8 @@ ProcessCommandLine(int argc, char *argv[])
146 defaultBackingStore = WhenMapped;
147 else if ( strcmp( argv[i], "-wr") == 0)
148 whiteRoot = TRUE;
149+ else if ( strcmp( argv[i], "-nr") == 0)
150+ bgNoneRoot = TRUE;
151 else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
152 if(++i < argc) {
153 long reqSizeArg = atol(argv[i]);
154--
1551.5.3.4
156
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
new file mode 100644
index 0000000000..2754170d2f
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
@@ -0,0 +1,179 @@
1diff --git a/glx/glxdri2.c b/glx/glxdri2.c
2index 146ea82..3b5338b 100644
3--- a/glx/glxdri2.c
4+++ b/glx/glxdri2.c
5@@ -70,6 +70,7 @@ struct __GLXDRIscreen {
6
7 const __DRIcoreExtension *core;
8 const __DRIdri2Extension *dri2;
9+ const __DRI2flushExtension *flush;
10 const __DRIcopySubBufferExtension *copySubBuffer;
11 const __DRIswapControlExtension *swapControl;
12 const __DRItexBufferExtension *texBuffer;
13@@ -135,10 +136,14 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *drawable,
14 static GLboolean
15 __glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
16 {
17- __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
18+ __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable;
19+ __GLXDRIscreen *screen = priv->screen;
20+
21+ if (!DRI2SwapBuffers(drawable->pDraw))
22+ return FALSE;
23
24- __glXDRIdrawableCopySubBuffer(drawable, 0, 0,
25- private->width, private->height);
26+ if (screen->flush->flushInvalidate)
27+ (*screen->flush->flushInvalidate)(priv->driDrawable);
28
29 return TRUE;
30 }
31diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
32index 580383d..23e6467 100644
33--- a/hw/xfree86/dri2/dri2.c
34+++ b/hw/xfree86/dri2/dri2.c
35@@ -70,6 +70,7 @@ typedef struct _DRI2Screen {
36 DRI2CreateBufferProcPtr CreateBuffer;
37 DRI2DestroyBufferProcPtr DestroyBuffer;
38 DRI2CopyRegionProcPtr CopyRegion;
39+ DRI2SwapBuffersProcPtr SwapBuffers;
40
41 HandleExposuresProcPtr HandleExposures;
42 } DRI2ScreenRec, *DRI2ScreenPtr;
43@@ -422,6 +423,49 @@ DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
44 return Success;
45 }
46
47+Bool
48+DRI2SwapBuffers(DrawablePtr pDraw)
49+{
50+ DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
51+ DRI2DrawablePtr pPriv;
52+ DRI2BufferPtr pDestBuffer, pSrcBuffer;
53+ int i;
54+
55+ pPriv = DRI2GetDrawable(pDraw);
56+ if (pPriv == NULL)
57+ return FALSE;
58+
59+ pDestBuffer = NULL;
60+ pSrcBuffer = NULL;
61+ for (i = 0; i < pPriv->bufferCount; i++)
62+ {
63+ if (pPriv->buffers[i]->attachment == DRI2BufferFrontLeft)
64+ pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i];
65+ if (pPriv->buffers[i]->attachment == DRI2BufferBackLeft)
66+ pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i];
67+ }
68+ if (pSrcBuffer == NULL || pDestBuffer == NULL)
69+ return FALSE;
70+
71+ if (ds->SwapBuffers) {
72+ if ((*ds->SwapBuffers)(pDraw, pDestBuffer, pSrcBuffer))
73+ return TRUE;
74+ }
75+
76+ BoxRec box;
77+ RegionRec region;
78+
79+ box.x1 = 0;
80+ box.y1 = 0;
81+ box.x2 = pDraw->width;
82+ box.y2 = pDraw->height;
83+ REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
84+ if (DRI2CopyRegion(pDraw, &region, DRI2BufferFrontLeft, DRI2BufferBackLeft) != Success)
85+ return FALSE;
86+
87+ return TRUE;
88+}
89+
90 void
91 DRI2DestroyDrawable(DrawablePtr pDraw)
92 {
93@@ -538,6 +582,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
94 }
95 ds->CopyRegion = info->CopyRegion;
96
97+ if (info->version >= 3)
98+ ds->SwapBuffers = info->SwapBuffers;
99+
100 dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds);
101
102 xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
103diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
104index f369267..e2784dd 100644
105--- a/hw/xfree86/dri2/dri2.h
106+++ b/hw/xfree86/dri2/dri2.h
107@@ -67,6 +67,10 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw,
108 DRI2BufferPtr pDestBuffer,
109 DRI2BufferPtr pSrcBuffer);
110
111+typedef Bool (*DRI2SwapBuffersProcPtr)(DrawablePtr pDraw,
112+ DRI2BufferPtr pFrontBuffer,
113+ DRI2BufferPtr pBackBuffer);
114+
115 typedef void (*DRI2WaitProcPtr)(WindowPtr pWin,
116 unsigned int sequence);
117
118@@ -90,6 +94,7 @@ typedef struct {
119 DRI2CreateBuffersProcPtr CreateBuffers;
120 DRI2DestroyBuffersProcPtr DestroyBuffers;
121 DRI2CopyRegionProcPtr CopyRegion;
122+ DRI2SwapBuffersProcPtr SwapBuffers;
123 DRI2WaitProcPtr Wait;
124
125 /**
126@@ -153,4 +158,6 @@ extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw,
127 int *width, int *height, unsigned int *attachments, int count,
128 int *out_count);
129
130+extern _X_EXPORT Bool DRI2SwapBuffers(DrawablePtr pDraw);
131+
132 #endif
133diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
134index 3c06174..67b419b 100644
135--- a/hw/xfree86/dri2/dri2ext.c
136+++ b/hw/xfree86/dri2/dri2ext.c
137@@ -81,7 +81,7 @@ ProcDRI2QueryVersion(ClientPtr client)
138 rep.length = 0;
139 rep.sequenceNumber = client->sequence;
140 rep.majorVersion = 1;
141- rep.minorVersion = 1;
142+ rep.minorVersion = 2;
143
144 if (client->swapped) {
145 swaps(&rep.sequenceNumber, n);
146@@ -323,6 +323,24 @@ ProcDRI2CopyRegion(ClientPtr client)
147 }
148
149 static int
150+ProcDRI2SwapBuffers(ClientPtr client)
151+{
152+ REQUEST(xDRI2SwapBuffersReq);
153+ DrawablePtr pDrawable;
154+ int status;
155+
156+ REQUEST_SIZE_MATCH(xDRI2SwapBuffersReq);
157+
158+ if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
159+ return status;
160+
161+ if (!DRI2SwapBuffers(pDrawable))
162+ return BadAlloc;
163+
164+ return client->noClientException;
165+}
166+
167+static int
168 ProcDRI2Dispatch (ClientPtr client)
169 {
170 REQUEST(xReq);
171@@ -350,6 +368,8 @@ ProcDRI2Dispatch (ClientPtr client)
172 return ProcDRI2CopyRegion(client);
173 case X_DRI2GetBuffersWithFormat:
174 return ProcDRI2GetBuffersWithFormat(client);
175+ case X_DRI2SwapBuffers:
176+ return ProcDRI2SwapBuffers(client);
177 default:
178 return BadRequest;
179 }
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
new file mode 100644
index 0000000000..efc85a42ab
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
@@ -0,0 +1,38 @@
1diff --git a/os/log.c b/os/log.c
2index 0860847..2c46f1a 100644
3--- a/os/log.c
4+++ b/os/log.c
5@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
6 static char tmpBuffer[1024];
7 int len = 0;
8
9+ struct timeval time;
10+ time_t tv_sec;
11+ suseconds_t tv_usec;
12+ static Bool first = TRUE;
13+ static time_t start_tv_sec;
14+ static suseconds_t start_usec;
15+ int diff_sec, diff_usec;
16+
17+ gettimeofday(&time, NULL);
18+ tv_sec = time.tv_sec;
19+ tv_usec = time.tv_usec;
20+ if (first == TRUE) {
21+ start_tv_sec = tv_sec;
22+ start_usec = tv_usec;
23+ first = FALSE;
24+ }
25+ diff_sec = (int)difftime(tv_sec, start_tv_sec);
26+ diff_usec = (tv_usec - start_usec);
27+ if (diff_usec < 0) {
28+ diff_sec--;
29+ diff_usec += 1000000;
30+ }
31+ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
32+ len = strlen(tmpBuffer);
33+ if (logFile)
34+ fwrite(tmpBuffer, len, 1, logFile);
35+
36 /*
37 * Since a va_list can only be processed once, write the string to a
38 * buffer, and then write the buffer out to the appropriate output
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
new file mode 100644
index 0000000000..afc94dcc5c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
@@ -0,0 +1,105 @@
1diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
2index 7f40857..cf58c01 100644
3--- a/hw/xfree86/os-support/linux/lnx_init.c
4+++ b/hw/xfree86/os-support/linux/lnx_init.c
5@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
6 static int VTnum = -1;
7 static Bool VTSwitch = TRUE;
8 static Bool ShareVTs = FALSE;
9+Bool NoHwAccess = FALSE;
10 static int activeVT = -1;
11
12 static int vtPermSave[4];
13@@ -80,9 +81,11 @@ saveVtPerms(void)
14 static void
15 restoreVtPerms(void)
16 {
17- /* Set the terminal permissions back to before we started. */
18- chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
19- chown(vtname, vtPermSave[2], vtPermSave[3]);
20+ if (geteuid() == 0) {
21+ /* Set the terminal permissions back to before we started. */
22+ (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
23+ (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
24+ }
25 }
26
27 static void *console_handler;
28@@ -210,20 +213,22 @@ xf86OpenConsole(void)
29 xf86Msg(X_WARNING,
30 "xf86OpenConsole: Could not save ownership of VT\n");
31
32- /* change ownership of the vt */
33- if (chown(vtname, getuid(), getgid()) < 0)
34- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
35- vtname, strerror(errno));
36-
37- /*
38- * the current VT device we're running on is not "console", we want
39- * to grab all consoles too
40- *
41- * Why is this needed??
42- */
43- if (chown("/dev/tty0", getuid(), getgid()) < 0)
44- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
45- strerror(errno));
46+ if (geteuid() == 0) {
47+ /* change ownership of the vt */
48+ if (chown(vtname, getuid(), getgid()) < 0)
49+ xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
50+ vtname, strerror(errno));
51+
52+ /*
53+ * the current VT device we're running on is not
54+ * "console", we want to grab all consoles too
55+ *
56+ * Why is this needed??
57+ */
58+ if (chown("/dev/tty0", getuid(), getgid()) < 0)
59+ xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
60+ strerror(errno));
61+ }
62 }
63
64 /*
65@@ -433,6 +438,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
66 ShareVTs = TRUE;
67 return(1);
68 }
69+ if (!strcmp(argv[i], "-nohwaccess"))
70+ {
71+ NoHwAccess = TRUE;
72+ return(1);
73+ }
74 if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
75 {
76 if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
77@@ -454,5 +464,6 @@ xf86UseMsg()
78 ErrorF("don't detach controlling tty (for debugging only)\n");
79 ErrorF("-novtswitch don't immediately switch to new VT\n");
80 ErrorF("-sharevts share VTs with another X server\n");
81+ ErrorF("-nohwaccess don't access hardware ports directly\n");
82 return;
83 }
84diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
85index 688106a..34a845b 100644
86--- a/hw/xfree86/os-support/linux/lnx_video.c
87+++ b/hw/xfree86/os-support/linux/lnx_video.c
88@@ -51,6 +51,7 @@
89 #define MAP_FAILED ((void *)-1)
90 #endif
91
92+extern Bool NoHwAccess;
93 static Bool ExtendedEnabled = FALSE;
94
95 #ifdef __ia64__
96@@ -509,6 +510,9 @@ xf86EnableIO(void)
97 int fd;
98 unsigned int ioBase_phys;
99 #endif
100+ /* Fake it... */
101+ if (NoHwAccess)
102+ return TRUE;
103
104 if (ExtendedEnabled)
105 return TRUE;
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.8.99.904.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.8.99.904.bb
new file mode 100644
index 0000000000..98d79a1b28
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.8.99.904.bb
@@ -0,0 +1,20 @@
1require xserver-xf86-dri-lite.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=3dd2bbe3563837f80ed8926b06c1c353"
4
5PROTO_DEPS += "xf86driproto dri2proto"
6
7DEPENDS += "font-util"
8
9PE = "1"
10PR = "r1"
11
12SRC_URI += "file://nodolt.patch \
13 file://crosscompile.patch"
14# file://libdri-xinerama-symbol.patch;patch=1 \
15# file://xserver-boottime.patch;patch=1"
16
17# Misc build failure for master HEAD
18SRC_URI += "file://fix_open_max_preprocessor_error.patch"
19
20EXTRA_OECONF += "--enable-dri --enable-dri2"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_git.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_git.bb
new file mode 100644
index 0000000000..4789f28f5f
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_git.bb
@@ -0,0 +1,31 @@
1require xserver-xf86-dri-lite.inc
2
3PE = "1"
4PR = "r0"
5PV = "1.7.99+git${SRCPV}"
6
7PROTO_DEPS += "xf86driproto dri2proto"
8
9DEPENDS += "font-util"
10
11RDEPENDS_${PN} += "xkeyboard-config"
12
13# file://cache-xkbcomp-output-for-fast-start-up.patch;patch=1 \
14# file://xserver-1.5.0-bg-none-root.patch;patch=1 \
15# file://xserver-no-root-2.patch;patch=1 \
16# file://xserver-boottime.patch;patch=1"
17# file://xserver-DRI2Swapbuffer.patch;patch=1"
18
19
20SRC_URI = "git://anongit.freedesktop.org/git/xorg/xserver;protocol=git;branch=master \
21 file://nodolt.patch;patch=1 \
22 file://crosscompile.patch;patch=1 \
23 file://fix_macros1.patch;patch=1"
24# file://libdri-xinerama-symbol.patch;patch=1"
25
26# Misc build failure for master HEAD
27SRC_URI += "file://fix_open_max_preprocessor_error.patch;patch=1"
28
29EXTRA_OECONF += "--enable-dri --enable-dri2 --enable-dga"
30
31S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite.inc b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite.inc
new file mode 100644
index 0000000000..7150a2a466
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite.inc
@@ -0,0 +1,34 @@
1require xserver-xf86-common.inc
2
3PROVIDES += "xserver-xf86-lite"
4
5PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86rushproto xf86vidmodeproto xf86bigfontproto compositeproto recordproto resourceproto videoproto scrnsaverproto evieext trapproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto glproto"
6
7LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess openssl"
8
9DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}"
10
11RDEPENDS_${PN} += "hal xorg-minimal-fonts"
12
13FILES_${PN} += "${bindir}/Xorg "
14
15EXTRA_OECONF += "--disable-static \
16 --disable-acfb \
17 --disable-ccfb \
18 --disable-mcfb \
19 --disable-dga \
20 --disable-xinerama \
21 --disable-xf86misc \
22 --disable-xorgcfg \
23 --disable-record \
24 --disable-dmx \
25 --disable-xnest \
26 --disable-xvfb \
27 --enable-composite \
28 --disable-dri \
29 --disable-glx \
30 --sysconfdir=/etc/X11 \
31 --localstatedir=/var \
32 --with-fontdir=/usr/share/fonts/X11 \
33 --with-xkb-output=/var/lib/xkb \
34 ac_cv_file__usr_share_sgml_X11_defs_ent=no"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/crosscompile.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/crosscompile.patch
new file mode 100644
index 0000000000..2341e40bca
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/crosscompile.patch
@@ -0,0 +1,19 @@
1Index: xorg-server-1.7.99.2/configure.ac
2===================================================================
3--- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
4+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
5@@ -503,14 +503,10 @@
6
7 dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
8 dnl otherwise uses standard subdirectories of FONTROOTDIR
9-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
10- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
11- [
12 DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
13 case $host_os in
14 darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
15 esac
16- ])
17 AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
18 [ FONTPATH="$withval" ],
19 [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/drmfix.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/drmfix.patch
new file mode 100644
index 0000000000..a62a767f23
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/drmfix.patch
@@ -0,0 +1,13 @@
1Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
2===================================================================
3--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
4+++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
5@@ -41,7 +41,7 @@
6
7 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
8
9-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
10+INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
11
12 # FIXME: These need to be added to the build
13 LNX_EXTRA_SRCS = \
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/fix_open_max_preprocessor_error.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/fix_open_max_preprocessor_error.patch
new file mode 100644
index 0000000000..565832eed8
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/fix_open_max_preprocessor_error.patch
@@ -0,0 +1,13 @@
1Index: git/os/osdep.h
2===================================================================
3--- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
4+++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
5@@ -92,7 +92,7 @@
6 * like sysconf(_SC_OPEN_MAX) is not supported.
7 */
8
9-#if OPEN_MAX <= 256
10+#if 0
11 #define MAXSOCKS (OPEN_MAX - 1)
12 #else
13 #define MAXSOCKS 256
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/libdri-xinerama-symbol.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/libdri-xinerama-symbol.patch
new file mode 100644
index 0000000000..db29da93ca
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/libdri-xinerama-symbol.patch
@@ -0,0 +1,50 @@
1Index: xorg-server-1.5.0/hw/xfree86/dri/dri.c
2===================================================================
3--- xorg-server-1.5.0.orig/hw/xfree86/dri/dri.c 2008-09-24 17:43:04.000000000 +0100
4+++ xorg-server-1.5.0/hw/xfree86/dri/dri.c 2008-09-24 17:46:38.000000000 +0100
5@@ -73,10 +73,6 @@
6
7 #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
8
9-#if !defined(PANORAMIX)
10-extern Bool noPanoramiXExtension;
11-#endif
12-
13 static int DRIEntPrivIndex = -1;
14 static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
15 static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
16@@ -307,7 +303,6 @@
17 drm_context_t * reserved;
18 int reserved_count;
19 int i;
20- Bool xineramaInCore = FALSE;
21 DRIEntPrivPtr pDRIEntPriv;
22 ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
23 DRIContextFlags flags = 0;
24@@ -320,20 +315,13 @@
25 return FALSE;
26 }
27
28- /*
29- * If Xinerama is on, don't allow DRI to initialise. It won't be usable
30- * anyway.
31- */
32- if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
33- xineramaInCore = TRUE;
34-
35- if (xineramaInCore) {
36- if (!noPanoramiXExtension) {
37- DRIDrvMsg(pScreen->myNum, X_WARNING,
38- "Direct rendering is not supported when Xinerama is enabled\n");
39- return FALSE;
40- }
41+#if defined(PANORAMIX)
42+ if (!noPanoramiXExtension) {
43+ DRIDrvMsg(pScreen->myNum, X_WARNING,
44+ "Direct rendering is not supported when Xinerama is enabled\n");
45+ return FALSE;
46 }
47+#endif
48
49 if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize,
50 pDRIInfo->busIdString,
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/nodolt.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/nodolt.patch
new file mode 100644
index 0000000000..6b34032a39
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/nodolt.patch
@@ -0,0 +1,12 @@
1Index: git/configure.ac
2===================================================================
3--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
4+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
5@@ -62,7 +62,6 @@
6 AC_LIBTOOL_WIN32_DLL
7 AC_DISABLE_STATIC
8 AC_PROG_LIBTOOL
9-DOLT
10 AC_PROG_MAKE_SET
11 PKG_PROG_PKG_CONFIG
12 AC_PROG_LEX
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/revert_make_sys_c_use_unaligned_access_functions.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/revert_make_sys_c_use_unaligned_access_functions.patch
new file mode 100644
index 0000000000..235b55153a
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite/revert_make_sys_c_use_unaligned_access_functions.patch
@@ -0,0 +1,256 @@
1From 74ab27f64a747ee45810f99cdc6e29b82cf8035e Mon Sep 17 00:00:00 2001
2From: Tiago Vignatti <tiago.vignatti@nokia.com>
3Date: Mon, 28 Dec 2009 16:00:28 +0000
4Subject: Revert "Make sys.c use unaligned access functions provided in compiler."
5
6This reverts commit da923d0bc15e99a8ed1986bd6f5df37f7af7284b.
7
8Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
9Signed-off-by: Keith Packard <keithp@keithp.com>
10---
11diff --git a/hw/xfree86/x86emu/Makefile.am b/hw/xfree86/x86emu/Makefile.am
12index e7368f5..df96977 100644
13--- a/hw/xfree86/x86emu/Makefile.am
14+++ b/hw/xfree86/x86emu/Makefile.am
15@@ -11,7 +11,7 @@ libx86emu_la_SOURCES = debug.c \
16 sys.c \
17 x86emu.h
18
19-INCLUDES = $(XORG_INCS)
20+INCLUDES =
21
22 AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
23
24diff --git a/hw/xfree86/x86emu/sys.c b/hw/xfree86/x86emu/sys.c
25index 2ebf6f1..e15fb09 100644
26--- a/hw/xfree86/x86emu/sys.c
27+++ b/hw/xfree86/x86emu/sys.c
28@@ -48,13 +48,168 @@
29 #ifndef NO_SYS_HEADERS
30 #include <string.h>
31 #endif
32-#include "compiler.h" /* for unaligned access functions */
33 /*------------------------- Global Variables ------------------------------*/
34
35 X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */
36 X86EMU_intrFuncs _X86EMU_intrTab[256];
37
38 /*----------------------------- Implementation ----------------------------*/
39+#if defined(__alpha__) || defined(__alpha)
40+/* to cope with broken egcs-1.1.2 :-(((( */
41+
42+#define ALPHA_UALOADS
43+/*
44+ * inline functions to do unaligned accesses
45+ * from linux/include/asm-alpha/unaligned.h
46+ */
47+
48+/*
49+ * EGCS 1.1 knows about arbitrary unaligned loads. Define some
50+ * packed structures to talk about such things with.
51+ */
52+
53+#if defined(__GNUC__)
54+struct __una_u64 { unsigned long x __attribute__((packed)); };
55+struct __una_u32 { unsigned int x __attribute__((packed)); };
56+struct __una_u16 { unsigned short x __attribute__((packed)); };
57+#endif
58+
59+static __inline__ unsigned long ldq_u(unsigned long * r11)
60+{
61+#if defined(__GNUC__)
62+ const struct __una_u64 *ptr = (const struct __una_u64 *) r11;
63+ return ptr->x;
64+#else
65+ unsigned long r1,r2;
66+ __asm__("ldq_u %0,%3\n\t"
67+ "ldq_u %1,%4\n\t"
68+ "extql %0,%2,%0\n\t"
69+ "extqh %1,%2,%1"
70+ :"=&r" (r1), "=&r" (r2)
71+ :"r" (r11),
72+ "m" (*r11),
73+ "m" (*(const unsigned long *)(7+(char *) r11)));
74+ return r1 | r2;
75+#endif
76+}
77+
78+static __inline__ unsigned long ldl_u(unsigned int * r11)
79+{
80+#if defined(__GNUC__)
81+ const struct __una_u32 *ptr = (const struct __una_u32 *) r11;
82+ return ptr->x;
83+#else
84+ unsigned long r1,r2;
85+ __asm__("ldq_u %0,%3\n\t"
86+ "ldq_u %1,%4\n\t"
87+ "extll %0,%2,%0\n\t"
88+ "extlh %1,%2,%1"
89+ :"=&r" (r1), "=&r" (r2)
90+ :"r" (r11),
91+ "m" (*r11),
92+ "m" (*(const unsigned long *)(3+(char *) r11)));
93+ return r1 | r2;
94+#endif
95+}
96+
97+static __inline__ unsigned long ldw_u(unsigned short * r11)
98+{
99+#if defined(__GNUC__)
100+ const struct __una_u16 *ptr = (const struct __una_u16 *) r11;
101+ return ptr->x;
102+#else
103+ unsigned long r1,r2;
104+ __asm__("ldq_u %0,%3\n\t"
105+ "ldq_u %1,%4\n\t"
106+ "extwl %0,%2,%0\n\t"
107+ "extwh %1,%2,%1"
108+ :"=&r" (r1), "=&r" (r2)
109+ :"r" (r11),
110+ "m" (*r11),
111+ "m" (*(const unsigned long *)(1+(char *) r11)));
112+ return r1 | r2;
113+#endif
114+}
115+
116+/*
117+ * Elemental unaligned stores
118+ */
119+
120+static __inline__ void stq_u(unsigned long r5, unsigned long * r11)
121+{
122+#if defined(__GNUC__)
123+ struct __una_u64 *ptr = (struct __una_u64 *) r11;
124+ ptr->x = r5;
125+#else
126+ unsigned long r1,r2,r3,r4;
127+
128+ __asm__("ldq_u %3,%1\n\t"
129+ "ldq_u %2,%0\n\t"
130+ "insqh %6,%7,%5\n\t"
131+ "insql %6,%7,%4\n\t"
132+ "mskqh %3,%7,%3\n\t"
133+ "mskql %2,%7,%2\n\t"
134+ "bis %3,%5,%3\n\t"
135+ "bis %2,%4,%2\n\t"
136+ "stq_u %3,%1\n\t"
137+ "stq_u %2,%0"
138+ :"=m" (*r11),
139+ "=m" (*(unsigned long *)(7+(char *) r11)),
140+ "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
141+ :"r" (r5), "r" (r11));
142+#endif
143+}
144+
145+static __inline__ void stl_u(unsigned long r5, unsigned int * r11)
146+{
147+#if defined(__GNUC__)
148+ struct __una_u32 *ptr = (struct __una_u32 *) r11;
149+ ptr->x = r5;
150+#else
151+ unsigned long r1,r2,r3,r4;
152+
153+ __asm__("ldq_u %3,%1\n\t"
154+ "ldq_u %2,%0\n\t"
155+ "inslh %6,%7,%5\n\t"
156+ "insll %6,%7,%4\n\t"
157+ "msklh %3,%7,%3\n\t"
158+ "mskll %2,%7,%2\n\t"
159+ "bis %3,%5,%3\n\t"
160+ "bis %2,%4,%2\n\t"
161+ "stq_u %3,%1\n\t"
162+ "stq_u %2,%0"
163+ :"=m" (*r11),
164+ "=m" (*(unsigned long *)(3+(char *) r11)),
165+ "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
166+ :"r" (r5), "r" (r11));
167+#endif
168+}
169+
170+static __inline__ void stw_u(unsigned long r5, unsigned short * r11)
171+{
172+#if defined(__GNUC__)
173+ struct __una_u16 *ptr = (struct __una_u16 *) r11;
174+ ptr->x = r5;
175+#else
176+ unsigned long r1,r2,r3,r4;
177+
178+ __asm__("ldq_u %3,%1\n\t"
179+ "ldq_u %2,%0\n\t"
180+ "inswh %6,%7,%5\n\t"
181+ "inswl %6,%7,%4\n\t"
182+ "mskwh %3,%7,%3\n\t"
183+ "mskwl %2,%7,%2\n\t"
184+ "bis %3,%5,%3\n\t"
185+ "bis %2,%4,%2\n\t"
186+ "stq_u %3,%1\n\t"
187+ "stq_u %2,%0"
188+ :"=m" (*r11),
189+ "=m" (*(unsigned long *)(1+(char *) r11)),
190+ "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4)
191+ :"r" (r5), "r" (r11));
192+#endif
193+}
194+#endif
195
196 /****************************************************************************
197 PARAMETERS:
198@@ -107,7 +262,13 @@ u16 X86API rdw(
199 }
200 else
201 #endif
202+#if defined(ALPHA_UALOADS)
203 val = ldw_u((u16*)(M.mem_base + addr));
204+#elif defined(IA64_UALOADS)
205+ val = uldw((u16*)(M.mem_base + addr));
206+#else
207+ val = *(u16*)(M.mem_base + addr);
208+#endif
209 DB( if (DEBUG_MEM_TRACE())
210 printk("%#08x 2 -> %#x\n", addr, val);)
211 return val;
212@@ -140,7 +301,13 @@ u32 X86API rdl(
213 }
214 else
215 #endif
216+#if defined(ALPHA_UALOADS)
217 val = ldl_u((u32*)(M.mem_base + addr));
218+#elif defined(IA64_UALOADS)
219+ val = uldl((u32*)(M.mem_base + addr));
220+#else
221+ val = *(u32*)(M.mem_base + addr);
222+#endif
223 DB( if (DEBUG_MEM_TRACE())
224 printk("%#08x 4 -> %#x\n", addr, val);)
225 return val;
226@@ -192,7 +359,13 @@ DB( if (DEBUG_MEM_TRACE())
227 }
228 else
229 #endif
230+#if defined(ALPHA_UALOADS)
231 stw_u(val,(u16*)(M.mem_base + addr));
232+#elif defined(IA64_UALOADS)
233+ ustw(val,(u16*)(M.mem_base + addr));
234+#else
235+ *(u16*)(M.mem_base + addr) = val;
236+#endif
237 }
238
239 /****************************************************************************
240@@ -222,7 +395,13 @@ DB( if (DEBUG_MEM_TRACE())
241 }
242 else
243 #endif
244+#if defined(ALPHA_UALOADS)
245 stl_u(val,(u32*)(M.mem_base + addr));
246+#elif defined(IA64_UALOADS)
247+ ustl(val,(u32*)(M.mem_base + addr));
248+#else
249+ *(u32*)(M.mem_base + addr) = val;
250+#endif
251 }
252
253 /****************************************************************************
254--
255cgit v0.8.3-6-g21f6
256
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite_1.7.99.2.bb b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite_1.7.99.2.bb
new file mode 100644
index 0000000000..5ef23019ad
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-lite_1.7.99.2.bb
@@ -0,0 +1,12 @@
1require xserver-xf86-lite.inc
2
3PR = "r1"
4
5DEPENDS += "font-util"
6
7SRC_URI += "file://nodolt.patch;patch=1 \
8 file://crosscompile.patch;patch=1"
9
10# Misc build failure for master HEAD
11SRC_URI += "file://fix_open_max_preprocessor_error.patch;patch=1 \
12 file://revert_make_sys_c_use_unaligned_access_functions.patch;patch=1"