xserver: Branch 'master' - 11 commits
Adam Jackson
ajax at kemper.freedesktop.org
Tue Nov 25 12:14:19 PST 2008
dbe/dbe.c | 83 -----------------------
dbe/dbestruct.h | 1
hw/xfree86/common/Makefile.am | 3
hw/xfree86/common/xf86DoProbe.c | 116 ---------------------------------
hw/xfree86/common/xf86Init.c | 69 +++++++++++++++++++
hw/xfree86/common/xf86Priv.h | 5 -
hw/xfree86/dummylib/xf86info.c | 2
hw/xfree86/int10/helper_exec.c | 2
hw/xfree86/loader/loadmod.c | 18 -----
hw/xfree86/os-support/linux/lnx_bell.c | 1
hw/xfree86/vbe/vbe.c | 6 -
hw/xfree86/xaa/xaaInitAccel.c | 9 --
hw/xfree86/xaa/xaalocal.h | 4 +
hw/xnest/Pixmap.c | 2
include/dix.h | 2
15 files changed, 88 insertions(+), 235 deletions(-)
New commits:
commit 88297558aada44bc714ad57adbeed3740aaadee5
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 14:20:58 2008 -0500
Dead code cleanup over DBE.
No DDXes have explicit DBE support anymore, so the init registration
table never got used. Just nuke it all.
diff --git a/dbe/dbe.c b/dbe/dbe.c
index bd27789..ff9df7f 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -58,9 +58,6 @@
/* GLOBALS */
-/* Per-screen initialization functions [init'ed by DbeRegisterFunction()] */
-static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */
-
/* These are static globals copied to DBE's screen private for use by DDX */
static int dbeScreenPrivKeyIndex;
static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex;
@@ -74,45 +71,6 @@ static RESTYPE dbeWindowPrivResType;
/* Used to generate DBE's BadBuffer error. */
static int dbeErrorBase;
-/* Used by DbeRegisterFunction() to initialize the initialization function
- * table only once per server lifetime.
- */
-static Bool firstRegistrationPass = TRUE;
-
-
-/******************************************************************************
- *
- * DBE DIX Procedure: DbeRegisterFunction
- *
- * Description:
- *
- * This function registers the DBE init function for the specified screen.
- *
- *****************************************************************************/
-
-void
-DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) (/* ??? */))
-{
- int i;
-
- /* Initialize the initialization function table if it has not been
- * initialized already.
- */
- if (firstRegistrationPass)
- {
- for (i = 0; i < MAXSCREENS; i++)
- {
- DbeInitFunct[i] = NULL;
- }
-
- firstRegistrationPass = FALSE;
- }
-
- DbeInitFunct[pScreen->myNum] = funct;
-
-} /* DbeRegisterFunction() */
-
-
/******************************************************************************
*
* DBE DIX Procedure: DbeStubScreen
@@ -1498,12 +1456,6 @@ DbeResetProc(ExtensionEntry *extEntry)
xfree(pDbeScreenPriv);
}
}
-
- /* We want to init the initialization function table after every server
- * reset in DbeRegisterFunction().
- */
- firstRegistrationPass = TRUE;
-
} /* DbeResetProc() */
@@ -1659,39 +1611,8 @@ DbeExtensionInit(void)
pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey;
pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey;
- if(DbeInitFunct[i])
{
- /* This screen supports DBE. */
-
- /* Setup DIX. */
- pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter;
-
- /* Setup DDX. */
- ddxInitSuccess = (*DbeInitFunct[i])(pScreen, pDbeScreenPriv);
-
- /* DDX DBE initialization may have the side affect of
- * reallocating pDbeScreenPriv, so we need to update it.
- */
- pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen);
-
- if (ddxInitSuccess)
- {
- /* Wrap DestroyWindow. The DDX initialization function
- * already wrapped PositionWindow for us.
- */
-
- pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow;
- pScreen->DestroyWindow = DbeDestroyWindow;
- }
- else
- {
- /* DDX initialization failed. Stub the screen. */
- DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
- }
- }
- else
- {
- /* This screen does not support DBE. */
+ /* We don't have DDX support for DBE anymore */
#ifndef DISABLE_MI_DBE_BY_DEFAULT
/* Setup DIX. */
@@ -1723,7 +1644,7 @@ DbeExtensionInit(void)
DbeStubScreen(pDbeScreenPriv, &nStubbedScreens);
#endif
- } /* else -- this screen does not support DBE. */
+ }
} /* for (i = 0; i < screenInfo.numScreens; i++) */
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index 7d5a115..641f209 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -74,6 +74,7 @@
/* Marker for free elements in the buffer ID array. */
#define DBE_FREE_ID_ELEMENT 0
+extern void DbeExtensionInit (void);
/* TYPEDEFS */
commit e5eaea599ab16428c69912b6b3427ebe46707d7c
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 14:05:51 2008 -0500
Warning fix
xf86info.c:11: warning: initialization makes integer from pointer
without a cast
diff --git a/hw/xfree86/dummylib/xf86info.c b/hw/xfree86/dummylib/xf86info.c
index 221a9d2..7db6817 100644
--- a/hw/xfree86/dummylib/xf86info.c
+++ b/hw/xfree86/dummylib/xf86info.c
@@ -8,5 +8,5 @@
#include "xf86Priv.h"
/* Dummy variables */
-xf86InfoRec xf86Info = {NULL, };
+xf86InfoRec xf86Info;
commit 37072500f7bcf39e0d6aa2ceb5d1f2aeeab0b26b
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 14:04:44 2008 -0500
Warning fix
helper_exec.c: In function âport_rep_inbâ:
helper_exec.c:219: warning: implicit declaration of function
âDEBUG_IO_TRACEâ
helper_exec.c:219: warning: nested extern declaration of
âDEBUG_IO_TRACEâ
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 15eba49..1c89ce5 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -32,6 +32,8 @@
#include "Pci.h"
#ifdef _X86EMU
#include "x86emu/x86emui.h"
+#else
+#define DEBUG_IO_TRACE() 0
#endif
#include <pciaccess.h>
commit d96bffce2dcf209e76be9b36ca1ede7e0c976d77
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 13:59:00 2008 -0500
Warning fix
Init.c:139: warning: no previous prototype for âddxBeforeResetâ
Just declare the prototype always, seriously.
diff --git a/include/dix.h b/include/dix.h
index 76ddbb5..66af953 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -169,9 +169,7 @@ extern void SendErrorToClient(
extern void MarkClientException(
ClientPtr /*client*/);
-#if defined(DDXBEFORERESET)
extern void ddxBeforeReset (void);
-#endif
/* dixutils.c */
commit 09ea671cbff605fd2b2af71619e7db5002108bf8
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 13:40:47 2008 -0500
Warning fix
lnx_bell.c:37: warning: no previous prototype for âxf86OSRingBellâ
diff --git a/hw/xfree86/os-support/linux/lnx_bell.c b/hw/xfree86/os-support/linux/lnx_bell.c
index 93ad680..702dfa6 100644
--- a/hw/xfree86/os-support/linux/lnx_bell.c
+++ b/hw/xfree86/os-support/linux/lnx_bell.c
@@ -32,6 +32,7 @@
#include "xf86.h"
#include "xf86Priv.h"
+#include "xf86_OSproc.h"
_X_EXPORT void
xf86OSRingBell(int loudness, int pitch, int duration)
commit a9853c7d337b3b1ad49793e9b4b90e313b6fa536
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:53:55 2008 -0500
Warning fix
Pixmap.c: In function âxnestPixmapToRegionâ:
Pixmap.c:93: warning: âBox.x1â may be used uninitialized in this
function
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 08305b1..676a2ba 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -90,7 +90,7 @@ xnestPixmapToRegion(PixmapPtr pPixmap)
register RegionPtr pReg, pTmpReg;
register int x, y;
unsigned long previousPixel, currentPixel;
- BoxRec Box;
+ BoxRec Box = { 0, 0, 0, 0 };
Bool overlap;
ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
commit 81eafe9f93a272b06aa9f9235ec5676b9aa3ee3e
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:45:07 2008 -0500
Warning fix.
vbe.c: In function âVBEReadPanelIDâ:
vbe.c:1145: warning: return from incompatible pointer type
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 8af1727..4986b5b 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1108,7 +1108,7 @@ VBEReadPanelID(vbeInfoPtr pVbe)
{
int RealOff = pVbe->real_mode_base;
pointer page = pVbe->memory;
- unsigned char *tmp = NULL;
+ void *tmp = NULL;
int screen = pVbe->pInt10->scrnIndex;
pVbe->pInt10->ax = 0x4F11;
@@ -1129,8 +1129,8 @@ VBEReadPanelID(vbeInfoPtr pVbe)
switch (pVbe->pInt10->ax & 0xff00) {
case 0x0:
xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read successfully\n");
- tmp = (unsigned char *)xnfalloc(32);
- memcpy(tmp,page,32);
+ tmp = xnfalloc(32);
+ memcpy(tmp, page, 32);
break;
case 0x100:
xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read failed\n");
commit 09bfb25e031772611a2f0902d4ba77b587e4bdb2
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:43:36 2008 -0500
Remove unused XAAAvailableOptions
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 0672bcf..4087142 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -16,8 +16,6 @@
#include "xf86fbman.h"
#include "servermd.h"
-static const OptionInfoRec *XAAAvailableOptions(void *unused);
-
/*
* XAA Config options
*/
@@ -111,13 +109,6 @@ static XF86ModuleVersionInfo xaaVersRec =
_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, NULL, NULL };
-/*ARGSUSED*/
-static const OptionInfoRec *
-XAAAvailableOptions(void *unused)
-{
- return (XAAOptions);
-}
-
Bool
XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
{
commit 8b9253f6383df3fefe38bde43a5f892b158a77c4
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:38:47 2008 -0500
Code motion: subsume xf86DoProbe.c into xf86Init.c
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index d3202bc..77ab4c3 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -27,8 +27,7 @@ BUILT_SOURCES = xf86DefModeSet.c
AM_LDFLAGS = -r
libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \
xf86Cursor.c xf86DGA.c xf86DPMS.c \
- xf86DoProbe.c xf86Events.c \
- xf86Globals.c xf86AutoConfig.c \
+ xf86Events.c xf86Globals.c xf86AutoConfig.c \
xf86Option.c \
xf86VidMode.c xf86fbman.c xf86cmap.c \
xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \
diff --git a/hw/xfree86/common/xf86DoProbe.c b/hw/xfree86/common/xf86DoProbe.c
deleted file mode 100644
index bba6ab7..0000000
--- a/hw/xfree86/common/xf86DoProbe.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1999-2002 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * finish setting up the server
- * Load the driver modules and call their probe functions.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include "os.h"
-#include "loaderProcs.h"
-#include "xf86Config.h"
-#include "xf86_OSlib.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-void
-DoProbe()
-{
- int i;
- Bool probeResult;
- Bool ioEnableFailed = FALSE;
-
- /* Find the list of video driver modules. */
- char **list = xf86DriverlistFromCompile();
- char **l;
-
- if (list) {
- ErrorF("List of video driver modules:\n");
- for (l = list; *l; l++)
- ErrorF("\t%s\n", *l);
- } else {
- ErrorF("No video driver modules found\n");
- }
-
- /* Load all the drivers that were found. */
- xf86LoadModules(list, NULL);
-
- /* Disable PCI devices */
- xf86AccessInit();
-
- /* Call all of the probe functions, reporting the results. */
- for (i = 0; i < xf86NumDrivers; i++) {
- DriverRec * const drv = xf86DriverList[i];
-
- if (!xorgHWAccess) {
- xorgHWFlags flags;
- if (!drv->driverFunc
- || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags )
- || NEED_IO_ENABLED(flags)) {
- if (ioEnableFailed)
- continue;
- if (!xf86EnableIO()) {
- ioEnableFailed = TRUE;
- continue;
- }
- xorgHWAccess = TRUE;
- }
- }
-
-
- xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName);
-
- probeResult = xf86CallDriverProbe( drv, TRUE );
- if (!probeResult) {
- xf86ErrorF("Probe in driver `%s' returns FALSE\n",
- drv->driverName);
- } else {
- xf86ErrorF("Probe in driver `%s' returns TRUE\n",
- drv->driverName);
-
- /* If we have a result, then call driver's Identify function */
- if (drv->Identify != NULL) {
- const int verbose = xf86SetVerbosity(1);
- (*drv->Identify)(0);
- xf86SetVerbosity(verbose);
- }
- }
- }
-
- OsCleanup(TRUE);
- AbortDDX();
- fflush(stderr);
- exit(0);
-}
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index a052247..922e7b3 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -643,6 +643,75 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only )
return foundScreen;
}
+static void
+DoProbe(void)
+{
+ int i;
+ Bool probeResult;
+ Bool ioEnableFailed = FALSE;
+
+ /* Find the list of video driver modules. */
+ char **list = xf86DriverlistFromCompile();
+ char **l;
+
+ if (list) {
+ ErrorF("List of video driver modules:\n");
+ for (l = list; *l; l++)
+ ErrorF("\t%s\n", *l);
+ } else {
+ ErrorF("No video driver modules found\n");
+ }
+
+ /* Load all the drivers that were found. */
+ xf86LoadModules(list, NULL);
+
+ /* Disable PCI devices */
+ xf86AccessInit();
+
+ /* Call all of the probe functions, reporting the results. */
+ for (i = 0; i < xf86NumDrivers; i++) {
+ DriverRec * const drv = xf86DriverList[i];
+
+ if (!xorgHWAccess) {
+ xorgHWFlags flags;
+ if (!drv->driverFunc
+ || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags )
+ || NEED_IO_ENABLED(flags)) {
+ if (ioEnableFailed)
+ continue;
+ if (!xf86EnableIO()) {
+ ioEnableFailed = TRUE;
+ continue;
+ }
+ xorgHWAccess = TRUE;
+ }
+ }
+
+
+ xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName);
+
+ probeResult = xf86CallDriverProbe( drv, TRUE );
+ if (!probeResult) {
+ xf86ErrorF("Probe in driver `%s' returns FALSE\n",
+ drv->driverName);
+ } else {
+ xf86ErrorF("Probe in driver `%s' returns TRUE\n",
+ drv->driverName);
+
+ /* If we have a result, then call driver's Identify function */
+ if (drv->Identify != NULL) {
+ const int verbose = xf86SetVerbosity(1);
+ (*drv->Identify)(0);
+ xf86SetVerbosity(verbose);
+ }
+ }
+ }
+
+ OsCleanup(TRUE);
+ AbortDDX();
+ fflush(stderr);
+ exit(0);
+}
/*
* InitOutput --
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index f3dfd70..5de48ac 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -150,9 +150,10 @@ Bool xf86PathIsSafe(const char *path);
extern const DisplayModeRec xf86DefaultModes[];
extern const int xf86NumDefaultModes;
-/* xf86DoProbe.c */
-void DoProbe(void);
+/* xf86Configure.c */
void DoConfigure(void);
+
+/* xf86ShowOpts.c */
void DoShowOptions(void);
/* xf86Events.c */
commit fbabb1c5c243cfd8c954dec4c060dff1a0b81015
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:34:28 2008 -0500
Warning fix.
In file included from l3-xaaStipple.c:4:
./xaaStipple.c:35: warning: no previous prototype for
âXAAGetStippleScanlineFunc3LSBFirstâ
etc
diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h
index e25b9df..69a5905 100644
--- a/hw/xfree86/xaa/xaalocal.h
+++ b/hw/xfree86/xaa/xaalocal.h
@@ -1051,6 +1051,10 @@ StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void);
StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void);
StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void);
StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void);
+StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void);
int
XAAPolyText8TEColorExpansion(
commit cbaca6ec666d7349c4680b8affc13b5c9cae1fa5
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Nov 25 00:14:24 2008 -0500
Remove dead FreeModuleDesc.
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 70c54a7..e98f013 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -1134,24 +1134,6 @@ UnloadSubModule(ModuleDescPtr mod)
}
static void
-FreeModuleDesc(ModuleDescPtr head)
-{
- ModuleDescPtr sibs, prev;
-
- if (head == (ModuleDescPtr) 1)
- return;
- if (head->child)
- FreeModuleDesc(head->child);
- sibs = head;
- while (sibs) {
- prev = sibs;
- sibs = sibs->sib;
- TestFree(prev->name);
- xfree(prev);
- }
-}
-
-static void
RemoveChild(ModuleDescPtr child)
{
ModuleDescPtr mdp;
More information about the xorg-commit
mailing list