xserver: Branch 'randr-1.2-for-server-1.2' - 8 commits

Keith Packard keithp at kemper.freedesktop.org
Fri Dec 22 10:04:01 EET 2006


 configure.ac                              |    2 
 doc/Xserver.man.pre                       |    8 +
 hw/dmx/dmxextension.c                     |  133 ++++++++++++++++++++++
 hw/dmx/dmxinit.c                          |    2 
 hw/dmx/dmxpict.c                          |   85 ++++++++------
 hw/dmx/dmxpict.h                          |    2 
 hw/vfb/Makefile.am                        |    2 
 hw/xfree86/doc/man/Xorg.man.pre           |   60 ++++------
 hw/xfree86/doc/man/xorg.conf.man.pre      |    2 
 hw/xfree86/int10/generic.c                |    2 
 hw/xfree86/os-support/hurd/Makefile.am    |    7 -
 hw/xfree86/os-support/hurd/hurd_io.c      |  131 ++++++++++++++++++++++
 hw/xfree86/os-support/hurd/hurd_kbd.c     |  176 ++++++++++++++++++++++++++++++
 hw/xfree86/os-support/linux/int10/linux.c |    3 
 hw/xnest/Makefile.am                      |    1 
 hw/xprint/Makefile.am                     |    3 
 16 files changed, 541 insertions(+), 78 deletions(-)

New commits:
diff-tree 06a4be5e7a5371881106b6f51368330a33b26401 (from parents)
Merge: f42e3cea236fa0091ed398a818fc8e17b0e1b3df f4ef99e8168fd2931961aa0d42f0547c89d21c1f
Author: Keith Packard <keithp at guitar.keithp.com>
Date:   Thu Dec 21 23:52:24 2006 -0800

    Merge branch 'server-1.2-branch' into randr-1.2-for-server-1.2

diff-tree f4ef99e8168fd2931961aa0d42f0547c89d21c1f (from 198560a081eaedfb9872c0926a94c0298b9dcab8)
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Tue Dec 19 16:38:34 2006 -0800

    xorg.conf man page should say "XFree86-DGA", not "Xorg-DGA"
    (cherry picked from e437f357b6850a6c87ca6696870b3abd40e5b8ed commit)

diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index e44b551..f05ada6 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -649,7 +649,7 @@ being
 that are passed to the module when it is loaded.
 .PP
 Example: the extmod module (which contains a miscellaneous group of
-server extensions) can be loaded, with the __xservername__-DGA extension
+server extensions) can be loaded, with the XFree86-DGA extension
 disabled by using the following entry:
 .PP
 .RS 4
diff-tree 198560a081eaedfb9872c0926a94c0298b9dcab8 (from 5f14c9a78b74017cdc66b79b63b3b1f68cf24911)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Dec 21 09:06:44 2006 -0700

    added mipmap.c

diff --git a/GL/mesa/main/Makefile.am b/GL/mesa/main/Makefile.am
index 4d5b0cd..64b383d 100644
--- a/GL/mesa/main/Makefile.am
+++ b/GL/mesa/main/Makefile.am
@@ -60,6 +60,7 @@ nodist_libmain_la_SOURCES = accum.c \
                     light.c \
                     lines.c \
                     matrix.c \
+                    mipmap.c \
                     mm.c \
                     occlude.c \
                     pixel.c \
diff-tree 5f14c9a78b74017cdc66b79b63b3b1f68cf24911 (from bd7377f9e8b4730f0a776e68a6d4e895efb8daec)
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Mon Dec 18 14:51:04 2006 -0800

    Xorg & Xserver man page updates for 1.2 release
    
    - Added -extension & +extension to Xserver man page
    - Changed Xorg synopsis from X11R6 to X11R7
    - Clarified Xorg ancestry description
    - Moved Solaris to free/Open Source OS list
    - Removed references to MetroLink module loader & getconfig
    - Converted (1) to (__appmansuffix__) in a few more places
    - Replaced http://www.freedesktop.org/cvs/ with http://gitweb.freedesktop.org/
    (cherry picked from 1b029fd896b76096905c516925ce0214fe14632c commit)

diff --git a/doc/Xserver.man.pre b/doc/Xserver.man.pre
index b9597f1..7dd9270 100644
--- a/doc/Xserver.man.pre
+++ b/doc/Xserver.man.pre
@@ -159,6 +159,14 @@ default state is platform and configurat
 disables DPMS (display power management services).  The default state
 is platform and configuration specific.
 .TP 8
