xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Wed Feb 4 20:02:20 PST 2009
hw/xfree86/common/xf86.h | 3 -
hw/xfree86/common/xf86Bus.c | 98 ++--------------------------------------
hw/xfree86/common/xf86Bus.h | 11 ----
hw/xfree86/common/xf86Init.c | 2
hw/xfree86/common/xf86fbBus.c | 5 --
hw/xfree86/common/xf86noBus.c | 3 -
hw/xfree86/common/xf86sbusBus.c | 14 ++---
hw/xfree86/common/xf86str.h | 6 --
8 files changed, 18 insertions(+), 124 deletions(-)
New commits:
commit 2fe79990e31ac684637ca3c47198ee0cead10abe
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jan 26 07:11:49 2009 -0500
Bus: Remove xf86SetAccessFuncs() and related machinery
Only mga was using this, and even then only behind an ifdef that no one
ever built. Not a great idea in the first place.
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index ab0e045..7dd693f 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
@@ -128,8 +127,6 @@ extern _X_EXPORT void xf86DeallocateResourcesForEntity(int entityIndex, unsigned
extern _X_EXPORT resPtr xf86RegisterResources(int entityIndex, resList list,
unsigned long Access);
extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base);
-extern _X_EXPORT void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs,
- xf86SetAccessFuncPtr oldFuncs);
extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
extern _X_EXPORT resPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
extern _X_EXPORT void xf86EnterServerState(xf86State state);
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 8040f58..f5b535c 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -792,24 +792,6 @@ xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn)
}
}
-void
-xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs,
- xf86SetAccessFuncPtr oldFuncs)
-{
- AccessFuncPtr rac;
-
- if (!xf86Entities[pEnt->index]->rac)
- xf86Entities[pEnt->index]->rac = xnfcalloc(1,sizeof(AccessFuncRec));
-
- rac = xf86Entities[pEnt->index]->rac;
-
- rac->mem_new = funcs->mem;
- rac->io_new = funcs->io;
- rac->io_mem_new = funcs->io_mem;
-
- rac->old = oldFuncs;
-}
-
/*
* Conflict checking
*/
@@ -1392,30 +1374,11 @@ busTypeSpecific(EntityPtr pEnt, xf86AccessPtr *acc_mem,
static void
setAccess(EntityPtr pEnt, xf86State state)
{
-
xf86AccessPtr acc_mem, acc_io, acc_mem_io;
- xf86AccessPtr org_mem = NULL, org_io = NULL, org_mem_io = NULL;
int prop;
busTypeSpecific(pEnt, &acc_mem, &acc_io, &acc_mem_io);
- /* The replacement function needs to handle _all_ shared resources */
- /* unless they are handeled locally and disabled otherwise */
- if (pEnt->rac) {
- if (pEnt->rac->io_new) {
- org_io = acc_io;
- acc_io = pEnt->rac->io_new;
- }
- if (pEnt->rac->mem_new) {
- org_mem = acc_mem;
- acc_mem = pEnt->rac->mem_new;
- }
- if (pEnt->rac->io_mem_new) {
- org_mem_io = acc_mem_io;
- acc_mem_io = pEnt->rac->io_mem_new;
- }
- }
-
if (state == OPERATING) {
prop = pEnt->entityProp;
switch(pEnt->entityProp & NEED_SHARED) {
@@ -1451,39 +1414,6 @@ setAccess(EntityPtr pEnt, xf86State state)
break;
}
- if (org_io) {
- /* does the driver want the old access func? */
- if (pEnt->rac->old) {
- /* give it to the driver, leave state disabled */
- pEnt->rac->old->io = org_io;
- } else {
- /* driver doesn't want it - enable generic access */
- org_io->AccessEnable(org_io->arg);
- }
- }
-
- if (org_mem_io) {
- /* does the driver want the old access func? */
- if (pEnt->rac->old) {
- /* give it to the driver, leave state disabled */
- pEnt->rac->old->io_mem = org_mem_io;
- } else {
- /* driver doesn't want it - enable generic access */
- org_mem_io->AccessEnable(org_mem_io->arg);
- }
- }
-
- if (org_mem) {
- /* does the driver want the old access func? */
- if (pEnt->rac->old) {
- /* give it to the driver, leave state disabled */
- pEnt->rac->old->mem = org_mem;
- } else {
- /* driver doesn't want it - enable generic access */
- org_mem->AccessEnable(org_mem->arg);
- }
- }
-
if (!(prop & NEED_MEM_SHARED)){
if (prop & NEED_MEM) {
if (acc_mem)
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 83ba83c..dfc4176 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -47,7 +47,6 @@ typedef struct racInfo {
xf86AccessPtr mem_new;
xf86AccessPtr io_new;
xf86AccessPtr io_mem_new;
- xf86SetAccessFuncPtr old;
} AccessFuncRec, *AccessFuncPtr;
@@ -64,7 +63,6 @@ typedef struct {
Bool inUse;
BusRec bus;
EntityAccessPtr access;
- AccessFuncPtr rac;
pointer busAcc;
int lastScrnFlag;
DevUnion * entityPrivates;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 904c369..511181f 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -582,12 +582,6 @@ typedef struct _AccessRec {
void *arg;
} xf86AccessRec, *xf86AccessPtr;
-typedef struct {
- xf86AccessPtr mem;
- xf86AccessPtr io;
- xf86AccessPtr io_mem;
-} xf86SetAccessFuncRec, *xf86SetAccessFuncPtr;
-
/* bus-access-related types */
typedef enum {
NONE,
commit 9ff6180161267e71ae750498da0ec4889cd5c260
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jan 26 06:23:09 2009 -0500
Bus: Delete some obfuscatory macros
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index d320078..8040f58 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -218,13 +218,13 @@ xf86IsEntityPrimary(int entityIndex)
{
EntityPtr pEnt = xf86Entities[entityIndex];
- if (primaryBus.type != pEnt->busType) return FALSE;
+ if (primaryBus.type != pEnt->bus.type) return FALSE;
- switch (pEnt->busType) {
+ switch (pEnt->bus.type) {
case BUS_PCI:
return (pEnt->bus.id.pci == primaryBus.id.pci);
case BUS_SBUS:
- return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum);
+ return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum);
default:
return FALSE;
}
@@ -1000,9 +1000,9 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state)
}
if (entityIndex > -1)
- loc = xf86Entities[entityIndex]->busType;
+ loc = xf86Entities[entityIndex]->bus.type;
if (pRes->entityIndex > -1)
- r_loc = xf86Entities[pRes->entityIndex]->busType;
+ r_loc = xf86Entities[pRes->entityIndex]->bus.type;
if ((type & ResAccMask) == ResShared &&
(pRes->res_type & ResAccMask) == ResShared)
@@ -1295,7 +1295,7 @@ static void
convertRange2Host(int entityIndex, resRange *pRange)
{
if (pRange->type & ResBus) {
- switch (xf86Entities[entityIndex]->busType) {
+ switch (xf86Entities[entityIndex]->bus.type) {
case BUS_PCI:
pciConvertRange2Host(entityIndex,pRange);
break;
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 518294c..83ba83c 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -89,10 +89,6 @@ typedef struct {
#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED)
-#define busType bus.type
-#define isaBusId bus.id.isa
-#define sbusBusId bus.id.sbus
-
struct x_BusAccRec;
typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 97b703d..2c4be84 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -483,7 +483,7 @@ probe_devices_from_device_sections(DriverPtr drvp)
for ( k = 0; k < xf86NumEntities; k++ ) {
EntityPtr pEnt = xf86Entities[k];
- if (pEnt->busType != BUS_PCI)
+ if (pEnt->bus.type != BUS_PCI)
continue;
if (pEnt->bus.id.pci == pPci) {
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index 552b9f8..a189639 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 2000-2001 by The XFree86 Project, Inc.
*
@@ -63,7 +62,7 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
p = xf86Entities[num];
p->driver = drvp;
p->chipset = 0;
- p->busType = BUS_NONE;
+ p->bus.type = BUS_NONE;
p->active = active;
p->inUse = FALSE;
xf86AddDevToEntity(num, dev);
@@ -88,7 +87,7 @@ xf86GetFbInfoForScreen(int scrnIndex)
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
- if (p->busType == BUS_NONE) {
+ if (p->bus.type == BUS_NONE) {
num++;
}
}
diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c
index d726748..e7d4442 100644
--- a/hw/xfree86/common/xf86noBus.c
+++ b/hw/xfree86/common/xf86noBus.c
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 2000-2002 by The XFree86 Project, Inc.
*
@@ -61,7 +60,7 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
p = xf86Entities[num];
p->driver = drvp;
p->chipset = 0;
- p->busType = BUS_NONE;
+ p->bus.type = BUS_NONE;
p->active = active;
p->inUse = FALSE;
xf86AddDevToEntity(num, dev);
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index a4caef3..924c2bc 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -320,7 +320,7 @@ xf86CheckSbusSlot(int fbNum)
for (i = 0; i < xf86NumEntities; i++) {
p = xf86Entities[i];
/* Check if this SBUS slot is taken */
- if (p->busType == BUS_SBUS && p->sbusBusId.fbNum == fbNum)
+ if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum)
return FALSE;
}
@@ -345,9 +345,9 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp,
p = xf86Entities[num];
p->driver = drvp;
p->chipset = -1;
- p->busType = BUS_SBUS;
+ p->bus.type = BUS_SBUS;
xf86AddDevToEntity(num, dev);
- p->sbusBusId.fbNum = psdp->fbNum;
+ p->bus.id.sbus.fbNum = psdp->fbNum;
p->active = active;
p->inUse = FALSE;
/* Here we initialize the access structure */
@@ -543,10 +543,10 @@ xf86GetSbusInfoForEntity(int entityIndex)
EntityPtr p = xf86Entities[entityIndex];
if (entityIndex >= xf86NumEntities
- || p->busType != BUS_SBUS) return NULL;
+ || p->bus.type != BUS_SBUS) return NULL;
for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) {
- if (p->sbusBusId.fbNum == (*psdpp)->fbNum)
+ if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum)
return (*psdpp);
}
return NULL;
@@ -559,9 +559,9 @@ xf86GetEntityForSbusInfo(sbusDevicePtr psdp)
for (i = 0; i < xf86NumEntities; i++) {
EntityPtr p = xf86Entities[i];
- if (p->busType != BUS_SBUS) continue;
+ if (p->bus.type != BUS_SBUS) continue;
- if (p->sbusBusId.fbNum == psdp->fbNum)
+ if (p->bus.id.sbus.fbNum == psdp->fbNum)
return i;
}
return -1;
commit 8eca37cb8934e79f02291460eb7b49a5d528f391
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Feb 4 22:48:52 2009 -0500
Bus: Remove unused xf86ExtractTypeFromList
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index ece8752..d320078 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -2351,19 +2351,6 @@ xf86FindComplement(resRange Range)
}
#endif
-resPtr
-xf86ExtractTypeFromList(resPtr list, unsigned long type)
-{
- resPtr ret = NULL;
-
- while (list) {
- if ((list->res_type & ResTypeMask) == type)
- ret = xf86AddResToList(ret,&(list->val),list->entityIndex);
- list = list->next;
- }
- return ret;
-}
-
/*
* xf86FindPrimaryDevice() - Find the display device which
* was active when the server was started.
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index be19e19..518294c 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -135,7 +135,5 @@ extern BusAccPtr xf86BusAccInfo;
int xf86AllocateEntity(void);
BusType StringToBusType(const char* busID, const char **retID);
Bool xf86IsSubsetOf(resRange range, resPtr list);
-resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
-resPtr xf86FindIntersect(resRange Range, resPtr list);
#endif /* _XF86_BUS_H */
commit b013111e98d50f5962e9b275eb28d969d5c9576e
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Jan 26 03:14:18 2009 -0500
Bus: make the resource list static.
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 69f5152..ece8752 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -70,9 +70,8 @@ BusRec primaryBus = { BUS_NONE, { 0 } };
static Bool xf86ResAccessEnter = FALSE;
-
/* resource lists */
-resPtr Acc = NULL;
+static resPtr Acc = NULL;
/* predefined special resources */
resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END};
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index c2d5bb7..be19e19 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
@@ -131,8 +130,6 @@ extern EntityPtr *xf86Entities;
extern int xf86NumEntities;
extern xf86AccessRec AccessNULL;
extern BusRec primaryBus;
-extern resPtr Acc;
-extern resPtr ResRange;
extern BusAccPtr xf86BusAccInfo;
int xf86AllocateEntity(void);
More information about the xorg-commit
mailing list