xserver: Branch 'master' - 3 commits

Tiago Vignatti vignatti at kemper.freedesktop.org
Wed Aug 5 12:57:15 PDT 2009


 hw/xfree86/common/xf86Bus.c    |    1 
 hw/xfree86/common/xf86Bus.h    |   17 ------
 hw/xfree86/common/xf86pciBus.c |  106 -----------------------------------------
 hw/xfree86/common/xf86pciBus.h |   24 ---------
 4 files changed, 1 insertion(+), 147 deletions(-)

New commits:
commit 8c0085c715effdc450d78eec14bc32e6214c78af
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Wed Aug 5 22:50:44 2009 +0300

    xfree86: remove more RAC junky
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 01716ed..d7e8d0d 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -55,7 +55,6 @@
 EntityPtr *xf86Entities = NULL;	/* Bus slots claimed by drivers */
 int xf86NumEntities = 0;
 static int xf86EntityPrivateCount = 0;
-BusAccPtr xf86BusAccInfo = NULL;
 
 BusRec primaryBus = { BUS_NONE, { 0 } };
 
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 95da8a5..844fd86 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -62,23 +62,6 @@ typedef struct {
     IOADDRESS                   domainIO;
 } EntityRec, *EntityPtr;
 
-typedef struct x_BusAccRec {
-    struct x_BusAccRec *current; /* pointer to bridge open on this bus */
-    struct x_BusAccRec *primary; /* pointer to the bus connecting to this */
-    struct x_BusAccRec *next;    /* this links the different buses together */
-    BusType type;
-    BusType busdep_type;
-    /* Bus-specific fields */
-    union {
-	struct {
-	    int bus;
-	    int primary_bus;
-	    struct pci_device * dev;
-	    pciBridgesSave save;
-	} pci;
-    } busdep;
-} BusAccRec, *BusAccPtr;
-
 /* state change notification callback */
 typedef struct _stateChange {
     xf86StateChangeNotificationCallbackFunc func;
diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
index 492feef..3125e0d 100644
--- a/hw/xfree86/common/xf86pciBus.h
+++ b/hw/xfree86/common/xf86pciBus.h
@@ -33,28 +33,6 @@
 #ifndef _XF86_PCI_BUS_H
 #define _XF86_PCI_BUS_H
 
-typedef struct {
-    CARD32 command;
-    CARD32 base[6];
-    CARD32 biosBase;
-} pciSave, *pciSavePtr;
-
-typedef struct {
-    struct pci_device * dev;
-    CARD32 ctrl;
-} pciArg;
-
-typedef struct {
-    pciArg arg;
-    pciSave save;
-    pciSave restore;
-    Bool ctrl;
-} pciAccRec, *pciAccPtr;
-
-typedef union {
-    CARD16 control;
-} pciBridgesSave, *pciBridgesSavePtr;
-
 void xf86PciProbe(void);
 
 #endif /* _XF86_PCI_BUS_H */
commit 444723273ae82fc3f6707ed1a461aaaa8fdae39c
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Wed Aug 5 22:48:02 2009 +0300

    xfree86: reorganize pci code
    
    - xf86PciVideoInfo doesn't need to be global
    - remove unused macros
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 0317882..df62e07 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -51,10 +51,7 @@
 
 /* Bus-specific globals */
 Bool pciSlotClaimed = FALSE;
-static struct pci_device ** xf86PciVideoInfo = NULL;	/* PCI probe for video hw */
 
-
-/* PCI classes that get included in xf86PciVideoInfo */
 #define PCIINFOCLASSES(c) \
     ( (((c) & 0x00ff0000) == (PCI_CLASS_PREHISTORIC << 16)) \
       || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \
@@ -78,22 +75,6 @@ static struct pci_device ** xf86PciVideoInfo = NULL;	/* PCI probe for video hw *
     (((c) & 0x00ffff00) \
 	 == ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8)))
 
-/*
- * PCI classes for which potentially destructive checking of the map sizes
- * may be done.  Any classes where this may be unsafe should be omitted
- * from this list.
- */
-#define PCINONSYSTEMCLASSES(c) PCIALWAYSPRINTCLASSES(c)
-
-/* 
- * PCI classes that use RAC 
- */
-#define PCISHAREDIOCLASSES(c) \
-    ( (((c) & 0x00ffff00) \
-       == ((PCI_CLASS_PREHISTORIC << 16) | (PCI_SUBCLASS_PREHISTORIC_VGA << 8))) \
-      || IS_VGA(c) )
-
-
 void
 xf86FormatPciBusNumber(int busnum, char *buffer)
 {
@@ -115,6 +96,7 @@ xf86PciProbe(void)
     int num = 0;
     struct pci_device *info;
     struct pci_device_iterator *iter;
+    struct pci_device ** xf86PciVideoInfo = NULL;
 
 
     if (!xf86scanpci()) {
commit 20169414e1afd5d1d02cb1b57866b1c158b2fc6c
Author: Tiago Vignatti <tiago.vignatti at nokia.com>
Date:   Wed Aug 5 22:44:19 2009 +0300

    xfree86: remove unused functions
    
    RAC trash.
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>

diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 3935c5c..0317882 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -232,92 +232,6 @@ xf86PciProbe(void)
     }
 }
 
-void
-initPciState(void)
-{
-    unsigned i;
-    pciAccPtr pcaccp;
-
-    if (xf86PciVideoInfo == NULL) {
-	return;
-    }
-
-    for (i = 0 ; xf86PciVideoInfo[i] != NULL ; i++) {
-	struct pci_device * const pvp = xf86PciVideoInfo[i];
-
-	if (pvp->user_data == 0) {
-	    pcaccp = xnfalloc( sizeof( pciAccRec ) );
-	    pvp->user_data = (intptr_t) pcaccp;
-
-	    pcaccp->arg.dev = pvp;
-	    pcaccp->ctrl = PCISHAREDIOCLASSES(pvp->device_class);
-
-	    pcaccp->arg.ctrl = pcaccp->save.command;
-	}
-    }
-}
-
-/*
- * initPciBusState() - fill out the BusAccRec for a PCI bus.
- * Theory: each bus is associated with one bridge connecting it
- * to its parent bus. The address of a bridge is therefore stored
- * in the BusAccRec of the bus it connects to. Each bus can
- * have several bridges connecting secondary buses to it. Only one
- * of these bridges can be open. Therefore the status of a bridge
- * associated with a bus is stored in the BusAccRec of the parent
- * the bridge connects to. The first member of the structure is
- * a pointer to a function that open access to this bus. This function
- * receives a pointer to the structure itself as argument. This
- * design should be common to BusAccRecs of any type of buses we
- * support. The remeinder of the structure is bus type specific.
- * In this case it contains a pointer to the structure of the
- * parent bus. Thus enabling access to a specific bus is simple:
- * 1. Close any bridge going to secondary buses.
- * 2. Climb down the ladder and enable any bridge on buses
- *    on the path from the CPU to this bus.
- */
- 
-void
-initPciBusState(void)
-{
-    static const struct pci_id_match bridge_match = {
-	PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
-	(PCI_CLASS_BRIDGE << 16), 0x0000ff0000, 0
-    };
-    struct pci_device *dev;
-    struct pci_device_iterator *iter;
-    BusAccPtr pbap;
-
-    iter = pci_id_match_iterator_create(& bridge_match);
-    while((dev = pci_device_next(iter)) != NULL) {
-	const uint8_t subclass = (dev->device_class >> 8) & 0x0ff;
-	int primary;
-	int secondary;
-	int subordinate;
-
-	pci_device_get_bridge_buses(dev, &primary, &secondary, &subordinate);
-
-	pbap = xnfcalloc(1,sizeof(BusAccRec));
-	pbap->busdep.pci.bus = secondary;
-	pbap->busdep.pci.primary_bus = primary;
-	pbap->busdep_type = BUS_PCI;
-	pbap->busdep.pci.dev = dev;
-
-	switch (subclass) {
-	case PCI_SUBCLASS_BRIDGE_HOST:
-	    pbap->type = BUS_PCI;
-	    break;
-	case PCI_SUBCLASS_BRIDGE_PCI:
-	case PCI_SUBCLASS_BRIDGE_CARDBUS:
-	    pbap->type = BUS_PCI;
-	    break;
-	}
-    }
-
-    pci_iterator_destroy(iter);
-
-}
-
 /*
  * If the slot requested is already in use, return -1.
  * Otherwise, claim the slot for the screen requesting it.
diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
index 97d554b..492feef 100644
--- a/hw/xfree86/common/xf86pciBus.h
+++ b/hw/xfree86/common/xf86pciBus.h
@@ -56,7 +56,5 @@ typedef union {
 } pciBridgesSave, *pciBridgesSavePtr;
 
 void xf86PciProbe(void);
-void initPciState(void);
-void initPciBusState(void);
 
 #endif /* _XF86_PCI_BUS_H */


More information about the xorg-commit mailing list