+.BI \-extension extensionName
+disables named extension.   If an unknown extension name is specified,
+a list of accepted extension names is printed.
+.TP 8
+.BI \+extension extensionName
+enables named extension.   If an unknown extension name is specified,
+a list of accepted extension names is printed.
+.TP 8
 .B \-f \fIvolume\fP
 sets feep (bell) volume (allowable range: 0-100).
 .TP 8
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index 8645732..0758eb0 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -1,7 +1,7 @@
 .\" $XdotOrg: xserver/xorg/hw/xfree86/doc/man/Xorg.man.pre,v 1.3 2005/07/04 18:41:01 ajax Exp $
 .TH __xservername__ __appmansuffix__ __vendorversion__
 .SH NAME
-__xservername__ - X11R6 X server
+__xservername__ - X11R7 X server
 .SH SYNOPSIS
 .B __xservername__
 .RI [\fB:\fP display ]
@@ -13,30 +13,26 @@ is a full featured X server that was ori
 UNIX-like operating systems running on Intel x86 hardware.  It now runs
 on a wider range of hardware and OS platforms.
 .PP
-This work was derived from
+This work was derived by the X.Org Foundation from the XFree86 Project's 
 .I "XFree86\ 4.4rc2"
-by the X.Org Foundation.
-The XFree86 4.4rc2 release was originally derived from
+release.
+The XFree86 release was originally derived from
 .I "X386\ 1.2"
 by Thomas Roell which was contributed to X11R5 by Snitily Graphics
-Consulting Service.  The
-.B __xservername__
-server architecture includes
-among many other things a loadable module system derived from code
-donated by Metro Link, Inc.  The current __xservername__ release is compatible
-with X11R6.6.
+Consulting Service.
 .SH PLATFORMS
 .PP
 .B __xservername__
 operates under a wide range of operating systems and hardware platforms.
 The Intel x86 (IA32) architecture is the most widely supported hardware
-platform.  Other hardware platforms include Compaq Alpha, Intel IA64,
+platform.  Other hardware platforms include Compaq Alpha, Intel IA64, AMD64,
 SPARC and PowerPC.  The most widely supported operating systems are the
-free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD and
-OpenBSD.  Commercial UNIX operating systems such as Solaris (x86) and
+free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD,
+OpenBSD, and Solaris.  Commercial UNIX operating systems such as
 UnixWare are also supported.  Other supported operating systems include
 LynxOS, and GNU Hurd.  Darwin and Mac OS X are supported with the
-XDarwin(1) X server.  Win32/Cygwin is supported with the XWin X server.
+XDarwin(__appmansuffix__) X server.  Win32/Cygwin is supported with the 
+XWin(__appmansuffix__) X server.
 .PP
 .SH "NETWORK CONNECTIONS"
 .B __xservername__
@@ -119,13 +115,14 @@ one way, the highest precedence mechanis
 is ordered from highest precedence to lowest.  Note that not all parameters
 can be supplied via all methods.  The available command line options
 and environment variables (and some defaults) are described here and in
-the Xserver(1) manual page.  Most configuration file parameters, with
-their defaults, are described in the __xconfigfile__(__filemansuffix__) manual
-page.  Driver and module specific configuration parameters are described
-in the relevant driver or module manual page.
+the Xserver(__appmansuffix__) manual page.  Most configuration file 
+parameters, with their defaults, are described in the
+__xconfigfile__(__filemansuffix__) manual page.  Driver and module specific 
+configuration parameters are described in the relevant driver or module 
+manual page.
 .PP
-In addition to the normal server options described in the Xserver(1)
-manual page,
+In addition to the normal server options described in the 
+Xserver(__appmansuffix__) manual page,
 .B __xservername__
 accepts the following command line switches:
 .TP 8
@@ -385,7 +382,8 @@ options.
 When this option is specified, the
 .B __xservername__
 server scans the PCI bus, and prints out some information about each
-device that was detected.  See also scanpci(1) and pcitweak(1).
+device that was detected.  See also scanpci(__appmansuffix__) 
+and pcitweak(__appmansuffix__).
 .TP 8
 .BI \-screen " screen-name"
 Use the __xconfigfile__(__filemansuffix__) file
@@ -508,13 +506,12 @@ for its initial setup.
 Refer to the __xconfigfile__(__filemansuffix__) manual page for information
 about the format of this file.
 .PP
-Starting with version 4.4,
 .B __xservername__
 has a mechanism for automatically generating a built-in configuration
 at run-time when no
 .B __xconfigfile__
 file is present.  The current version of this automatic configuration
-mechanism works in three ways.
+mechanism works in two ways.
 .PP
 The first is via enhancements that have made many components of the
 .B __xconfigfile__
