xserver: Branch 'XACE-SELINUX' - 25 commits
Eamon Walsh
ewalsh at kemper.freedesktop.org
Mon Nov 19 15:11:01 PST 2007
afb/afbpixmap.c | 1
cfb/cfbpixmap.c | 1
configure.ac | 10
dix/atom.c | 2
dix/dispatch.c | 4
dix/events.c | 4
doc/c-extensions | 1
exa/exa.c | 1
fb/fb.h | 3
fb/fb24_32.c | 2
fb/fbpixmap.c | 7
hw/dmx/dmxpixmap.c | 1
hw/kdrive/src/kdrive.c | 5
hw/xfree86/common/xf86AutoConfig.c | 22
hw/xfree86/common/xf86Bus.c | 23 -
hw/xfree86/common/xf86Bus.h | 1
hw/xfree86/common/xf86Config.c | 20
hw/xfree86/common/xf86Configure.c | 29 -
hw/xfree86/common/xf86Helper.c | 3
hw/xfree86/common/xf86Init.c | 4
hw/xfree86/common/xf86Priv.h | 2
hw/xfree86/modes/xf86Crtc.c | 7
hw/xfree86/modes/xf86RandR12.c | 6
hw/xfree86/parser/cpconfig.c | 2
hw/xfree86/parser/scan.c | 9
hw/xfree86/utils/xorgcfg/config.h | 1
hw/xfree86/xf4bpp/ppcPixmap.c | 1
hw/xgl/xglpixmap.c | 1
hw/xnest/Pixmap.c | 1
hw/xwin/winconfig.c | 1
hw/xwin/winpixmap.c | 1
include/dix-config.h.in | 3
include/dix.h | 13
include/pixmapstr.h | 1
include/scrnintstr.h | 2
include/xorg-server.h.in | 6
mfb/mfbpixmap.c | 1
mi/mipushpxl.c | 19
os/Makefile.am | 3
os/auth.c | 16
os/utils.c | 4
os/xalloc.c | 816 -------------------------------------
randr/rrcrtc.c | 2
randr/rrmode.c | 2
render/render.c | 2
xkb/xkbEvents.c | 3
46 files changed, 92 insertions(+), 977 deletions(-)
New commits:
commit 2d17f47cc7d6b174857617d31ad1b437d8e97d94
Merge: 60be452... ea9c63e...
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date: Mon Nov 19 18:10:46 2007 -0500
Merge branch 'master' into XACE-SELINUX
Conflicts:
hw/xnest/Pixmap.c
include/dix.h
diff --cc hw/xfree86/common/xf86Init.c
index b3cae27,b5ee21d..f040ead
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@@ -1299,13 -1307,9 +1299,9 @@@ AbortDDX(
/*
* try to restore the original video state
*/
- #ifdef HAS_USL_VTS
- /* Need the sleep when starting X from within another X session */
- sleep(1);
- #endif
#ifdef DPMSExtension /* Turn screens back on */
if (DPMSPowerLevel != DPMSModeOn)
- DPMSSet(DPMSModeOn);
+ DPMSSet(serverClient, DPMSModeOn);
#endif
if (xf86Screens) {
if (xf86Screens[0]->vtSema)
diff --cc hw/xnest/Pixmap.c
index 57bebc6,9229752..0431196
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@@ -57,8 -56,9 +57,9 @@@ xnestCreatePixmap(ScreenPtr pScreen, in
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pPixmap->refcnt = 1;
pPixmap->devKind = PixmapBytePad(width, depth);
- pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
- (pointer)((char *)pPixmap + pScreen->totalPixmapSize);
+ pPixmap->usage_hint = usage_hint;
+ dixSetPrivate(&pPixmap->devPrivates, xnestPixmapPrivateKey,
+ (char *)pPixmap + pScreen->totalPixmapSize);
if (width && height)
xnestPixmapPriv(pPixmap)->pixmap =
XCreatePixmap(xnestDisplay,
diff --cc include/dix.h
index 30fdc45,c987548..8cfbbc4
--- a/include/dix.h
+++ b/include/dix.h
@@@ -145,8 -158,8 +145,6 @@@ extern void UpdateCurrentTime(void)
extern void UpdateCurrentTimeIf(void);
- extern void InitSelections(void);
-
-extern void FlushClientCaches(XID /*id*/);
-
extern int dixDestroyPixmap(
pointer /*value*/,
XID /*pid*/);
diff --cc os/Makefile.am
index 9b8e08d,8ed12e4..a119824
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@@ -2,10 -2,8 +2,7 @@@ noinst_LTLIBRARIES = libos.la libcwrapp
AM_CFLAGS = $(DIX_CFLAGS)
- # FIXME: Add support for these in configure.ac
- INTERNALMALLOC_SRCS = xalloc.c
-
SECURERPC_SRCS = rpcauth.c
-XCSECURITY_SRCS = secauth.c
XDMCP_SRCS = xdmcp.c
STRLCAT_SRCS = strlcat.c strlcpy.c
XORG_SRCS = log.c
commit ea9c63e93b9bb731796e8a8de2d127e6cc720076
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Mon Nov 19 15:53:49 2007 +0100
DEFAULT_DPI was undefined here.
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index dc49861..653042c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -36,6 +36,7 @@
#include "xf86DDC.h"
#include "xf86Crtc.h"
#include "xf86Modes.h"
+#include "xf86Priv.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
#define DPMS_SERVER
commit db9ae863536fff80b5463d99e71dc47ae587980d
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date: Sun Nov 18 11:57:01 2007 -0500
Bump DEFAULT_DPI to 96.
75 is just nonsense.
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 3da102f..4723f5a 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -120,7 +120,7 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable;
#define DEFAULT_LOG_VERBOSE 3
#endif
#ifndef DEFAULT_DPI
-#define DEFAULT_DPI 75
+#define DEFAULT_DPI 96
#endif
#define DEFAULT_UNRESOLVED TRUE
commit ee2d4626dca6e0d4fc6f524e5de4bdefa2ed43df
Author: Tormod Volden <bugzi06.fdo.tormod at xoxy.net>
Date: Sun Nov 18 11:56:31 2007 -0500
Bug #12932: Use DEFAULT_DPI in randr1.2 instead of hardcoded 96.
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index bb416fd..dc49861 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -704,9 +704,9 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
mm_height = output->mm_height;
if (!mm_height)
- mm_height = 203; /* 768 pixels at 96dpi */
+ mm_height = (768 * 25.4) / DEFAULT_DPI;
/*
- * Pick a mode closest to 96dpi
+ * Pick a mode closest to DEFAULT_DPI
*/
for (mode = output->probed_modes; mode; mode = mode->next)
{
@@ -721,7 +721,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height)
/* yes, use VDisplay here, not xf86ModeHeight */
dpi = (mode->VDisplay * 254) / (mm_height * 10);
- diff = dpi - 96;
+ diff = dpi - DEFAULT_DPI;
diff = diff < 0 ? -diff : diff;
if (target_mode == NULL || (preferred > target_preferred) ||
(preferred == target_preferred && diff < target_diff))
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index fe21717..c1a06b2 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -450,10 +450,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
else
{
/*
- * Otherwise, just set the screen to 96dpi
+ * Otherwise, just set the screen to DEFAULT_DPI
*/
- mmWidth = width * 25.4 / 96;
- mmHeight = height * 25.4 / 96;
+ mmWidth = width * 25.4 / DEFAULT_DPI;
+ mmHeight = height * 25.4 / DEFAULT_DPI;
}
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
commit a46c30c3be33ffb304a885503c8aaa78396ed3d9
Author: Jernej Azarija <azi.stdout at gmail.com>
Date: Sun Nov 18 11:44:36 2007 -0500
Bug #12531: RRModesForScreen can fail to allocate.
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 1117581..f060d22 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -165,6 +165,8 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret)
int num_screen_modes = 0;
screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr));
+ if (!screen_modes)
+ return NULL;
/*
* Add modes from all outputs
commit fac7e7e4e1809e865b9b3cf5b7eb69ba9d3a3759
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date: Sun Nov 18 11:39:26 2007 -0500
Document the requirement for interleaved code and declarations.
diff --git a/doc/c-extensions b/doc/c-extensions
index db2ba7d..e1b222b 100644
--- a/doc/c-extensions
+++ b/doc/c-extensions
@@ -30,3 +30,4 @@ The server will not build if your toolchain does not support these extensions.
struct foo bar = { .baz = quux, .brian = "dog" };
* variadic macros: macros with a variable number of arguments, e.g.:
#define DebugF(x, ...) /**/
+ * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); }
commit d15339a92c4d689d2ab8a86e4f10107f3e45eff8
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date: Sat Nov 17 22:12:10 2007 -0500
Bug #9725: Don't look in root's $HOME for config files, that's just confusing.
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index e74c590..f58e2a7 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -93,7 +93,6 @@ extern DeviceAssocRec mouse_assoc;
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
diff --git a/hw/xfree86/parser/cpconfig.c b/hw/xfree86/parser/cpconfig.c
index 46a5a8b..0347f7d 100644
--- a/hw/xfree86/parser/cpconfig.c
+++ b/hw/xfree86/parser/cpconfig.c
@@ -62,7 +62,7 @@ xrealloc (void *p, int size)
#endif
#define CONFPATH "%A,%R,/etc/X11/%R,%P/etc/X11/%R,%E,%F,/etc/X11/%F," \
- "%P/etc/X11/%F,%D/%X,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \
+ "%P/etc/X11/%F,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \
"%P/etc/X11/%X,%P/lib/X11/%X.%H,%P/lib/X11/%X"
int
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index e7989d1..36061c8 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -558,7 +558,6 @@ xf86pathIsSafe(const char *path)
* %E config file environment ($XORGCONFIG) as an absolute path
* %F config file environment ($XORGCONFIG) as a relative path
* %G config file environment ($XORGCONFIG) as a safe path
- * %D $HOME
* %P projroot
* %M major version number
* %% %
@@ -703,14 +702,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
} else
BAIL_OUT;
break;
- case 'D':
- if (!home)
- home = getenv("HOME");
- if (home && xf86pathIsAbsolute(home))
- APPEND_STR(home);
- else
- BAIL_OUT;
- break;
case 'P':
if (projroot && xf86pathIsAbsolute(projroot))
APPEND_STR(projroot);
diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h
index b5baba4..ea12e88 100644
--- a/hw/xfree86/utils/xorgcfg/config.h
+++ b/hw/xfree86/utils/xorgcfg/config.h
@@ -101,7 +101,6 @@ extern int config_mode;
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index a68ead2..38966bf 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -49,7 +49,6 @@
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
"/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
"%P/etc/X11/%X," \
commit 748cfbc820f8cdeb544c54a6db495fecf2e2457b
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date: Sat Nov 17 21:23:05 2007 -0500
Disinfect mi/ of mfb.
diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c
index 3695f30..6fc57db 100644
--- a/mi/mipushpxl.c
+++ b/mi/mipushpxl.c
@@ -53,11 +53,26 @@ SOFTWARE.
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "regionstr.h"
-#include "../mfb/maskbits.h"
#include "mi.h"
+#include "servermd.h"
#define NPT 128
+/* These were stolen from mfb. They don't really belong here. */
+#define LONG2CHARSSAMEORDER(x) ((MiBits)(x))
+#define LONG2CHARSDIFFORDER( x ) ( ( ( ( x ) & (MiBits)0x000000FF ) << 0x18 ) \
+ | ( ( ( x ) & (MiBits)0x0000FF00 ) << 0x08 ) \
+ | ( ( ( x ) & (MiBits)0x00FF0000 ) >> 0x08 ) \
+ | ( ( ( x ) & (MiBits)0xFF000000 ) >> 0x18 ) )
+
+
+#define PGSZB 4
+#define PPW (PGSZB<<3) /* assuming 8 bits per byte */
+#define PGSZ PPW
+#define PLST (PPW-1)
+#define PIM PLST
+#define PWSH 5
+
/* miPushPixels -- squeegees the fill style of pGC through pBitMap
* into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may
* be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit
@@ -94,7 +109,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
DDXPointRec pt[NPT], ptThisLine;
int width[NPT];
#if 1
- PixelType startmask;
+ MiBits startmask;
if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER)
if (screenInfo.bitmapBitOrder == LSBFirst)
startmask = (MiBits)(-1) ^
commit a969db091cab16a448f82782e85b3dd19c81627a
Author: Daniel Stone <daniel at fooishbar.org>
Date: Sat Nov 17 22:34:47 2007 +0100
XKB: Don't ring the bell when we don't have a BellProc (bug #13246)
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index e11b609..bf3e828 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -405,7 +405,8 @@ XID winID = 0;
if ((force||(xkbi->desc->ctrls->enabled_ctrls&XkbAudibleBellMask))&&
(!eventOnly)) {
- (*kbd->kbdfeed->BellProc)(percent,kbd,(pointer)pCtrl,class);
+ if (kbd->kbdfeed->BellProc)
+ (*kbd->kbdfeed->BellProc)(percent,kbd,(pointer)pCtrl,class);
}
interest = kbd->xkb_interest;
if ((!interest)||(force))
commit c89b543198d5ec56ff025bdd6bb7229523478e58
Author: Ben Skeggs <skeggsb at gmail.com>
Date: Sat Nov 17 18:20:49 2007 +1000
exa: set driverPriv to NULL before it might get used later with garbage
diff --git a/exa/exa.c b/exa/exa.c
index 1f85d8e..4ed1a1a 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -257,6 +257,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
return NULL;
pExaPixmap = ExaGetPixmapPriv(pPixmap);
+ pExaPixmap->driverPriv = NULL;
bpp = pPixmap->drawable.bitsPerPixel;
commit 514ba4ca727f0b1076bc67500617722203d34daa
Author: Adam Jackson <ajax at aspartame.nwnk.net>
Date: Fri Nov 16 19:53:11 2007 -0500
Bug #1612: Use a stronger PRNG.
Currently just reads from /dev/urandom, and only on Linux.
diff --git a/configure.ac b/configure.ac
index 35b7f0f..7d43216 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,6 +175,12 @@ fi
AC_CHECK_FUNC([dlopen], [],
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
+case $host_os in
+ linux*)
+ AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;;
+ *) ;;
+esac
+
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index d105e51..d033387 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -240,6 +240,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Have /dev/urandom */
+#undef HAVE_URANDOM
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
diff --git a/os/auth.c b/os/auth.c
index b2a145f..fa3ba79 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -325,6 +325,20 @@ GenerateAuthorization(
return -1;
}
+#ifdef HAVE_URANDOM
+
+void
+GenerateRandomData (int len, char *buf)
+{
+ int fd;
+
+ fd = open("/dev/urandom", O_RDONLY);
+ read(fd, buf, len);
+ close(fd);
+}
+
+#else /* !HAVE_URANDOM */
+
/* A random number generator that is more unpredictable
than that shipped with some systems.
This code is taken from the C standard. */
@@ -362,4 +376,6 @@ GenerateRandomData (int len, char *buf)
/* XXX add getrusage, popen("ps -ale") */
}
+#endif /* HAVE_URANDOM */
+
#endif /* XCSECURITY */
commit 20fd4783247b1b93d9675dc36768dd1ed59ba2d3
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 17:01:33 2007 -0500
Small static cleanups on dix/
diff --git a/dix/atom.c b/dix/atom.c
index 6ae3e31..c968c1e 100644
--- a/dix/atom.c
+++ b/dix/atom.c
@@ -209,5 +209,3 @@ InitAtoms(void)
if (lastAtom != XA_LAST_PREDEFINED)
AtomError ();
}
-
-
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 8c76eb1..c356aed 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -249,7 +249,7 @@ UpdateCurrentTimeIf(void)
currentTime = systime;
}
-void
+static void
InitSelections(void)
{
if (CurrentSelections)
@@ -3836,7 +3836,7 @@ ProcInitialConnection(ClientPtr client)
return (client->noClientException);
}
-int
+static int
SendConnSetup(ClientPtr client, char *reason)
{
xWindowRoot *root;
diff --git a/dix/events.c b/dix/events.c
index 12c299a..85f42b3 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1184,7 +1184,7 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen)
dev->public.processInputProc = dev->public.realInputProc;
}
-void
+static void
ComputeFreezes(void)
{
DeviceIntPtr replayDev = syncEvents.replayDev;
@@ -1268,7 +1268,7 @@ ScreenRestructured (ScreenPtr pScreen)
}
#endif
-void
+static void
CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
{
GrabPtr grab = thisDev->grab;
diff --git a/include/dix.h b/include/dix.h
index 6a67d14..c987548 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -158,8 +158,6 @@ extern void UpdateCurrentTime(void);
extern void UpdateCurrentTimeIf(void);
-extern void InitSelections(void);
-
extern void FlushClientCaches(XID /*id*/);
extern int dixDestroyPixmap(
@@ -187,10 +185,6 @@ extern void DeleteWindowFromAnySelections(
extern void MarkClientException(
ClientPtr /*client*/);
-extern int SendConnSetup(
- ClientPtr /*client*/,
- char* /*reason*/);
-
#if defined(DDXBEFORERESET)
extern void ddxBeforeReset (void);
#endif
@@ -362,13 +356,6 @@ extern void EnqueueEvent(
DeviceIntPtr /* device */,
int /* count */);
-extern void ComputeFreezes(void);
-
-extern void CheckGrabForSyncs(
- DeviceIntPtr /* dev */,
- Bool /* thisMode */,
- Bool /* otherMode */);
-
extern void ActivatePointerGrab(
DeviceIntPtr /* mouse */,
GrabPtr /* grab */,
commit 70e50fa51f05663f289eeeea4521e737e8e24bca
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 17:00:37 2007 -0500
Allocate RRCrtcRecs with calloc.
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 43cfb29..4a7275b 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -72,7 +72,7 @@ RRCrtcCreate (ScreenPtr pScreen, void *devPrivate)
return FALSE;
pScrPriv->crtcs = crtcs;
- crtc = xalloc (sizeof (RRCrtcRec));
+ crtc = xcalloc (1, sizeof (RRCrtcRec));
if (!crtc)
return NULL;
crtc->id = FakeClientID (0);
commit 8d0cd1cd2c57ee5a2fc4d577d8182d66369f0617
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Thu Nov 15 12:16:36 2007 -0800
Fix a really dumb typo.
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 383ee80..bad0e51 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -202,7 +202,7 @@ typedef void (* ClipNotifyProcPtr)(
/* pixmap will be the backing pixmap for a redirected window */
#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
/* pixmap will contain a glyph */
-#define CREATE_PIMXAP_USAGE_GLYPH_PICTURE 3
+#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
typedef PixmapPtr (* CreatePixmapProcPtr)(
ScreenPtr /*pScreen*/,
diff --git a/render/render.c b/render/render.c
index 3a9d24a..ca6e62f 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1203,7 +1203,7 @@ ProcRenderAddGlyphs (ClientPtr client)
pDstPix = (pScreen->CreatePixmap) (pScreen,
width, height, depth,
- CREATE_PIMXAP_USAGE_GLYPH_PICTURE);
+ CREATE_PIXMAP_USAGE_GLYPH_PICTURE);
GlyphPicture (glyph)[screen] = pDst =
CreatePicture (0, &pDstPix->drawable,
commit f797c96845a3fab37cda6839ebecf9ac5401fd6e
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Thu Nov 15 12:12:02 2007 -0800
Save pixmap allocation hints into the PixmapRec.
diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c
index d15d861..c619618 100644
--- a/afb/afbpixmap.c
+++ b/afb/afbpixmap.c
@@ -105,6 +105,7 @@ afbCreatePixmap(pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
+ pPixmap->usage_hint = usage_hint;
return(pPixmap);
}
diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c
index a7be7cc..f5a9a41 100644
--- a/cfb/cfbpixmap.c
+++ b/cfb/cfbpixmap.c
@@ -99,6 +99,7 @@ cfbCreatePixmap (pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
+ pPixmap->usage_hint = usage_hint;
return pPixmap;
}
diff --git a/fb/fb.h b/fb/fb.h
index 380e2e1..5c01c56 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -1621,7 +1621,8 @@ fbPictureInit (ScreenPtr pScreen,
*/
PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp);
+fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned usage_hint);
PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 00b739b..a03726b 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -548,7 +548,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
- bitsPerPixel);
+ bitsPerPixel, 0);
if (!pNewTile)
return 0;
fbGetDrawable (&pOldTile->drawable,
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index cddab3e..b9c93ea 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -29,7 +29,8 @@
#include "fb.h"
PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
+fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned usage_hint)
{
PixmapPtr pPixmap;
size_t datasize;
@@ -76,6 +77,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
pPixmap->screen_y = 0;
#endif
+ pPixmap->usage_hint = usage_hint;
+
return pPixmap;
}
@@ -89,7 +92,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
if (bpp == 32 && depth <= 24)
bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
#endif
- return fbCreatePixmapBpp (pScreen, width, height, depth, bpp);
+ return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
}
Bool
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index acc08c3..29162f9 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -116,6 +116,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->drawable.height = height;
pPixmap->devKind = PixmapBytePad(width, bpp);
pPixmap->refcnt = 1;
+ pPixmap->usage_hint = usage_hint;
pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
pPixPriv->pixmap = (Pixmap)0;
diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c
index 241217b..73524c3 100644
--- a/hw/xfree86/xf4bpp/ppcPixmap.c
+++ b/hw/xfree86/xf4bpp/ppcPixmap.c
@@ -123,6 +123,7 @@ xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint )
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
+ pScreen->totalPixmapSize);
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
+ pPixmap->usage_hint = usage_hint;
return pPixmap ;
}
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 8c54d64..fe2a7b1 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -254,6 +254,7 @@ xglCreatePixmap (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = 0;
+ pPixmap->usage_hint = usage_hint;
pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap);
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 1f42001..9229752 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -58,6 +58,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->devKind = PixmapBytePad(width, depth);
pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
(pointer)((char *)pPixmap + pScreen->totalPixmapSize);
+ pPixmap->usage_hint = usage_hint;
if (width && height)
xnestPixmapPriv(pPixmap)->pixmap =
XCreatePixmap(xnestDisplay,
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 994eeb8..07020ee 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -98,6 +98,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = NULL;
+ pPixmap->usage_hint = usage_hint;
/* Pixmap privates are allocated by AllocatePixmap */
pPixmapPriv = winGetPixmapPriv (pPixmap);
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index 4594882..dc03cf2 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -90,6 +90,7 @@ typedef struct _Pixmap {
short screen_x;
short screen_y;
#endif
+ unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec;
#endif /* PIXMAPSTRUCT_H */
diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c
index 438e9ab..3773985 100644
--- a/mfb/mfbpixmap.c
+++ b/mfb/mfbpixmap.c
@@ -104,6 +104,7 @@ mfbCreatePixmap (pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
+ pPixmap->usage_hint = usage_hint;
return pPixmap;
}
commit 6bc50de02108f822977fc7545da81fce95ea7ff4
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 15:03:58 2007 -0500
Simplify system resource range setup.
osRes only existed to get copied into Acc. Waste of effort.
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 3dc08f8..599f7a4 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -75,7 +75,6 @@ static resPtr AccReducers = NULL;
/* resource lists */
resPtr Acc = NULL;
-resPtr osRes = NULL;
/* predefined special resources */
_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END};
@@ -1357,28 +1356,12 @@ xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex)
void
xf86ResourceBrokerInit(void)
{
-#if 0
- resPtr resPci;
-#endif
-
- osRes = NULL;
+ Acc = NULL;
/* Get the ranges used exclusively by the system */
- osRes = xf86AccResFromOS(osRes);
- xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges:\n");
- xf86PrintResList(3, osRes);
-
- /* Bus dep initialization */
-#if 0
- resPci = ResourceBrokerInitPci(&osRes);
- Acc = xf86JoinResLists(xf86DupResList(osRes), resPci);
-#else
- Acc = xf86DupResList( osRes );
-#endif
-
- xf86MsgVerb(X_INFO, 3, "All system resource ranges:\n");
+ Acc = xf86AccResFromOS(Acc);
+ xf86MsgVerb(X_INFO, 3, "System resource ranges:\n");
xf86PrintResList(3, Acc);
-
}
#define MEM_ALIGN (1024 * 1024)
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 5ea5cc8..489ee34 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -132,7 +132,6 @@ extern int xf86NumEntities;
extern xf86AccessRec AccessNULL;
extern BusRec primaryBus;
extern resPtr Acc;
-extern resPtr osRes;
extern resPtr ResRange;
extern BusAccPtr xf86BusAccInfo;
commit e1ff14a9246e12d42ce8ca5afbe3b957333a5620
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 14:45:49 2007 -0500
Delete some dead code in X -configure.
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 0cf445c..536f897 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -372,9 +372,6 @@ configureDeviceSection (int screennum)
char identifier[16];
OptionInfoPtr p;
int i = 0;
-#ifdef DO_FBDEV_PROBE
- Bool foundFBDEV = FALSE;
-#endif
parsePrologue (XF86ConfDevicePtr, XF86ConfDeviceRec)
/* Move device info to parser structure */
@@ -443,32 +440,6 @@ configureDeviceSection (int screennum)
}
}
-#ifdef DO_FBDEV_PROBE
- /* Crude mechanism to auto-detect fbdev (os dependent) */
- /* Skip it for now. Options list it anyway, and we can't
- * determine which screen/driver this belongs too anyway. */
- {
- int fd;
-
- fd = open("/dev/fb0", 0);
- if (fd != -1) {
- foundFBDEV = TRUE;
- close(fd);
- }
- }
-
- if (foundFBDEV) {
- XF86OptionPtr fbdev;
-
- fbdev = xf86confmalloc(sizeof(XF86OptionRec));
- memset((XF86OptionPtr)fbdev,0,sizeof(XF86OptionRec));
- fbdev->opt_name = "UseFBDev";
- fbdev->opt_val = "ON";
- ptr->dev_option_lst = (XF86OptionPtr)xf86addListItem(
- (glp)ptr->dev_option_lst, (glp)fbdev);
- }
-#endif
-
return ptr;
}
commit 01cfba75229f4b9bf1e4fe80814931acdacde14c
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 14:27:03 2007 -0500
Nuke the debugging allocator.
This has never been hooked up in the modular build, and can not possibly
have built since before 6.7. Clearly no one's using it.
diff --git a/os/Makefile.am b/os/Makefile.am
index d2a9897..8ed12e4 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -2,9 +2,6 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la
AM_CFLAGS = $(DIX_CFLAGS)
-# FIXME: Add support for these in configure.ac
-INTERNALMALLOC_SRCS = xalloc.c
-
SECURERPC_SRCS = rpcauth.c
XCSECURITY_SRCS = secauth.c
XDMCP_SRCS = xdmcp.c
diff --git a/os/xalloc.c b/os/xalloc.c
deleted file mode 100644
index e5f3946..0000000
--- a/os/xalloc.c
+++ /dev/null
@@ -1,816 +0,0 @@
-#define FATALERRORS 1
-/*
-Copyright (C) 1995 Pascal Haible. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-PASCAL HAIBLE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-Except as contained in this notice, the name of Pascal Haible shall
-not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from
-Pascal Haible.
-*/
-
-
-/* Only used if INTERNAL_MALLOC is defined
- * - otherwise xalloc() in utils.c is used
- */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifdef INTERNAL_MALLOC
-
-#include <stdlib.h> /* for malloc() etc. */
-
-#include <X11/Xos.h>
-#include "misc.h"
-#include <X11/X.h>
-
-#ifdef XALLOC_LOG
-#include <stdio.h>
-#endif
-
-extern Bool Must_have_memory;
-
-/*
- ***** New malloc approach for the X server *****
- * Pascal Haible 1995
- *
- * Some statistics about memory allocation of the X server
- * The test session included several clients of different size, including
- * xv, emacs and xpaint with a new canvas of 3000x2000, zoom 5.
- * All clients were running together.
- * A protocolling version of Xalloc recorded 318917 allocating actions
- * (191573 Xalloc, 85942 XNFalloc, 41438 Xrealloc, 279727 Xfree).
- * Results grouped by size, excluding the next lower size
- * (i.e. size=32 means 16<size<=32):
- *
- * size nr of alloc max nr of blocks allocated together
- * 8 1114 287
- * 16 17341 4104
- * 32 147352 2068
- * 64 59053 2518
- * 128 46882 1230
- * 256 20544 1217
- * 512 6808 117
- * 1024 8254 171
- * 2048 4841 287
- * 4096 2429 84
- * 8192 3364 85
- * 16384 573 22
- * 32768 49 7
- * 65536 45 5
- * 131072 48 2
- * 262144 209 2
- * 524288 7 4
- * 1048576 2 1
- * 8388608 2 2
- *
- * The most used sizes:
- * count size
- * 24 136267
- * 40 37055
- * 72 17278
- * 56 13504
- * 80 9372
- * 16 8966
- * 32 8411
- * 136 8399
- * 104 7690
- * 12 7630
- * 120 5512
- * 88 4634
- * 152 3062
- * 52 2881
- * 48 2736
- * 156 1569
- * 168 1487
- * 160 1483
- * 28 1446
- * 1608 1379
- * 184 1305
- * 552 1270
- * 64 934
- * 320 891
- * 8 754
- *
- * Conclusions: more than the half of all allocations are <= 32 bytes.
- * But of these about 150,000 blocks, only a maximum of about 6,000 are
- * allocated together (including memory leaks..).
- * On the other side, only 935 of the 191573 or 0.5% were larger than 8kB
- * (362 or 0.2% larger than 16k).
- *
- * What makes the server really grow is the fragmentation of the heap,
- * and the fact that it can't shrink.
- * To cure this, we do the following:
- * - large blocks (>=11k) are mmapped on xalloc, and unmapped on xfree,
- * so we don't need any free lists etc.
- * As this needs 2 system calls, we only do this for the quite
- * infrequent large (>=11k) blocks.
- * - instead of reinventing the wheel, we use system malloc for medium
- * sized blocks (>256, <11k).
- * - for small blocks (<=256) we use an other approach:
- * As we need many small blocks, and most ones for a short time,
- * we don't go through the system malloc:
- * for each fixed sizes a seperate list of free blocks is kept.
- * to KISS (Keep it Small and Simple), we don't free them
- * (not freeing a block of 32 bytes won't be worse than having fragmented
- * a larger area on allocation).
- * This way, we (almost) allways have a fitting free block right at hand,
- * and don't have to walk any lists.
- */
-
-/*
- * structure layout of a allocated block
- * unsigned long size:
- * rounded up netto size for small and medium blocks
- * brutto size == mmap'ed area for large blocks
- * unsigned long DEBUG ? MAGIC : unused
- * .... data
- * ( unsigned long MAGIC2 ) only if SIZE_TAIL defined
- *
- */
-
-/* use otherwise unused long in the header to store a magic */
-/* shouldn't this be removed for production release ? */
-#define XALLOC_DEBUG
-
-#ifdef XALLOC_DEBUG
-/* Xfree fills the memory with a certain pattern (currently 0xF0) */
-/* this should really be removed for production release! */
-#define XFREE_ERASES
-#endif
-
-/* this must be a multiple of SIZE_STEPS below */
-#define MAX_SMALL 264 /* quite many blocks of 264 */
-
-#define MIN_LARGE (11*1024)
-/* worst case is 25% loss with a page size of 4k */
-
-/* SIZE_STEPS defines the granularity of size of small blocks -
- * this makes blocks align to that, too! */
-#define SIZE_STEPS (sizeof(double))
-#define SIZE_HEADER (2*sizeof(long)) /* = sizeof(double) for 32bit */
-#ifdef XALLOC_DEBUG
-#if defined(__sparc__)
-#define SIZE_TAIL (2*sizeof(long)) /* = sizeof(double) for 32bit */
-#else
-#define SIZE_TAIL (sizeof(long))
-#endif
-#endif
-
-#undef TAIL_SIZE
-#ifdef SIZE_TAIL
-#define TAIL_SIZE SIZE_TAIL
-#else
-#define TAIL_SIZE 0
-#endif
-
-#if defined (_LP64) || \
- defined(__alpha__) || defined(__alpha) || \
- defined(__ia64__) || defined(ia64) || \
- defined(__sparc64__) || \
- defined(__s390x__) || \
- defined(__amd64__) || defined(amd64) || \
- defined(__powerpc64__) || \
- (defined(sgi) && _MIPS_SZLONG == 64))
-#define MAGIC 0x1404196414071968
-#define MAGIC_FREE 0x1506196615061966
-#define MAGIC2 0x2515207525182079
-#else
-#define MAGIC 0x14071968
-#define MAGIC_FREE 0x15061966
-#define MAGIC2 0x25182079
-#endif
-
-/* To get some statistics about memory allocation */
-
-#ifdef XALLOC_LOG
-#define XALLOC_LOG_FILE "/tmp/Xalloc.log" /* unsecure... */
-#define LOG_BODY(_body) \
- { FILE *f; \
- f = fopen(XALLOC_LOG_FILE, "a"); \
- if (NULL!=f) { \
- _body; \
- fclose(f); \
- } \
- }
-#if defined(linux) && defined(__i386__)
-#define LOG_ALLOC(_fun, _size, _ret) \
- { unsigned long *from; \
- __asm__("movl %%ebp,%0" : /*OUT*/ "=r" (from) : /*IN*/ ); \
- LOG_BODY(fprintf(f, "%s\t%i\t%p\t[%lu]\n", _fun, _size, _ret, *(from+1))) \
- }
-#else
-#define LOG_ALLOC(_fun, _size, _ret) \
- LOG_BODY(fprintf(f, "%s\t%i\t%p\n", _fun, _size, _ret))
-#endif
-#define LOG_REALLOC(_fun, _ptr, _size, _ret) \
- LOG_BODY(fprintf(f, "%s\t%p\t%i\t%p\n", _fun, _ptr, _size, _ret))
-#define LOG_FREE(_fun, _ptr) \
- LOG_BODY(fprintf(f, "%s\t%p\n", _fun, _ptr))
-#else
-#define LOG_ALLOC(_fun, _size, _ret)
-#define LOG_REALLOC(_fun, _ptr, _size, _ret)
-#define LOG_FREE(_fun, _ptr)
-#endif /* XALLOC_LOG */
-
-static unsigned long *free_lists[MAX_SMALL/SIZE_STEPS];
-
-/*
- * systems that support it should define HAS_MMAP_ANON or MMAP_DEV_ZERO
- * and include the appropriate header files for
- * mmap(), munmap(), PROT_READ, PROT_WRITE, MAP_PRIVATE,
- * PAGE_SIZE or _SC_PAGESIZE (and MAP_ANON for HAS_MMAP_ANON).
- *
- * systems that don't support MAP_ANON fall through to the 2 fold behaviour
- */
-
-#if defined(linux)
-#define HAS_MMAP_ANON
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <asm/page.h> /* PAGE_SIZE */
-#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */
-#define HAS_GETPAGESIZE
-#endif /* linux */
-
-#if defined(__GNU__)
-#define HAS_MMAP_ANON
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <mach/vm_param.h> /* PAGE_SIZE */
-#define HAS_SC_PAGESIZE
-#define HAS_GETPAGESIZE
-#endif /* __GNU__ */
-
-#if defined(CSRG_BASED)
-#define HAS_MMAP_ANON
-#define HAS_GETPAGESIZE
-#include <sys/types.h>
-#include <sys/mman.h>
-#endif /* CSRG_BASED */
-
-#if defined(DGUX)
-#define HAS_GETPAGESIZE
-#define MMAP_DEV_ZERO
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#endif /* DGUX */
-
-#if defined(SVR4) && !defined(DGUX)
-#define MMAP_DEV_ZERO
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#endif /* SVR4 && !DGUX */
-
-#if defined(sun) && !defined(SVR4) /* SunOS */
-#define MMAP_DEV_ZERO /* doesn't SunOS have MAP_ANON ?? */
-#define HAS_GETPAGESIZE
-#include <sys/types.h>
-#include <sys/mman.h>
-#endif /* sun && !SVR4 */
-
-#ifdef XNO_SYSCONF
-#undef _SC_PAGESIZE
-#endif
-
-#if defined(HAS_MMAP_ANON) || defined (MMAP_DEV_ZERO)
-static int pagesize;
-#endif
-
-#ifdef MMAP_DEV_ZERO
-static int devzerofd = -1;
-#include <errno.h>
-#endif
-
-/*
- * empty trap function for gdb. Breakpoint here
- * to find who tries to free a free area
- */
-void XfreeTrap(void)
-{
-}
-
-_X_EXPORT void *
-Xalloc (unsigned long amount)
-{
- register unsigned long *ptr;
- int indx;
-
- /* sanity checks */
-
- /* zero size requested */
- if (amount == 0) {
- LOG_ALLOC("Xalloc=0", amount, 0);
- return NULL;
- }
- /* negative size (or size > 2GB) - what do we do? */
- if ((long)amount < 0) {
- /* Diagnostic */
-#ifdef FATALERRORS
- FatalError("Xalloc: Xalloc(<0)\n");
-#else
- ErrorF("Xalloc warning: Xalloc(<0) ignored..\n");
-#endif
- LOG_ALLOC("Xalloc<0", amount, 0);
- return NULL;
- }
-
- /* alignment check */
-#if defined(__alpha__) || defined(__alpha) || \
- defined(__sparc__) || \
- defined(__mips__) || \
- defined(__powerpc__) || \
- defined(__arm32__) || \
- defined(__ia64__) || defined(ia64) || \
- defined(__s390x__) || defined(__s390__)
- amount = (amount + (sizeof(long)-1)) & ~(sizeof(long)-1);
-#endif
-
- if (amount <= MAX_SMALL) {
- /*
- * small block
- */
- /* pick a ready to use small chunk */
- indx = (amount-1) / SIZE_STEPS;
- ptr = free_lists[indx];
- if (NULL == ptr) {
- /* list empty - get 20 or 40 more */
- /* amount = size rounded up */
- amount = (indx+1) * SIZE_STEPS;
- ptr = (unsigned long *)calloc(1,(amount+SIZE_HEADER+TAIL_SIZE)
- * (amount<100 ? 40 : 20));
- if (NULL!=ptr) {
- int i;
- unsigned long *p1, *p2;
- p1 = 0;
- p2 = (unsigned long *)((char *)ptr + SIZE_HEADER);
- for (i=0; i<(amount<100 ? 40 : 20); i++) {
- p1 = p2;
- p1[-2] = amount;
-#ifdef XALLOC_DEBUG
- p1[-1] = MAGIC_FREE;
-#endif /* XALLOC_DEBUG */
-#ifdef SIZE_TAIL
- *(unsigned long *)((unsigned char *)p1 + amount) = MAGIC2;
-#endif /* SIZE_TAIL */
- p2 = (unsigned long *)((char *)p1 + SIZE_HEADER + amount + TAIL_SIZE);
- *(unsigned long **)p1 = p2;
- }
- /* last one has no next one */
- *(unsigned long **)p1 = NULL;
- /* put the second in the list */
- free_lists[indx] = (unsigned long *)((char *)ptr + SIZE_HEADER + amount + TAIL_SIZE + SIZE_HEADER);
- /* take the fist one */
- ptr = (unsigned long *)((char *)ptr + SIZE_HEADER);
- LOG_ALLOC("Xalloc-S", amount, ptr);
- ptr[-1] = MAGIC;
- return (void *)ptr;
- } /* else fall through to 'Out of memory' */
- } else {
- /* take that piece of mem out of the list */
- free_lists[indx] = *((unsigned long **)ptr);
- /* already has size (and evtl. magic) filled in */
-#ifdef XALLOC_DEBUG
- ptr[-1] = MAGIC;
-#endif /* XALLOC_DEBUG */
- LOG_ALLOC("Xalloc-S", amount, ptr);
- return (void *)ptr;
- }
-
-#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO)
- } else if (amount >= MIN_LARGE) {
- /*
- * large block
- */
- /* mmapped malloc */
- /* round up amount */
- amount += SIZE_HEADER + TAIL_SIZE;
- /* round up brutto amount to a multiple of the page size */
- amount = (amount + pagesize-1) & ~(pagesize-1);
-#ifdef MMAP_DEV_ZERO
- ptr = (unsigned long *)mmap((caddr_t)0,
- (size_t)amount,
- PROT_READ | PROT_WRITE,
- MAP_PRIVATE,
- devzerofd,
- (off_t)0);
-#else
- ptr = (unsigned long *)mmap((caddr_t)0,
- (size_t)amount,
- PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE,
- -1,
- (off_t)0);
-#endif
- if (-1!=(long)ptr) {
- ptr[0] = amount - SIZE_HEADER - TAIL_SIZE;
-#ifdef XALLOC_DEBUG
- ptr[1] = MAGIC;
-#endif /* XALLOC_DEBUG */
-#ifdef SIZE_TAIL
- ((unsigned long *)((char *)ptr + amount - TAIL_SIZE))[0] = MAGIC2;
-#endif /* SIZE_TAIL */
- ptr = (unsigned long *)((char *)ptr + SIZE_HEADER);
- LOG_ALLOC("Xalloc-L", amount, ptr);
- return (void *)ptr;
- } /* else fall through to 'Out of memory' */
-#endif /* HAS_MMAP_ANON || MMAP_DEV_ZERO */
- } else {
- /*
- * medium sized block
- */
- /* 'normal' malloc() */
- ptr=(unsigned long *)calloc(1,amount+SIZE_HEADER+TAIL_SIZE);
- if (ptr != (unsigned long *)NULL) {
- ptr[0] = amount;
-#ifdef XALLOC_DEBUG
- ptr[1] = MAGIC;
-#endif /* XALLOC_DEBUG */
-#ifdef SIZE_TAIL
- *(unsigned long *)((char *)ptr + amount + SIZE_HEADER) = MAGIC2;
-#endif /* SIZE_TAIL */
- ptr = (unsigned long *)((char *)ptr + SIZE_HEADER);
- LOG_ALLOC("Xalloc-M", amount, ptr);
- return (void *)ptr;
- }
- }
- if (Must_have_memory)
- FatalError("Out of memory");
- LOG_ALLOC("Xalloc-oom", amount, 0);
- return NULL;
-}
-
-/*****************
- * XNFalloc
- * "no failure" realloc, alternate interface to Xalloc w/o Must_have_memory
- *****************/
-
-_X_EXPORT pointer
-XNFalloc (unsigned long amount)
-{
- register pointer ptr;
-
- /* zero size requested */
- if (amount == 0) {
- LOG_ALLOC("XNFalloc=0", amount, 0);
- return NULL;
- }
- /* negative size (or size > 2GB) - what do we do? */
- if ((long)amount < 0) {
- /* Diagnostic */
-#ifdef FATALERRORS
- FatalError("Xalloc: XNFalloc(<0)\n");
-#else
- ErrorF("Xalloc warning: XNFalloc(<0) ignored..\n");
-#endif
- LOG_ALLOC("XNFalloc<0", amount, 0);
- return (unsigned long *)NULL;
- }
- ptr = Xalloc(amount);
- if (!ptr)
- {
- FatalError("Out of memory");
- }
- return ptr;
-}
-
-/*****************
- * Xcalloc
- *****************/
-
-_X_EXPORT pointer
-Xcalloc (unsigned long amount)
-{
- pointer ret;
-
- ret = Xalloc (amount);
- if (ret != 0
-#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO)
- && (amount < MIN_LARGE) /* mmaped anonymous mem is already cleared */
-#endif
- )
- bzero ((char *) ret, (int) amount);
- return ret;
-}
-
-/*****************
- * XNFcalloc
- *****************/
-_X_EXPORT void *
-XNFcalloc (unsigned long amount)
-{
- pointer ret;
-
- ret = XNFalloc (amount);
- if (ret != 0
-#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO)
- && (amount < MIN_LARGE) /* mmaped anonymous mem is already cleared */
-#endif
- )
- bzero ((char *) ret, (int) amount);
- return ret;
-}
-
-/*****************
- * Xrealloc
- *****************/
-
-_X_EXPORT void *
-Xrealloc (pointer ptr, unsigned long amount)
-{
- register unsigned long *new_ptr;
-
- /* zero size requested */
- if (amount == 0) {
- if (ptr)
- Xfree(ptr);
- LOG_REALLOC("Xrealloc=0", ptr, amount, 0);
- return NULL;
- }
- /* negative size (or size > 2GB) - what do we do? */
- if ((long)amount < 0) {
- /* Diagnostic */
-#ifdef FATALERRORS
- FatalError("Xalloc: Xrealloc(<0)\n");
-#else
- ErrorF("Xalloc warning: Xrealloc(<0) ignored..\n");
-#endif
- if (ptr)
- Xfree(ptr); /* ?? */
- LOG_REALLOC("Xrealloc<0", ptr, amount, 0);
- return NULL;
- }
-
- new_ptr = Xalloc(amount);
- if ( (new_ptr) && (ptr) ) {
- unsigned long old_size;
- old_size = ((unsigned long *)ptr)[-2];
-#ifdef XALLOC_DEBUG
- if (MAGIC != ((unsigned long *)ptr)[-1]) {
- if (MAGIC_FREE == ((unsigned long *)ptr)[-1]) {
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: range already freed in Xrealloc() :-(\n");
-#else
- ErrorF("Xalloc error: range already freed in Xrealloc() :-(\a\n");
- sleep(5);
- XfreeTrap();
-#endif
- LOG_REALLOC("Xalloc error: ranged already freed in Xrealloc() :-(",
- ptr, amount, 0);
- return NULL;
- }
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: header corrupt in Xrealloc() :-(\n");
-#else
- ErrorF("Xalloc error: header corrupt in Xrealloc() :-(\n");
- XfreeTrap();
-#endif
- LOG_REALLOC("Xalloc error: header corrupt in Xrealloc() :-(",
- ptr, amount, 0);
- return NULL;
- }
-#endif /* XALLOC_DEBUG */
- /* copy min(old size, new size) */
- memcpy((char *)new_ptr, (char *)ptr, (amount < old_size ? amount : old_size));
- }
- if (ptr)
- Xfree(ptr);
- if (new_ptr) {
- LOG_REALLOC("Xrealloc", ptr, amount, new_ptr);
- return (void *)new_ptr;
- }
- if (Must_have_memory)
- FatalError("Out of memory");
- LOG_REALLOC("Xrealloc", ptr, amount, 0);
- return NULL;
-}
-
-/*****************
- * XNFrealloc
- * "no failure" realloc, alternate interface to Xrealloc w/o Must_have_memory
- *****************/
-
-_X_EXPORT void *
-XNFrealloc (pointer ptr, unsigned long amount)
-{
- if (( ptr = (pointer)Xrealloc( ptr, amount ) ) == NULL)
- {
- FatalError( "Out of memory" );
- }
- return ptr;
-}
-
-/*****************
- * Xfree
- * calls free
- *****************/
-
-_X_EXPORT void
-Xfree(pointer ptr)
-{
- unsigned long size;
- unsigned long *pheader;
-
- /* free(NULL) IS valid :-( - and widely used throughout the server.. */
- if (!ptr)
- return;
-
- pheader = (unsigned long *)((char *)ptr - SIZE_HEADER);
-#ifdef XALLOC_DEBUG
- if (MAGIC != pheader[1]) {
- /* Diagnostic */
- if (MAGIC_FREE == pheader[1]) {
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: range already freed in Xrealloc() :-(\n");
-#else
- ErrorF("Xalloc error: range already freed in Xrealloc() :-(\a\n");
- sleep(5);
- XfreeTrap();
-#endif
- LOG_FREE("Xalloc error: ranged already freed in Xrealloc() :-(", ptr);
- return;
- }
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: Header corrupt in Xfree() :-(\n");
-#else
- ErrorF("Xalloc error: Header corrupt in Xfree() :-(\n");
- XfreeTrap();
-#endif
- LOG_FREE("Xalloc error: Header corrupt in Xfree() :-(", ptr);
- return;
- }
-#endif /* XALLOC_DEBUG */
-
- size = pheader[0];
- if (size <= MAX_SMALL) {
- int indx;
- /*
- * small block
- */
-#ifdef SIZE_TAIL
- if (MAGIC2 != *(unsigned long *)((char *)ptr + size)) {
- /* Diagnostic */
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: Tail corrupt in Xfree() for small block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size));
-#else
- ErrorF("Xalloc error: Tail corrupt in Xfree() for small block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size));
- XfreeTrap();
-#endif
- LOG_FREE("Xalloc error: Tail corrupt in Xfree() for small block", ptr);
- return;
- }
-#endif /* SIZE_TAIL */
-
-#ifdef XFREE_ERASES
- memset(ptr,0xF0,size);
-#endif /* XFREE_ERASES */
-#ifdef XALLOC_DEBUG
- pheader[1] = MAGIC_FREE;
-#endif
- /* put this small block at the head of the list */
- indx = (size-1) / SIZE_STEPS;
- *(unsigned long **)(ptr) = free_lists[indx];
- free_lists[indx] = (unsigned long *)ptr;
- LOG_FREE("Xfree", ptr);
- return;
-
-#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO)
- } else if (size >= MIN_LARGE) {
- /*
- * large block
- */
-#ifdef SIZE_TAIL
- if (MAGIC2 != ((unsigned long *)((char *)ptr + size))[0]) {
- /* Diagnostic */
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: Tail corrupt in Xfree() for big block (adr=0x%x, val=0x%x)\n",(char *)ptr+size,((unsigned long *)((char *)ptr + size))[0]);
-#else
- ErrorF("Xalloc error: Tail corrupt in Xfree() for big block (adr=0x%x, val=0x%x)\n",(char *)ptr+size,((unsigned long *)((char *)ptr + size))[0]);
- XfreeTrap();
-#endif
- LOG_FREE("Xalloc error: Tail corrupt in Xfree() for big block", ptr);
- return;
- }
- size += SIZE_TAIL;
-#endif /* SIZE_TAIL */
-
- LOG_FREE("Xfree", ptr);
- size += SIZE_HEADER;
- munmap((caddr_t)pheader, (size_t)size);
- /* no need to clear - mem is inaccessible after munmap.. */
-#endif /* HAS_MMAP_ANON */
-
- } else {
- /*
- * medium sized block
- */
-#ifdef SIZE_TAIL
- if (MAGIC2 != *(unsigned long *)((char *)ptr + size)) {
- /* Diagnostic */
-#ifdef FATALERRORS
- XfreeTrap();
- FatalError("Xalloc error: Tail corrupt in Xfree() for medium block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size));
-#else
- ErrorF("Xalloc error: Tail corrupt in Xfree() for medium block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size));
- XfreeTrap();
-#endif
- LOG_FREE("Xalloc error: Tail corrupt in Xfree() for medium block", ptr);
- return;
- }
-#endif /* SIZE_TAIL */
-
-#ifdef XFREE_ERASES
- memset(pheader,0xF0,size+SIZE_HEADER);
-#endif /* XFREE_ERASES */
-#ifdef XALLOC_DEBUG
- pheader[1] = MAGIC_FREE;
-#endif
-
- LOG_FREE("Xfree", ptr);
- free((char *)pheader);
- }
-}
-
-void
-OsInitAllocator (void)
-{
- static Bool beenhere = FALSE;
-
- if (beenhere)
- return;
- beenhere = TRUE;
-
-#if defined(HAS_MMAP_ANON) || defined (MMAP_DEV_ZERO)
- pagesize = -1;
-#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE)
- pagesize = sysconf(_SC_PAGESIZE);
-#endif
-#ifdef _SC_PAGE_SIZE
- if (pagesize == -1)
- pagesize = sysconf(_SC_PAGE_SIZE);
-#endif
-#ifdef HAS_GETPAGESIZE
- if (pagesize == -1)
- pagesize = getpagesize();
-#endif
-#ifdef PAGE_SIZE
- if (pagesize == -1)
- pagesize = PAGE_SIZE;
-#endif
- if (pagesize == -1)
- FatalError("OsInitAllocator: Cannot determine page size\n");
-#endif
-
- /* set up linked lists of free blocks */
- bzero ((char *) free_lists, MAX_SMALL/SIZE_STEPS*sizeof(unsigned long *));
-
-#ifdef MMAP_DEV_ZERO
- /* open /dev/zero on systems that have mmap, but not MAP_ANON */
- if (devzerofd < 0) {
- if ((devzerofd = open("/dev/zero", O_RDWR, 0)) < 0)
- FatalError("OsInitAllocator: Cannot open /dev/zero (errno=%d)\n",
- errno);
- }
-#endif
-
-#ifdef XALLOC_LOG
- /* reset the log file to zero length */
- {
- FILE *f;
- f = fopen(XALLOC_LOG_FILE, "w");
- if (NULL!=f)
- fclose(f);
- }
-#endif
-}
-
-#else /* !INTERNAL_MALLOC */
-/* This is to avoid an empty .o */
-static int no_internal_xalloc;
-#endif /* INTERNAL_MALLOC */
commit c67b9c5fc33002b13a2360929a37f24169710f64
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 14:24:36 2007 -0500
Clean up some garbage in driver enumeration.
diff --git a/configure.ac b/configure.ac
index 8a1f88c..35b7f0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1518,8 +1518,6 @@ dnl has it in libc), or if libdl is needed to get it.
AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module])
- AC_DEFINE(DRIVERS, {}, [Built-in output drivers (none)])
- AC_DEFINE(IDRIVERS, {}, [Built-in input drivers (none)])
AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file])
AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 6380274..e74c590 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -538,14 +538,8 @@ fixup_video_driver_list(char **drivers)
}
}
-
-/*
- * Generate a compiled-in list of driver names. This is used to produce a
- * consistent probe order. For the loader server, we also look for vendor-
- * provided modules, pre-pending them to our own list.
- */
static char **
-GenerateDriverlist(char * dirname, char * drivernames)
+GenerateDriverlist(char * dirname)
{
char **ret;
const char *subdirs[] = { dirname, NULL };
@@ -559,20 +553,13 @@ GenerateDriverlist(char * dirname, char * drivernames)
return ret;
}
-
char **
xf86DriverlistFromCompile(void)
{
static char **driverlist = NULL;
- static Bool generated = FALSE;
-
- /* This string is modified in-place */
- static char drivernames[] = DRIVERS;
- if (!generated) {
- generated = TRUE;
- driverlist = GenerateDriverlist("drivers", drivernames);
- }
+ if (!driverlist)
+ driverlist = GenerateDriverlist("drivers");
return driverlist;
}
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1ef7973..d37875c 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1492,9 +1492,6 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
}
-#define MAXDRIVERS 64 /* A >hack<, to be sure ... */
-
-
_X_EXPORT int
xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
{
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 2a0a5f5..f382131 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -31,9 +31,6 @@
/* Build DPMS extension */
#undef DPMSExtension
-/* Built-in output drivers */
-#undef DRIVERS
-
/* Build GLX extension */
#undef GLXEXT
@@ -46,9 +43,6 @@
/* Support SHM */
#undef HAS_SHM
-/* Built-in input drivers */
-#undef IDRIVERS
-
/* Support IPv6 for TCP connections */
#undef IPv6
commit 0706e5e790060fbf046cfaff295b78806b7841c6
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 14:15:09 2007 -0500
Eliminate some redundancy in autoconfiguration.
We already synthesize Monitor and Module sections for you, no need to
specify them explicitly in the fake config buffer.
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index c5998bf..c6e1972 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -43,16 +43,6 @@
/* Sections for the default built-in configuration. */
-#define BUILTIN_MODULE_SECTION \
- "Section \"Module\"\n" \
- "\tLoad\t\"extmod\"\n" \
- "\tLoad\t\"dbe\"\n" \
- "\tLoad\t\"glx\"\n" \
- "\tLoad\t\"freetype\"\n" \
- "\tLoad\t\"record\"\n" \
- "\tLoad\t\"dri\"\n" \
- "EndSection\n\n"
-
#define BUILTIN_DEVICE_NAME \
"\"Builtin Default %s Device %d\""
@@ -68,14 +58,6 @@
BUILTIN_DEVICE_SECTION_PRE \
BUILTIN_DEVICE_SECTION_POST
-#define BUILTIN_MONITOR_NAME \
- "\"Builtin Default Monitor\""
-
-#define BUILTIN_MONITOR_SECTION \
- "Section \"Monitor\"\n" \
- "\tIdentifier\t" BUILTIN_MONITOR_NAME "\n" \
- "EndSection\n\n"
-
#define BUILTIN_SCREEN_NAME \
"\"Builtin Default %s Screen %d\""
@@ -83,7 +65,6 @@
"Section \"Screen\"\n" \
"\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
- "\tMonitor\t" BUILTIN_MONITOR_NAME "\n" \
"EndSection\n\n"
#define BUILTIN_LAYOUT_SECTION_PRE \
@@ -220,9 +201,6 @@ xf86AutoConfig(void)
driver = chooseVideoDriver();
- AppendToConfig(BUILTIN_MODULE_SECTION);
- AppendToConfig(BUILTIN_MONITOR_SECTION);
-
if (driver) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_PRE,
driver, 0, driver);
commit 2c01a49bf0a407bd5510bb9ceb4ef86a2cc36be9
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 15 13:32:59 2007 -0500
Don't sleep(1) at exit on any platform.
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index d4f01d3..b5ee21d 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1307,10 +1307,6 @@ AbortDDX()
/*
* try to restore the original video state
*/
-#if defined(HAS_USL_VTS) && !defined(linux)
- /* Need the sleep when starting X from within another X session */
- sleep(1);
-#endif
#ifdef DPMSExtension /* Turn screens back on */
if (DPMSPowerLevel != DPMSModeOn)
DPMSSet(DPMSModeOn);
commit 4c9cc82fc4461d180ae2c2fbe50e7f98b0777f91
Author: Tiago Vignatti <vignatti at c3sl.ufpr.br>
Date: Thu Nov 15 01:46:11 2007 -0200
For some reason "-nozap" appeared twice. Weird.
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 8c4342e..5376f19 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -632,11 +632,6 @@ KdProcessArgument (int argc, char **argv, int i)
kdDontZap = TRUE;
return 1;
}
- if (!strcmp (argv[i], "-nozap"))
- {
- kdDontZap = TRUE;
- return 1;
- }
if (!strcmp (argv[i], "-3button"))
{
kdEmulateMiddleButton = FALSE;
commit 3dde66f96b9b8431381871cf85266da3ec57a0d4
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Nov 14 15:10:59 2007 -0500
Start 1.4.99
diff --git a/configure.ac b/configure.ac
index 1df8874..8a1f88c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.0.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
commit c3897ca7099fc007b4134a8fabd4c707f99f2ac7
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Nov 9 13:55:32 2007 -0500
Add -pogo option for init/teardown performance testing.
diff --git a/os/utils.c b/os/utils.c
index ae96a41..d46a756 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -933,6 +933,10 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
+ else if (strcmp(argv[i], "-pogo") == 0)
+ {
+ dispatchException = DE_TERMINATE;
+ }
else if ( strcmp( argv[i], "-pn") == 0)
PartialNetwork = TRUE;
else if ( strcmp( argv[i], "-nopn") == 0)
commit cecac794451b793871f297b91a11d3b52eeb6d1b
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Nov 8 17:25:36 2007 -0500
Don't sleep(1) at server exit.
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index bf577e6..d4f01d3 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1307,7 +1307,7 @@ AbortDDX()
/*
* try to restore the original video state
*/
-#ifdef HAS_USL_VTS
+#if defined(HAS_USL_VTS) && !defined(linux)
/* Need the sleep when starting X from within another X session */
sleep(1);
#endif
More information about the xorg-commit
mailing list