diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2006-12-21 23:52:24 -0800 |
---|---|---|
committer | Keith Packard <keithp@guitar.keithp.com> | 2006-12-21 23:52:24 -0800 |
commit | 06a4be5e7a5371881106b6f51368330a33b26401 (patch) | |
tree | d36d6664dd6eb41620b4d6db4e72a8e263fbbec1 | |
parent | f42e3cea236fa0091ed398a818fc8e17b0e1b3df (diff) | |
parent | f4ef99e8168fd2931961aa0d42f0547c89d21c1f (diff) |
Merge branch 'server-1.2-branch' into randr-1.2-for-server-1.2
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/Xserver.man.pre | 8 | ||||
-rw-r--r-- | hw/dmx/dmxextension.c | 133 | ||||
-rw-r--r-- | hw/dmx/dmxinit.c | 2 | ||||
-rw-r--r-- | hw/dmx/dmxpict.c | 85 | ||||
-rw-r--r-- | hw/dmx/dmxpict.h | 2 | ||||
-rw-r--r-- | hw/vfb/Makefile.am | 2 | ||||
-rw-r--r-- | hw/xfree86/doc/man/Xorg.man.pre | 60 | ||||
-rw-r--r-- | hw/xfree86/doc/man/xorg.conf.man.pre | 2 | ||||
-rw-r--r-- | hw/xfree86/int10/generic.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/hurd/Makefile.am | 7 | ||||
-rw-r--r-- | hw/xfree86/os-support/hurd/hurd_io.c | 131 | ||||
-rw-r--r-- | hw/xfree86/os-support/hurd/hurd_kbd.c | 176 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 3 | ||||
-rw-r--r-- | hw/xnest/Makefile.am | 1 | ||||
-rw-r--r-- | hw/xprint/Makefile.am | 3 |
16 files changed, 541 insertions, 78 deletions
diff --git a/configure.ac b/configure.ac index 249f58dfb..f1a1e2f71 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/doc/Xserver.man.pre b/doc/Xserver.man.pre index b9597f15c..7dd927048 100644 --- a/doc/Xserver.man.pre +++ b/doc/Xserver.man.pre @@ -159,6 +159,14 @@ default state is platform and configuration specific. 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/dmx/dmxextension.c b/hw/dmx/dmxextension.c index efcaca457..c12973bd5 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -1056,6 +1056,116 @@ static Bool dmxCompareScreens(DMXScreenInfo *new, DMXScreenInfo *old) 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, DMXScreenAttributesPtr attr) /* 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(pointer value, XID id, RESTYPE type, #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 9c5356ed5..1d3689c40 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -624,7 +624,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) } /* 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 9cdd123b9..f2d050f9c 100644 --- a/hw/dmx/dmxpict.c +++ b/hw/dmx/dmxpict.c @@ -223,6 +223,36 @@ Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet) 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(ClientPtr client) 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(ClientPtr client) 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(ClientPtr client) /* 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 pWindow) } } +/** 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 pPicture, int clipType, /* 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 2ca04ed87..fe2a65959 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 --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am index baab5ca22..ca113c9a8 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/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre index 86457321c..0758eb064 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 originally designed for UNIX and 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 mechanism is used. The list of mechanisms 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 specified explicitly, greatly 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 XFree86 4.4rc2. 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@eskimo.com\fP .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 --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index e44b551f9..f05ada68e 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 --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c index 46a1179de..d86372780 100644 --- a/hw/xfree86/int10/generic.c +++ b/hw/xfree86/int10/generic.c @@ -98,7 +98,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) 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/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am index a05087619..4994b3a64 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_mmap.c \ $(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 000000000..d9e3d1d7a --- /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 000000000..4fdd627a2 --- /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 --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 6c8b230e7..dd1637a23 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, int Flags) legacyVGARec vga; xf86int10BiosLocation bios; Bool videoBiosMapped = FALSE; + pciVideoPtr pvp; if (int10Generation != serverGeneration) { counter = 0; @@ -151,6 +152,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) 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; diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am index d40d122f4..cce1fef94 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 27a7e30d1..d4f22d261 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 \ |