@@ -523,14 +520,7 @@ reasonably deduced doesn't need to be sp
 reducing the amount of built-in configuration information that needs to
 be generated at run-time.
 .PP
-The second is to use an external utility called getconfig(1), when
-available, to use meta-configuration information to generate a suitable
-configuration for the primary video device.  The meta-configuration
-information can be updated to allow an existing installation to get the
-best out of new hardware or to work around bugs that are found
-post-release.
-.PP
-The third is to have "safe" fallbacks for most configuration information.
+The second is to have "safe" fallbacks for most configuration information.
 This maximises the likelihood that the
 .B __xservername__
 server will start up in some usable configuration even when information
@@ -644,7 +634,7 @@ __xservername__ was originally based on 
 That was originally based on \fIX386 1.2\fP by Thomas Roell, which
 was contributed to the then X Consortium's X11R5 distribution by SGCS.
 .PP
-__xservername__ is released by the X.org Foundation.
+__xservername__ is released by the X.Org Foundation.
 .PP
 The project that became XFree86 was originally founded in 1992 by
 David Dawes, Glenn Lai, Jim Tsillas and David Wexelblat.
@@ -685,9 +675,9 @@ Orest Zborowski    \fIorestz at eskimo.com\
 .RE
 .PP
 __xservername__ source is available from the FTP server
-\fI<ftp://ftp.x.org/>\fP, and from the X.org
-server \fI<http://www.freedesktop.org/cvs/>\fP.  Documentation and other
-information can be found from the X.org web site
+\fI<ftp://ftp.x.org/>\fP, and from the X.Org
+server \fI<http://gitweb.freedesktop.org/>\fP.  Documentation and other
+information can be found from the X.Org web site
 \fI<http://www.x.org/>\fP.
 
 .SH LEGAL
diff-tree bd7377f9e8b4730f0a776e68a6d4e895efb8daec (from c10663e9cc6ee6616dd3ece8798591fd400d3914)
Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date:   Sat Dec 16 19:41:20 2006 +0200

    xfree86/hurd: re-add missing keyboard support (bug #5613)
    
    Re-add missing hurd_io.c and hurd_kbd.c, which aren't needed in master,
    but are required in the 1.2.x branch.

diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index a050876..4994b3a 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -1,7 +1,7 @@
 noinst_LTLIBRARIES = libhurd.la
 
 libhurd_la_SOURCES = hurd_init.c hurd_mmap.c \
-		hurd_mouse.c hurd_video.c \
+		hurd_mouse.c hurd_video.c hurd_io.c hurd_kbd.c \
 		$(srcdir)/../shared/VTsw_noop.c \
 		$(srcdir)/../shared/posix_tty.c \
 		$(srcdir)/../shared/libc_wrapper.c \
@@ -10,8 +10,9 @@ libhurd_la_SOURCES = hurd_init.c hurd_mm
 		$(srcdir)/../shared/sigiostubs.c \
 		$(srcdir)/../shared/pm_noop.c \
 		$(srcdir)/../shared/kmod_noop.c \
-		$(srcdir)/../shared/agp_noop.c
+		$(srcdir)/../shared/agp_noop.c \
+		$(srcdir)/../shared/at_scancode.c
 
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
 
 INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/hurd/hurd_io.c b/hw/xfree86/os-support/hurd/hurd_io.c
new file mode 100644
index 0000000..d9e3d1d
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_io.c
@@ -0,0 +1,131 @@
+/*
+ * Copyright 1997,1998 by UCHIYAMA Yasushi
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c,v 1.8 2002/10/11 01:40:35 dawes Exp $ */
+
+#define NEED_EVENTS
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "mipointer.h"
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <assert.h>
+#include <mach.h>
+#include <sys/ioctl.h>
+
+typedef unsigned short kev_type;		/* kd event type */
+typedef unsigned char Scancode;
+
+struct mouse_motion {		
+    short mm_deltaX;		/* units? */
+    short mm_deltaY;
+};
+
+typedef struct {
+    kev_type type;			/* see below */
+    struct timeval time;		/* timestamp */
+    union {				/* value associated with event */
+	boolean_t up;		/* MOUSE_LEFT .. MOUSE_RIGHT */
+	Scancode sc;		/* KEYBD_EVENT */
+	struct mouse_motion mmotion;	/* MOUSE_MOTION */
+    } value;
+} kd_event;
+
+/* 
+ * kd_event ID's.
+ */
+#define MOUSE_LEFT	1		/* mouse left button up/down */
+#define MOUSE_MIDDLE	2
+#define MOUSE_RIGHT	3
+#define MOUSE_MOTION	4		/* mouse motion */
+#define KEYBD_EVENT	5		/* key up/down */
+
+/***********************************************************************
+ * Keyboard
+ **********************************************************************/
+void 
+xf86SoundKbdBell(int loudness,int pitch,int duration)
+{
+    return;
+}
+
+void 
+xf86SetKbdLeds(int leds)
+{
+    return;
+}
+
+int 
+xf86GetKbdLeds()
+{
+    return 0;
+}
+
+void 
+xf86SetKbdRepeat(char rad)
+{
+    return;
+}
+
+void 
+xf86KbdInit()
+{
+    return;
+}
+int
+xf86KbdOn()
+{
+    int data = 1;
+    if( ioctl( xf86Info.consoleFd, _IOW('k', 1, int),&data) < 0)
+	FatalError("Cannot set event mode on keyboard (%s)\n",strerror(errno));
+    return xf86Info.consoleFd;
+}
+int
+xf86KbdOff()
+{
+    int data = 2;
+    if( ioctl( xf86Info.consoleFd, _IOW('k', 1, int),&data) < 0)
+	FatalError("can't reset keyboard mode (%s)\n",strerror(errno));
+}
+
+void
+xf86KbdEvents()
+{
+    kd_event ke;
+    while( read(xf86Info.consoleFd, &ke, sizeof(ke)) == sizeof(ke) )
+	xf86PostKbdEvent(ke.value.sc);
+}
diff --git a/hw/xfree86/os-support/hurd/hurd_kbd.c b/hw/xfree86/os-support/hurd/hurd_kbd.c
new file mode 100644
index 0000000..4fdd627
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_kbd.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright 1997,1998 by UCHIYAMA Yasushi
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_io.c,v 1.8 2002/10/11 01:40:35 dawes Exp $ */
+
+#define NEED_EVENTS
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include "xf86Xinput.h"
+#include "xf86OSKbd.h"
+#include "atKeynames.h"
+#include "xf86Keymap.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <assert.h>
+#include <mach.h>
+#include <sys/ioctl.h>
+
+typedef unsigned short kev_type;		/* kd event type */
+typedef unsigned char Scancode;
+
+struct mouse_motion {		
+    short mm_deltaX;		/* units? */
+    short mm_deltaY;
+};
+
+typedef struct {
+    kev_type type;			/* see below */
+    struct timeval time;		/* timestamp */
+    union {				/* value associated with event */
+	boolean_t up;		/* MOUSE_LEFT .. MOUSE_RIGHT */
+	Scancode sc;		/* KEYBD_EVENT */
+	struct mouse_motion mmotion;	/* MOUSE_MOTION */
+    } value;
+} kd_event;
+
+/* 
+ * kd_event ID's.
+ */
+#define MOUSE_LEFT	1		/* mouse left button up/down */
+#define MOUSE_MIDDLE	2
+#define MOUSE_RIGHT	3
+#define MOUSE_MOTION	4		/* mouse motion */
+#define KEYBD_EVENT	5		/* key up/down */
+
+/***********************************************************************
+ * Keyboard
+ **********************************************************************/
+static void 
+SoundKbdBell(InputInfoPtr pInfo, int loudness,int pitch,int duration)
+{
+    return;
+}
+
+static void 
+SetKbdLeds(InputInfoPtr pInfo, int leds)
+{
+    return;
+}
+
+static int 
+GetKbdLeds(InputInfoPtr pInfo)
+{
+    return 0;
+}
+
+static void 
+SetKbdRepeat(InputInfoPtr pInfo, char rad)
+{
+    return;
+}
+
+static void
+KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
+{
+    pKeySyms->map        = map;
+    pKeySyms->mapWidth   = GLYPHS_PER_KEY;
+    pKeySyms->minKeyCode = MIN_KEYCODE;
+    pKeySyms->maxKeyCode = MAX_KEYCODE;
+    return;
+}
+
+static int
+KbdOn(InputInfoPtr pInfo, int what)
+{
+    int data = 1;
+    if( ioctl( pInfo->fd, _IOW('k', 1, int),&data) < 0)
+	FatalError("Cannot set event mode on keyboard (%s)\n",strerror(errno));
+    return Success;
+}
+static int
+KbdOff(InputInfoPtr pInfo, int what)
+{
+    int data = 2;
+    if( ioctl( pInfo->fd, _IOW('k', 1, int),&data) < 0)
+	FatalError("can't reset keyboard mode (%s)\n",strerror(errno));
+    return Success;
+}
+
+static int
+KbdInit(InputInfoPtr pInfo, int what)
+{
+    return Success;
+}
+
+static void
+ReadInput(InputInfoPtr pInfo)
+{
+    KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
+    kd_event ke;
+    while( read(pInfo->fd, &ke, sizeof(ke)) == sizeof(ke) )
+	pKbd->PostEvent(pInfo, ke.value.sc & 0x7f, ke.value.sc & 0x80 ? FALSE : TRUE);
+}
+
+static Bool
+OpenKeyboard(InputInfoPtr pInfo)
+{
+    pInfo->fd = xf86Info.consoleFd;
+    return TRUE;
+}
+
+Bool
+xf86OSKbdPreInit(InputInfoPtr pInfo)
+{
+    KbdDevPtr pKbd = pInfo->private;
+
+    pKbd->KbdInit       = KbdInit;
+    pKbd->KbdOn         = KbdOn;
+    pKbd->KbdOff        = KbdOff;
+    pKbd->Bell          = SoundKbdBell;
+    pKbd->SetLeds       = SetKbdLeds;
+    pKbd->GetLeds       = GetKbdLeds;
+    pKbd->SetKbdRepeat  = SetKbdRepeat;
+    pKbd->KbdGetMapping = KbdGetMapping;
+    pKbd->SpecialKey    = NULL;
+    pKbd->RemapScanCode = ATScancode;
+    pKbd->GetSpecialKey = NULL;
+    pKbd->OpenKeyboard  = OpenKeyboard;
+    pKbd->vtSwitchSupported = FALSE;
+    pKbd->CustomKeycodes = FALSE;
+    pKbd->private       = NULL;
+    pInfo->read_input   = ReadInput;
+    return TRUE;
+}
diff-tree c10663e9cc6ee6616dd3ece8798591fd400d3914 (from 7d927a6f6a5bb7c09216fea273df72940676c654)
Author: James Steven Supancic III <arrummzen at arrummzen.net>
Date:   Sat Dec 16 12:04:42 2006 -0500

    Fix RENDER issues (bug #7555) and implement RENDER add/remove screen
    support (bug #8485).

diff --git a/configure.ac b/configure.ac
index 249f58d..f1a1e2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -936,7 +936,7 @@ dnl ------------------------------------
 dnl DMX DDX
 
 AC_MSG_CHECKING([whether to build Xdmx DDX])
-PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
+PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
 if test "x$DMX" = xauto; then
 	DMX="$have_dmx"
 fi
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index efcaca4..c12973b 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -1056,6 +1056,116 @@ static Bool dmxCompareScreens(DMXScreenI
     return TRUE;
 }
 
+#ifdef RENDER
+/** Restore Render's picture */
+static void dmxBERestoreRenderPict(pointer value, XID id, pointer n)
+{
+    PicturePtr   pPicture = value;               /* The picture */
+    DrawablePtr  pDraw    = pPicture->pDrawable; /* The picture's drawable */
+    int          scrnNum  = (int)n;
+
+    if (pDraw->pScreen->myNum != scrnNum) {
+	/* Picture not on the screen we are restoring*/
+	return;
+    }
+
+    if (pDraw->type == DRAWABLE_PIXMAP) {
+	PixmapPtr  pPixmap = (PixmapPtr)pDraw;
+	
+	/* Create and restore the pixmap drawable */
+	dmxBECreatePixmap(pPixmap);
+	dmxBERestorePixmap(pPixmap);
+    }
+
+    dmxBECreatePicture(pPicture);
+}
+
+/** Restore Render's glyphs */
+static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
+{
+    GlyphSetPtr      glyphSet   = value;
+    int              scrnNum    = (int)n;
+    dmxGlyphPrivPtr  glyphPriv  = DMX_GET_GLYPH_PRIV(glyphSet);
+    DMXScreenInfo   *dmxScreen  = &dmxScreens[scrnNum];
+    GlyphRefPtr      table;
+    char            *images;
+    Glyph           *gids;
+    XGlyphInfo      *glyphs;
+    char            *pos;
+    int              beret;
+    int              len_images = 0;
+    int              i;
+    int              ctr;
+
+    if (glyphPriv->glyphSets[scrnNum]) {
+	/* Only restore glyphs on the screen we are attaching */
+	return;
+    }
+
+    /* First we must create the glyph set on the backend. */
+    if ((beret = dmxBECreateGlyphSet(scrnNum, glyphSet)) != Success) {
+	dmxLog(dmxWarning,
+	       "\tdmxBERestoreRenderGlyph failed to create glyphset!\n");
+	return;
+    }
+
+    /* Now for the complex part, restore the glyph data */
+    table = glyphSet->hash.table;
+
+    /* We need to know how much memory to allocate for this part */
+    for (i = 0; i < glyphSet->hash.hashSet->size; i++) {
+	GlyphRefPtr  gr = &table[i];
+	GlyphPtr     gl = gr->glyph;
+
+	if (!gl || gl == DeletedGlyph) continue;
+	len_images += gl->size - sizeof(gl->info);
+    }
+
+    /* Now allocate the memory we need */
+    images = ALLOCATE_LOCAL(len_images*sizeof(char));
+    gids   = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(Glyph));
+    glyphs = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
+
+    memset(images, 0, len_images * sizeof(char));
+    pos = images;
+    ctr = 0;
+    
+    /* Fill the allocated memory with the proper data */
+    for (i = 0; i < glyphSet->hash.hashSet->size; i++) {
+	GlyphRefPtr  gr = &table[i];
+	GlyphPtr     gl = gr->glyph;
+
+	if (!gl || gl == DeletedGlyph) continue;
+
+	/* First lets put the data into gids */
+	gids[ctr] = gr->signature;
+
+	/* Next do the glyphs data structures */
+	glyphs[ctr].width  = gl->info.width;
+	glyphs[ctr].height = gl->info.height;
+	glyphs[ctr].x      = gl->info.x;
+	glyphs[ctr].y      = gl->info.y;
+	glyphs[ctr].xOff   = gl->info.xOff;
+	glyphs[ctr].yOff   = gl->info.yOff;
+
+	/* Copy the images from the DIX's data into the buffer */
+	memcpy(pos, gl+1, gl->size - sizeof(gl->info));
+	pos += gl->size - sizeof(gl->info);
+	ctr++;
+    }
+    
+    /* Now restore the glyph data */
+    XRenderAddGlyphs(dmxScreen->beDisplay, glyphPriv->glyphSets[scrnNum],
+		     gids,glyphs, glyphSet->hash.tableEntries, images,
+		     len_images);
+
+    /* Clean up */
+    DEALLOCATE_LOCAL(len_images);
+    DEALLOCATE_LOCAL(gids);
+    DEALLOCATE_LOCAL(glyphs);    
+}
+#endif
+
 /** Reattach previously detached back-end screen. */
 int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
 {
@@ -1174,6 +1284,20 @@ int dmxAttachScreen(int idx, DMXScreenAt
     /* Create window hierarchy (top down) */
     dmxBECreateWindowTree(idx);
 
+#ifdef RENDER
+    /* Restore the picture state for RENDER */
+    for (i = currentMaxClients; --i >= 0; )
+	if (clients[i])
+	    FindClientResourcesByType(clients[i],PictureType, 
+				      dmxBERestoreRenderPict,(pointer)idx);
+
+    /* Restore the glyph state for RENDER */
+    for (i = currentMaxClients; --i >= 0; )
+	if (clients[i])
+	    FindClientResourcesByType(clients[i],GlyphSetType, 
+				      dmxBERestoreRenderGlyph,(pointer)idx);
+#endif
+
     /* Refresh screen by generating exposure events for all windows */
     dmxForceExposures(idx);
 
@@ -1362,8 +1486,15 @@ static void dmxBEDestroyResources(pointe
 #ifdef RENDER
     } else if ((type & TypeMask) == (PictureType & TypeMask)) {
 	PicturePtr  pPict = value;
-	if (pPict->pDrawable->pScreen->myNum == scrnNum)
+	if (pPict->pDrawable->pScreen->myNum == scrnNum) {
+	    /* Free the pixmaps on the backend if needed */
+	    if (pPict->pDrawable->type == DRAWABLE_PIXMAP) {
+		PixmapPtr pPixmap = (PixmapPtr)(pPict->pDrawable);
+		dmxBESavePixmap(pPixmap);
+		dmxBEFreePixmap(pPixmap);
+	    }
 	    dmxBEFreePicture((PicturePtr)value);
+	}
     } else if ((type & TypeMask) == (GlyphSetType & TypeMask)) {
 	dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr)value);
 #endif
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 9c5356e..1d3689c 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -624,7 +624,7 @@ void InitOutput(ScreenInfo *pScreenInfo,
     }
 
     /* Make sure that the command-line arguments are sane. */
-    if (dmxAddRemoveScreens && (!noRenderExtension || dmxGLXProxy)) {
+    if (dmxAddRemoveScreens && dmxGLXProxy) {
 	/* Currently it is not possible to support GLX and Render
 	 * extensions with dynamic screen addition/removal due to the
 	 * state that each extension keeps, which cannot be restored. */
diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 9cdd123..f2d050f 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -223,6 +223,36 @@ Bool dmxBEFreeGlyphSet(ScreenPtr pScreen
     return FALSE;
 }
 
+/** Create \a glyphSet on the backend screen number \a idx. */
+int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet)
+{
+    XRenderPictFormat *pFormat;
+    DMXScreenInfo     *dmxScreen = &dmxScreens[idx];
+    dmxGlyphPrivPtr    glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
+    PictFormatPtr      pFmt      = glyphSet->format;
+    int              (*oldErrorHandler)(Display *, XErrorEvent *);
+
+    pFormat = dmxFindFormat(dmxScreen, pFmt);
+    if (!pFormat) {
+	return BadMatch;
+    }
+
+    dmxGlyphLastError = 0;
+    oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler);
+
+    /* Catch when this fails */
+    glyphPriv->glyphSets[idx]
+	= XRenderCreateGlyphSet(dmxScreen->beDisplay, pFormat);
+
+    XSetErrorHandler(oldErrorHandler);
+
+    if (dmxGlyphLastError) {
+	return dmxGlyphLastError;
+    }
+
+    return Success;
+}
+
 /** Create a Glyph Set on each screen.  Save the glyphset ID from each
  *  screen in the Glyph Set's private structure.  Fail if the format
  *  requested is not available or if the Glyph Set cannot be created on
@@ -235,12 +265,9 @@ static int dmxProcRenderCreateGlyphSet(C
     ret = dmxSaveRenderVector[stuff->renderReqType](client);
 
     if (ret == Success) {
-	int              (*oldErrorHandler)(Display *, XErrorEvent *);
 	GlyphSetPtr        glyphSet;
 	dmxGlyphPrivPtr    glyphPriv;
 	int                i;
-	PictFormatPtr      pFmt;
-	XRenderPictFormat *pFormat;
 
 	/* Look up glyphSet that was just created ???? */
 	/* Store glyphsets from backends in glyphSet->devPrivate ????? */
@@ -254,21 +281,16 @@ static int dmxProcRenderCreateGlyphSet(C
         MAXSCREENSALLOC_RETURN(glyphPriv->glyphSets, BadAlloc);
 	DMX_SET_GLYPH_PRIV(glyphSet, glyphPriv);
 
-	pFmt = SecurityLookupIDByType(client, stuff->format, PictFormatType,
-				      SecurityReadAccess);
-
-	oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler);
-
 	for (i = 0; i < dmxNumScreens; i++) {
 	    DMXScreenInfo *dmxScreen = &dmxScreens[i];
+	    int beret;
 
 	    if (!dmxScreen->beDisplay) {
 		glyphPriv->glyphSets[i] = 0;
 		continue;
 	    }
 
-	    pFormat = dmxFindFormat(dmxScreen, pFmt);
-	    if (!pFormat) {
+	    if ((beret = dmxBECreateGlyphSet(i, glyphSet)) != Success) {
 		int  j;
 
 		/* Free the glyph sets we've allocated thus far */
@@ -278,30 +300,9 @@ static int dmxProcRenderCreateGlyphSet(C
 		/* Free the resource created by render */
 		FreeResource(stuff->gsid, RT_NONE);
 
-		ret = BadMatch;
-		break;
-	    }
-
-	    /* Catch when this fails */
-	    glyphPriv->glyphSets[i]
-		= XRenderCreateGlyphSet(dmxScreen->beDisplay, pFormat);
-
-	    if (dmxGlyphLastError) {
-		int  j;
-
-		/* Free the glyph sets we've allocated thus far */
-		for (j = 0; j < i; j++)
-		    dmxBEFreeGlyphSet(screenInfo.screens[j], glyphSet);
-
-		/* Free the resource created by render */
-		FreeResource(stuff->gsid, RT_NONE);
-
-		ret = dmxGlyphLastError;
-		break;
+		return beret;
 	    }
 	}
-
-	XSetErrorHandler(oldErrorHandler);
     }
 
     return ret;
@@ -753,6 +754,20 @@ void dmxCreatePictureList(WindowPtr pWin
     }
 }
 
+/** Create \a pPicture on the backend. */
+int dmxBECreatePicture(PicturePtr pPicture)
+{
+    dmxPictPrivPtr    pPictPriv = DMX_GET_PICT_PRIV(pPicture);
+
+    /* Create picutre on BE */
+    pPictPriv->pict = dmxDoCreatePicture(pPicture);
+
+    /* Flush changes to the backend server */
+    dmxValidatePicture(pPicture, (1 << (CPLastBit+1)) - 1);
+
+    return Success;
+}
+
 /** Create a picture.  This function handles the CreatePicture
  *  unwrapping/wrapping and calls dmxDoCreatePicture to actually create
  *  the picture on the appropriate screen.  */
@@ -853,7 +868,11 @@ int dmxChangePictureClip(PicturePtr pPic
 	/* The clip has already been changed into a region by the mi
 	 * routine called above.
 	 */
-	if (pPicture->clientClip) {
+	if (clipType == CT_NONE) {
+	    /* Disable clipping, show all */
+	    XFixesSetPictureClipRegion(dmxScreen->beDisplay,
+				       pPictPriv->pict, 0, 0, None);
+	} else if (pPicture->clientClip) {
 	    RegionPtr   pClip = pPicture->clientClip;
 	    BoxPtr      pBox  = REGION_RECTS(pClip);
 	    int         nBox  = REGION_NUM_RECTS(pClip);
diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h
index 2ca04ed..fe2a659 100644
--- a/hw/dmx/dmxpict.h
+++ b/hw/dmx/dmxpict.h
@@ -112,7 +112,9 @@ extern void dmxTriFan(CARD8 op,
 		      INT16 xSrc, INT16 ySrc,
 		      int npoint, xPointFixed *points);
 
+extern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet);
 extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet);
+extern int dmxBECreatePicture(PicturePtr pPicture);
 extern Bool dmxBEFreePicture(PicturePtr pPicture);
 
 extern int dmxPictPrivateIndex;		/**< Index for picture private data */
diff-tree 7d927a6f6a5bb7c09216fea273df72940676c654 (from 731952c561a3972d09d1315f4fd31466e459ccb9)
Author: Kevin E Martin <kem at freedesktop.org>
Date:   Sat Dec 16 12:03:30 2006 -0500

    For Xvfb, Xnest and Xprt, compile fbcmap.c with -DXFree86Server

diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index baab5ca..ca113c9 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -21,7 +21,7 @@ Xvfb_LDFLAGS =
 AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
             -DNO_HW_ONLY_EXTS \
             -DNO_MODULE_EXTS \
- \
+            -DXFree86Server \
             $(XVFBMODULES_CFLAGS)
 
 # Man page
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index d40d122..cce1fef 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -51,6 +51,7 @@ Xnest_LDFLAGS =
 
 AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \
             -DNO_HW_ONLY_EXTS \
+            -DXFree86Server \
             $(DIX_CFLAGS) \
             $(XNESTMODULES_CFLAGS)
 
diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am
index 27a7e30..d4f22d2 100644
--- a/hw/xprint/Makefile.am
+++ b/hw/xprint/Makefile.am
@@ -5,7 +5,8 @@ bin_PROGRAMS = Xprt
 Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
 	-DXPRINT -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_  \
 	-DXPRINTDIR=\"$(libdir)/X11/xserver\"    \
-	-DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX
+	-DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX \
+	-DXFree86Server
 
 Xprt_LDFLAGS = -L$(top_srcdir)
 Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la  \
diff-tree 731952c561a3972d09d1315f4fd31466e459ccb9 (from 8049eeea994ad88273b3e62199237f41b22b48df)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date:   Wed Dec 13 12:13:11 2006 +0000

    Set Int10Current->Tag for the linux native int10 module
    Fixes bug #9296

diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 46a1179..d863727 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -98,7 +98,7 @@ xf86ExtendedInitInt10(int entityIndex, i
     base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS);
 
     pvp = xf86GetPciInfoForEntity(entityIndex);
-    if (pvp) pInt->Tag = ((pciConfigPtr)(pvp->thisCard))->tag;
+    if (pvp) pInt->Tag = pciTag(pvp->bus, pvp->device, pvp->func);
 
     /*
      * we need to map video RAM MMIO as some chipsets map mmio
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 6c8b230..dd1637a 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -90,6 +90,7 @@ xf86ExtendedInitInt10(int entityIndex, i
     legacyVGARec vga;
     xf86int10BiosLocation bios;
     Bool videoBiosMapped = FALSE;
+    pciVideoPtr pvp;
     
     if (int10Generation != serverGeneration) {
 	counter = 0;
@@ -151,6 +152,8 @@ xf86ExtendedInitInt10(int entityIndex, i
     pInt = (xf86Int10InfoPtr)xnfcalloc(1, sizeof(xf86Int10InfoRec));
     pInt->scrnIndex = screen;
     pInt->entityIndex = entityIndex;
+    pvp = xf86GetPciInfoForEntity(entityIndex);
+    if (pvp) pInt->Tag = pciTag(pvp->bus, pvp->device, pvp->func);
     if (!xf86Int10ExecSetup(pInt))
 	goto error0;
     pInt->mem = &linuxMem;



More information about the xorg-commit mailing list