rpms/xorg-x11-drv-glint/devel glint-pciaccess.patch, NONE, 1.1 xorg-x11-drv-glint.spec, 1.18, 1.19

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Tue Mar 11 00:30:57 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-glint/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7375

Modified Files:
	xorg-x11-drv-glint.spec 
Added Files:
	glint-pciaccess.patch 
Log Message:
* Tue Mar 11 2008 Dave Airlie <airlied at gmail.com> 1.1.1-9
- pciaccess conversion


glint-pciaccess.patch:

--- NEW FILE glint-pciaccess.patch ---
diff --git a/configure.ac b/configure.ac
index e672296..2f9eeec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,12 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_M
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+              [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
+              [#include "xorg-server.h"])
+CPPFLAGS="$SAVE_CPPFLAGS"
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -96,6 +102,13 @@ if test "$DRI" = yes; then
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
 fi
 
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
+fi
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+
 AC_SUBST([DRI_CFLAGS])
 AC_SUBST([XORG_CFLAGS])
 AC_SUBST([moduledir])
diff --git a/src/glint.h b/src/glint.h
index 1cf7f45..54f9d18 100644
--- a/src/glint.h
+++ b/src/glint.h
@@ -30,13 +30,19 @@
 #ifndef _GLINT_H_
 #define _GLINT_H_
 
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include "glintpcirename.h"
+
 #include "xaa.h"
 #include "xf86RamDac.h"
 #include "xf86cmap.h"
 #include "xf86i2c.h"
 #include "xf86DDC.h"
 #include "xf86xv.h"
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
 #include "xf86drm.h"
 #include "sarea.h"
 #define _XF86DRI_SERVER_
@@ -44,18 +50,15 @@
 #include "GL/glxint.h"
 #include "glint_dripriv.h"
 #endif
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
 
 #define GLINT_MAX_MULTI_DEVICES 2
 
 #define GLINT_VERSION 4000
 #define GLINT_NAME "GLINT"
 #define GLINT_DRIVER_NAME "glint"
-#define GLINT_MAJOR_VERSION 1
-#define GLINT_MINOR_VERSION 1
-#define GLINT_PATCHLEVEL 1
+#define GLINT_MAJOR_VERSION PACKAGE_VERSION_MAJOR
+#define GLINT_MINOR_VERSION PACKAGE_VERSION_MINOR
+#define GLINT_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
 
 typedef struct {
 	CARD32 glintRegs[0x2000];
@@ -77,7 +80,9 @@ typedef struct {
     int			numMultiDevices;
     int			MultiChip;
     Bool		MultiAperture;
+#ifndef XSERVER_LIBPCIACCESS
     PCITAG		PciTag;
+#endif
     EntityInfoPtr	pEnt;
     GLINTEntPtr		entityPrivate;	
     RamDacHelperRecPtr	RamDac;
@@ -169,7 +174,7 @@ typedef struct {
     void		(*VideoTimerCallback)(ScrnInfoPtr, Time);
     XF86VideoAdaptorPtr adaptor;
     int                 videoKey;
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
     Bool		directRenderingEnabled;
     Bool		PCIMode;
     DRIInfoPtr		pDRIInfo;
diff --git a/src/glint_dri.c b/src/glint_dri.c
index fae1c80..b244b73 100644
--- a/src/glint_dri.c
+++ b/src/glint_dri.c
@@ -489,16 +489,18 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
     if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
 	pDRIInfo->busIdString = DRICreatePCIBusID(pGlint->PciInfo);
     } else {
+#ifndef XSERVER_LIBPCIACCESS
 	pDRIInfo->busIdString = xalloc(64); /* Freed in DRIDestroyInfoRec */
 	sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
 		((pciConfigPtr)pGlint->PciInfo->thisCard)->busnum,
 		((pciConfigPtr)pGlint->PciInfo->thisCard)->devnum,
 		((pciConfigPtr)pGlint->PciInfo->thisCard)->funcnum);
+#endif
     }
     pDRIInfo->ddxDriverMajorVersion = GLINT_MAJOR_VERSION;
     pDRIInfo->ddxDriverMinorVersion = GLINT_MINOR_VERSION;
     pDRIInfo->ddxDriverPatchVersion = GLINT_PATCHLEVEL;
-    pDRIInfo->frameBufferPhysicalAddress = pGlint->FbAddress;
+    pDRIInfo->frameBufferPhysicalAddress = (pointer) pGlint->FbAddress;
     pDRIInfo->frameBufferSize = pGlint->FbMapSize;
     pDRIInfo->frameBufferStride = 
 	    pScrn->displayWidth * (pScrn->bitsPerPixel >> 3);
@@ -775,12 +777,9 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
 
     if (pGlint->irq <= 0) {
 	pGlint->irq = drmGetInterruptFromBusID(pGlint->drmSubFD,
-					       ((pciConfigPtr)pGlint->PciInfo
-						->thisCard)->busnum,
-					       ((pciConfigPtr)pGlint->PciInfo
-						->thisCard)->devnum,
-					       ((pciConfigPtr)pGlint->PciInfo
-						->thisCard)->funcnum);
+					       PCI_CFG_BUS(pGlint->PciInfo),
+					       PCI_CFG_DEV(pGlint->PciInfo),
+					       PCI_CFG_FUNC(pGlint->PciInfo));
     }
     
     return TRUE;
diff --git a/src/glint_driver.c b/src/glint_driver.c
index a1e2b3c..8f2bb76 100644
--- a/src/glint_driver.c
+++ b/src/glint_driver.c
@@ -344,7 +344,7 @@ const char *GLINTint10Symbols[] = {
 
 #ifdef XFree86LOADER
 
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
 static const char *drmSymbols[] = {
     "drmAddBufs",
     "drmAddMap",
@@ -414,7 +414,7 @@ glintSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 			  xaaSymbols, xf8_32bppSymbols,
 			  shadowSymbols, fbdevHWSymbols, GLINTint10Symbols,
 			  vbeSymbols, ramdacSymbols,
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
 			  drmSymbols, driSymbols,
 #endif
 			  NULL);
@@ -651,10 +651,12 @@ GLINTProbe(DriverPtr drv, int flags)
   					  &devSections)) <= 0) {
   	return FALSE;
     }
-  
+
+#ifndef XSERVER_LIBPCIACCESS
     checkusedPci = xf86GetPciVideoInfo();
      
-    if (checkusedPci == NULL && devSections /* for xf86DoProbe */) {
+    if (checkusedPci == NULL && devSections /* for xf86DoProbe */) 
+      {
   	/*
  	 * Changed the behaviour to try probing using the FBDev support
  	 * when no PCI cards have been found. This is for systems without
@@ -721,8 +723,9 @@ GLINTProbe(DriverPtr drv, int flags)
 	
     	xfree(devSections);
 	
-    } else  if (checkusedPci) {
-	
+    } else  if (checkusedPci) 
+#endif
+{
 	if (flags & PROBE_DETECT) {
 	   /* HACK, Currently when -configuring, we only return VGA
 	    * based chips. Manual configuring is necessary to poke
@@ -745,8 +748,8 @@ GLINTProbe(DriverPtr drv, int flags)
 	if (!(flags & PROBE_DETECT))
 	    for (i = 0; i < numUsed; i++) {
 		ScrnInfoPtr pScrn = NULL;
-		GLINTEntPtr pGlintEnt = NULL;					
-		DevUnion *pPriv;						
+		GLINTEntPtr pGlintEnt = NULL;
+		DevUnion *pPriv;
 	
 		pPci = xf86GetPciInfoForEntity(usedChips[i]);
 		/* Allocate a ScrnInfoRec and claim the slot */
@@ -756,14 +759,16 @@ GLINTProbe(DriverPtr drv, int flags)
 
 
 		/* Claim specifics, when we KNOW ! the board */
-
+#ifndef XSERVER_LIBPCIACCESS
 		/* Appian Jeronimo J2000 */
-		if ((pPci->subsysVendor == 0x1097) && 
-	    	    (pPci->subsysCard   == 0x3d32)) {
+		if ((PCI_SUB_VENDOR_ID(pPci) == 0x1097) && 
+	    	    (PCI_SUB_DEVICE_ID(pPci)   == 0x3d32)) {
 			int eIndex;
+			int init_func;
+
 			if (!xf86IsEntityShared(usedChips[i])) {
 		    	eIndex = xf86ClaimPciSlot(pPci->bus, 
-						  pPci->device, 
+						  pPci->device,
 						  1,
 						  drv, -1 /* XXX */,
 						  NULL, FALSE);
@@ -778,15 +783,15 @@ GLINTProbe(DriverPtr drv, int flags)
 			}
 		} else
     		/* Only claim other chips when GAMMA is used */	
-    		if ((pPci->chipType == PCI_CHIP_GAMMA) ||
-		    (pPci->chipType == PCI_CHIP_GAMMA2) ||
-		    (pPci->chipType == PCI_CHIP_DELTA)) {
+    		if ((PCI_DEV_DEVICE_ID(pPci) ==  PCI_CHIP_GAMMA) ||
+		    (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GAMMA2) ||
+		    (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_DELTA)) {
 		    while (*checkusedPci != NULL) {
 	    	    	int eIndex;
 	    	    	/* make sure we claim all but our source device */
-	    	    	if ((pPci->bus ==    (*checkusedPci)->bus && 		
-	         	     pPci->device == (*checkusedPci)->device) &&
-	         	     pPci->func !=   (*checkusedPci)->func) {
+	    	    	if ((pPci->bus ==    PCI_DEV_BUS(*checkusedPci) &&
+	         	     pPci->device == PCI_DEV_DEV((*checkusedPci)) &&
+	         	     pPci->func !=   PCI_DEV_FUNC(*checkusedPci))) {
 		 							   
 		    	/* Claim other entities on the same card */	
 		    	eIndex = xf86ClaimPciSlot((*checkusedPci)->bus, 
@@ -799,9 +804,9 @@ GLINTProbe(DriverPtr drv, int flags)
 		    	    xf86AddEntityToScreen(pScrn,eIndex);		
 		    	} else {						
 		    	    ErrorF("BusID %d:%d:%d already claimed\n",		
-					(*checkusedPci)->bus,		
-					(*checkusedPci)->device,	
-					(*checkusedPci)->func);		
+				   PCI_DEV_BUS(*checkusedPci),
+				   PCI_DEV_DEV(*checkusedPci),
+				   PCI_DEV_FUNC(*checkusedPci));	
     		    	    xfree(usedChips);					
 		    	    return FALSE;					
 		        }	
@@ -809,6 +814,7 @@ GLINTProbe(DriverPtr drv, int flags)
 	                checkusedPci++;						
 	            }
 		}
+#endif
 
 		/* Fill in what we can of the ScrnInfoRec */
 		pScrn->driverVersion	= GLINT_VERSION;
@@ -825,8 +831,8 @@ GLINTProbe(DriverPtr drv, int flags)
 		/* Allow sharing if Appian J2000 detected */			
 		/* (later Diamond FireGL3000 support too) */
 
-		if ((pPci->subsysVendor == 0x1097) && 
-	    	    (pPci->subsysCard   == 0x3d32)) {
+		if ((PCI_SUB_VENDOR_ID(pPci) == 0x1097) && 
+	    	    (PCI_SUB_DEVICE_ID(pPci) == 0x3d32)) {
 	    	    xf86SetEntitySharable(usedChips[i]);
 	    	    /* Allocate an entity private if necessary */		
 	    	    if (GLINTEntityIndex < 0)					
@@ -1031,8 +1037,10 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
     if (pGlint->pEnt->location.type == BUS_PCI)
     {
         pGlint->PciInfo = xf86GetPciInfoForEntity(pGlint->pEnt->index);
+#ifndef XSERVER_LIBPCIACCESS
         pGlint->PciTag = pciTag(pGlint->PciInfo->bus, pGlint->PciInfo->device,
 			    pGlint->PciInfo->func);
+#endif
     }
 
     pGlint->InFifoSpace = 0;	/* Force a Read of FIFO space on first run */
@@ -1046,14 +1054,14 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	for (i = 1; i < pScrn->numEntities; i++) {
 	    pEnt = xf86GetEntityInfo(pScrn->entityList[i]);
 	    pPci = xf86GetPciInfoForEntity(pEnt->index);
-	    if ( (pPci->chipType == PCI_CHIP_MX) ||
-		 (pPci->chipType == PCI_CHIP_PERMEDIA) ||
-		 (pPci->chipType == PCI_CHIP_TI_PERMEDIA) ||
-		 (pPci->chipType == PCI_CHIP_500TX) ||
-		 (pPci->chipType == PCI_CHIP_300SX) ||
-		 (pPci->chipType == PCI_CHIP_R4) ||
-		 (pPci->chipType == PCI_CHIP_PERMEDIA3) ) {
-		pGlint->MultiChip = pPci->chipType;
+	    if ( (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_MX) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_PERMEDIA) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_TI_PERMEDIA) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_500TX) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_300SX) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_R4) ||
+		 (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_PERMEDIA3) ) {
+		pGlint->MultiChip = PCI_DEV_DEVICE_ID(pPci);
 		if (pGlint->numMultiDevices >= GLINT_MAX_MULTI_DEVICES) {
 		    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			"%d multiple chips unsupported, aborting. (Max - 2)\n",
@@ -1071,9 +1079,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
 	pciVideoPtr pPci = xf86GetPciInfoForEntity(pEnt->index);
 
-        if ( ((pPci->chipType == PCI_CHIP_GAMMA) ||
-	      (pPci->chipType == PCI_CHIP_GAMMA2) ||
-	      (pPci->chipType == PCI_CHIP_DELTA)) && 
+        if ( ((PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GAMMA) ||
+	      (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GAMMA2) ||
+	      (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_DELTA)) && 
              (pGlint->numMultiDevices == 0) ) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 			"Gamma/Delta with ZERO connected chips, aborting\n");
@@ -1085,9 +1093,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
 	pciVideoPtr pPci = xf86GetPciInfoForEntity(pEnt->index);
 
-        if ((pPci->chipType != PCI_CHIP_GAMMA) &&
-	    (pPci->chipType != PCI_CHIP_GAMMA2) &&
-	    (pPci->chipType != PCI_CHIP_DELTA)) {
+        if ((PCI_DEV_DEVICE_ID(pPci) != PCI_CHIP_GAMMA) &&
+	    (PCI_DEV_DEVICE_ID(pPci) != PCI_CHIP_GAMMA2) &&
+	    (PCI_DEV_DEVICE_ID(pPci) != PCI_CHIP_DELTA)) {
 	    GLINTProbeDDC(pScrn, pGlint->pEnt->index);
 	    return TRUE;
 	} else 
@@ -1314,8 +1322,8 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 		   pGlint->Chipset);
     } else {
 	from = X_PROBED;
-	pGlint->Chipset = pGlint->PciInfo->vendor << 16 | 
-			  pGlint->PciInfo->chipType;
+	pGlint->Chipset = PCI_DEV_VENDOR_ID(pGlint->PciInfo) << 16 | 
+ 	                  PCI_DEV_DEVICE_ID(pGlint->PciInfo);
 	pScrn->chipset = (char *)xf86TokenToString(GLINTChipsets,
 						   pGlint->Chipset);
     }
@@ -1324,7 +1332,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
 		   pGlint->ChipRev);
     } else {
-	pGlint->ChipRev = pGlint->PciInfo->chipRev;
+        pGlint->ChipRev = PCI_DEV_REVISION(pGlint->PciInfo);
     }
     }
 
@@ -1370,7 +1378,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	pGlint->FbAddress = pGlint->pEnt->device->MemBase;
 	from = X_CONFIG;
     } else {
-	pGlint->FbAddress = pGlint->PciInfo->memBase[2] & 0xFF800000;
+        pGlint->FbAddress = PCI_REGION_BASE(pGlint->PciInfo, 2, REGION_MEM) & 0xFF800000;
     }
 
     if (pGlint->FbAddress)
@@ -1380,11 +1388,11 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
     /* Trap GAMMA & DELTA specification, with no linear address */
     /* Find the first GLINT chip and use that address */
     if (pGlint->FbAddress == 0) {
-	if (pGlint->MultiPciInfo[0]->memBase[2]) {
-	    pGlint->FbAddress = pGlint->MultiPciInfo[0]->memBase[2];
+        if (PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM)) {
+	    pGlint->FbAddress = PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM);
 	    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, 
 		"FrameBuffer used from first rasterizer chip at 0x%lx\n", 
-				pGlint->MultiPciInfo[0]->memBase[2]);
+				PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM));
 	} else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_PROBED, 	
 			"No FrameBuffer memory - aborting\n");
@@ -1400,7 +1408,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	pGlint->IOAddress = pGlint->pEnt->device->IOBase;
 	from = X_CONFIG;
     } else {
-	pGlint->IOAddress = pGlint->PciInfo->memBase[0] & 0xFFFFC000;
+	pGlint->IOAddress = PCI_REGION_BASE(pGlint->MultiPciInfo[0], 0, REGION_MEM) & 0xFFFFC000;
     }
 
     if ((IS_J2000) && (pGlint->Chipset == PCI_VENDOR_3DLABS_CHIP_GAMMA)) {
@@ -1484,12 +1492,9 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 		/* Delta has a bug, we need to fix it here */
 		{
 		    int basecopro = 
-			pGlint->MultiPciInfo[0]->memBase[0] & 0xFFFFC000;
-		    int basedelta = pGlint->PciInfo->memBase[0] & 0xFFFFC000;
-		    int glintdelta = pGlint->PciTag;
-        	    int glintcopro = pciTag(pGlint->MultiPciInfo[0]->bus, 
-						pGlint->MultiPciInfo[0]->device,
-			    			pGlint->MultiPciInfo[0]->func);
+			PCI_REGION_BASE(pGlint->MultiPciInfo[0], 0, REGION_MEM) & 0xFFFFC000;
+		    int basedelta = PCI_REGION_BASE(pGlint->PciInfo, 0, REGION_MEM)  & 0xFFFFC000;
+		    int dummy;
 		    int base3copro, offset;
 
     		    if( (basedelta & 0x20000) ^ (basecopro & 0x20000) ) {
@@ -1499,7 +1504,7 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
          		} else {
  			    offset = 0x1c; /* base3 */
  			}
-			base3copro = pciReadLong(glintcopro, offset);
+			PCI_READ_LONG(pGlint->MultiPciInfo[0], &base3copro, offset);
 			if( (basecopro & 0x20000) ^ (base3copro & 0x20000) ) {
 	    			/*
 	     		 	 * oops, still different; we know that base3 
@@ -1515,25 +1520,27 @@ GLINTPreInit(ScrnInfoPtr pScrn, int flags)
 	 		 * read value
 	 		 * write new value
 	 		 */
-			(void) pciReadLong(glintdelta, 0x10);
-			pciWriteLong(glintdelta, 0x10, 0xffffffff);
-			(void) pciReadLong(glintdelta, 0x10);
-			pciWriteLong(glintdelta, 0x10, base3copro);
+			PCI_READ_LONG(pGlint->PciInfo, &dummy, 0x10);
+			PCI_WRITE_LONG(pGlint->PciInfo, 0xffffffff, 0x10);
+			PCI_READ_LONG(pGlint->PciInfo, &dummy, 0x10);
+			PCI_WRITE_LONG(pGlint->PciInfo, base3copro, 0x10);
 
 			/*
 	 		 * additionally,sometimes we see the baserom which might
 	 		 * confuse the chip, so let's make sure that is disabled
 	 		 */
-			(void) pciReadLong(glintcopro, 0x30);
-			pciWriteLong(glintcopro, 0x30, 0xffffffff);
-			(void) pciReadLong(glintcopro, 0x30);
-			pciWriteLong(glintcopro, 0x30, 0);
+			PCI_READ_LONG(pGlint->MultiPciInfo[0], &dummy, 0x30);
+			PCI_WRITE_LONG(pGlint->MultiPciInfo[0], 0xffffffff, 0x30);
+			PCI_READ_LONG(pGlint->MultiPciInfo[0], &dummy, 0x30);
+			PCI_WRITE_LONG(pGlint->MultiPciInfo[0], 0, 0x30);
 
 			/*
 	 		 * now update our internal structure accordingly
 	 		 */
-			pGlint->IOAddress = 
-			pGlint->PciInfo->memBase[0] = base3copro;
+			pGlint->IOAddress = base3copro;
+#ifndef XSERVER_LIBPCIACCESS
+			pGlint->memBase[0] = base3copro;
+#endif
     			xf86DrvMsg(pScrn->scrnIndex, from, 
 			       "Delta Bug - Changing MMIO registers to 0x%lX\n",
 	       		       (unsigned long)pGlint->IOAddress);
@@ -2458,17 +2465,47 @@ GLINTMapMem(ScrnInfoPtr pScrn)
      * Map IO registers to virtual address space
      * We always map VGA IO registers - even if we don't need them
      */ 
+#ifndef XSERVER_LIBPCIACCESS
     pGlint->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT, 
 	       pGlint->PciTag, pGlint->IOAddress, 0x20000);
+#else
+    {
+      void** result = (void**)&pGlint->IOBase;
+      int err = pci_device_map_range(pGlint->PciInfo,
+				     pGlint->IOAddress,
+				     0x20000,
+				     PCI_DEV_MAP_FLAG_WRITABLE,
+				     result);
+      
+      if (err) 
+	return FALSE;
+    }
+#endif
 
     if (pGlint->IOBase == NULL)
 	return FALSE;
 
     if (pGlint->FbMapSize != 0) {
+#ifndef XSERVER_LIBPCIACCESS
     	pGlint->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
 				 pGlint->PciTag,
 				 pGlint->FbAddress,
 				 pGlint->FbMapSize);
+#else
+	{
+	  void** result = (void**)&pGlint->FbBase;
+	  int err = pci_device_map_range(pGlint->PciInfo,
+					 pGlint->FbAddress,
+					 pGlint->FbMapSize,
+					 PCI_DEV_MAP_FLAG_WRITABLE |
+					 PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+					 result);
+	  
+	  if (err) 
+	    return FALSE;
+	}
+
+#endif
         if (pGlint->FbBase == NULL)
 	    return FALSE;
     }
@@ -2503,11 +2540,20 @@ GLINTUnmapMem(ScrnInfoPtr pScrn)
     /*
      * Unmap IO registers to virtual address space
      */ 
+#ifndef XSERVER_LIBPCIACCESS
     xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pGlint->IOBase, 0x20000);
+#else
+    pci_device_unmap_range(pGlint->PciInfo, pGlint->IOBase, 0x20000);
+#endif
     pGlint->IOBase = NULL;
 
-    if (pGlint->FbBase != NULL)
+    if (pGlint->FbBase != NULL) {
+#ifndef XSERVER_LIBPCIACCESS
     	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pGlint->FbBase, pGlint->FbMapSize);
+#else
+	pci_device_unmap_range(pGlint->PciInfo, pGlint->FbBase, pGlint->FbMapSize);
+#endif
+    }
     pGlint->FbBase = NULL;
 
     TRACE_EXIT("GLINTUnmapMem");
@@ -2924,7 +2970,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	    return FALSE;
     }
 
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
     /*
      * Setup DRI after visuals have been established, but before fbScreenInit
      * is called. fbScreenInit will eventually call into the drivers
@@ -3153,7 +3199,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
     xf86DPMSInit(pScreen, (DPMSSetProcPtr)GLINTDisplayPowerManagementSet, 0);
 
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
     if (pGlint->directRenderingEnabled) {
 	/* Now that mi, cfb, drm and others have done their thing, 
          * complete the DRI setup.
@@ -3462,7 +3508,7 @@ GLINTCloseScreen(int scrnIndex, ScreenPtr pScreen)
     GLINTPtr pGlint = GLINTPTR(pScrn);
 
     TRACE_ENTER("GLINTCloseScreen");
-#ifdef XF86DRI
+#ifdef XF86DRI_DEVEL
     if (pGlint->directRenderingEnabled) {
 	GLINTDRICloseScreen(pScreen);
     }
diff --git a/src/glint_regs.h b/src/glint_regs.h
index 122832d..426e9ae 100644
--- a/src/glint_regs.h
+++ b/src/glint_regs.h
@@ -34,46 +34,46 @@
 #define PCI_CHIP_3DLABS_GAMMA2					0x0E
 
 /* The boards we know */
-#define IS_GLORIAXXL	((pGlint->PciInfo->subsysVendor == 0x1048) && \
-			 (pGlint->PciInfo->subsysCard   == 0x0a42))
+#define IS_GLORIAXXL	((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x1048) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x0a42))
 
-#define IS_GLORIASYNERGY ((pGlint->PciInfo->subsysVendor == 0x1048) && \
-			 (pGlint->PciInfo->subsysCard   == 0x0a32))
+#define IS_GLORIASYNERGY ((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x1048) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x0a32))
 
-#define IS_GMX2000	((pGlint->PciInfo->subsysVendor == 0x3d3d) && \
-			 (pGlint->PciInfo->subsysCard   == 0x0106))
+#define IS_GMX2000	((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x3d3d) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x0106))
 
-#define IS_J2000	((pGlint->PciInfo->subsysVendor == 0x1097) && \
-			 (pGlint->PciInfo->subsysCard   == 0x3d32))
+#define IS_J2000	((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x1097) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x3d32))
 
-#define IS_JPRO		((pGlint->PciInfo->subsysVendor == 0x1097) && \
-			 (pGlint->PciInfo->subsysCard   == 0x3db3))
+#define IS_JPRO		((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x1097) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x3db3))
 
 /* COMPAQ OEM VX1 PCI
  *   subsys == 0x0121 if VGA is enabled
  *   subsys == 0x000a if VGA has never been enabled
  */
-#define IS_PCI_QVX1	(pGlint->PciInfo->subsysVendor == 0x3d3d &&  \
-                         ((pGlint->PciInfo->subsysCard == 0x0121) ||  \
-			  (pGlint->PciInfo->subsysCard == 0x000a)))
+#define IS_PCI_QVX1	(PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x3d3d &&  \
+                         ((PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x0121) ||  \
+			  (PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x000a)))
 
 /* COMPAQ OEM VX1 AGP
  *   subsys == 0x0144 if VGA is enabled
  *   subsys == 0x000c if VGA has never been enabled
  */
-#define IS_AGP_QVX1	(pGlint->PciInfo->subsysVendor == 0x3d3d &&  \
-			 ((pGlint->PciInfo->subsysCard == 0x0144) ||  \
-			  (pGlint->PciInfo->subsysCard == 0x000c)))
+#define IS_AGP_QVX1	(PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x3d3d &&  \
+			 ((PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x0144) ||  \
+			  (PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x000c)))
 
 #define IS_QVX1		(IS_PCI_QVX1 || IS_AGP_QVX1)
 
-#define IS_ELSA_SYNERGY	((pGlint->PciInfo->subsysVendor == 0x1048) && \
-			 (pGlint->PciInfo->subsysCard   == 0x0a32))
+#define IS_ELSA_SYNERGY	((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x1048) && \
+			 (PCI_SUB_DEVICE_ID(pGlint->PciInfo)   == 0x0a32))
 
 /* COMPAQ OEM Permedia 2V with VGA disable jumper - 0x13e9 ? */
-#define IS_QPM2V	((pGlint->PciInfo->subsysVendor == 0x13e9) && \
-			 ((pGlint->PciInfo->subsysCard == 0x0100) ||  \
-			  (pGlint->PciInfo->subsysCard == 0x0002)))
+#define IS_QPM2V	((PCI_SUB_VENDOR_ID(pGlint->PciInfo) == 0x13e9) && \
+			 ((PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x0100) ||  \
+			  (PCI_SUB_DEVICE_ID(pGlint->PciInfo) == 0x0002)))
 
 /**********************************************
 *  GLINT 500TX Configuration Region Registers *
@@ -1282,7 +1282,7 @@ do{								\
 	}							\
 }
 
-#ifndef XF86DRI
+#ifndef XF86DRI_DEVEL
 #define LOADROP(rop)						\
 {								\
 	if (pGlint->ROP != rop)	{				\
@@ -1307,7 +1307,7 @@ do{								\
 	}							\
 }
 
-#ifndef XF86DRI
+#ifndef XF86DRI_DEVEL
 #define DO_PLANEMASK(planemask)					\
 { 								\
 	if (planemask != pGlint->planemask) {			\
diff --git a/src/glintpcirename.h b/src/glintpcirename.h
new file mode 100644
index 0000000..c4beac6
--- /dev/null
+++ b/src/glintpcirename.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2007 George Sapountzis
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+/**
+ * Macros for porting drivers from legacy xfree86 PCI code to the pciaccess
+ * library. The main purpose being to facilitate source code compatibility.
+ */
+
+#ifndef SISPCIRENAME_H
+#define SISPCIRENAME_H
+
+enum region_type {
+    REGION_MEM,
+    REGION_IO 
+};
+
+#ifndef XSERVER_LIBPCIACCESS
+
+/* pciVideoPtr */
+#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor)
+#define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->chipType)
+#define PCI_DEV_REVISION(_pcidev)  ((_pcidev)->chipRev)
+
+#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subsysVendor)
+#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subsysCard)
+
+#define PCI_DEV_TAG(_pcidev) pciTag((_pcidev)->bus,    \
+                                    (_pcidev)->device, \
+                                    (_pcidev)->func)
+#define PCI_DEV_BUS(_pcidev)       ((_pcidev)->bus)
+#define PCI_DEV_DEV(_pcidev)       ((_pcidev)->device)
+#define PCI_DEV_FUNC(_pcidev)      ((_pcidev)->func)
+
+/* pciConfigPtr */
+#define PCI_CFG_TAG(_pcidev)  (((pciConfigPtr)(_pcidev)->thisCard)->tag)
+#define PCI_CFG_BUS(_pcidev)  (((pciConfigPtr)(_pcidev)->thisCard)->busnum)
+#define PCI_CFG_DEV(_pcidev)  (((pciConfigPtr)(_pcidev)->thisCard)->devnum)
+#define PCI_CFG_FUNC(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->funcnum)
+
+/* region addr: xfree86 uses different fields for memory regions and I/O ports */
+#define PCI_REGION_BASE(_pcidev, _b, _type)             \
+    (((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] \
+                             : (_pcidev)->ioBase[(_b)])
+
+/* region size: xfree86 uses the log2 of the region size,
+ * but with zero meaning no region, not size of one XXX */
+#define PCI_REGION_SIZE(_pcidev, _b) \
+    (((_pcidev)->size[(_b)] > 0) ? (1 << (_pcidev)->size[(_b)]) : 0)
+
+/* read/write PCI configuration space */
+#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \
+    *(_value_ptr) = pciReadByte(PCI_CFG_TAG(_pcidev), (_offset))
+
+#define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \
+    *(_value_ptr) = pciReadLong(PCI_CFG_TAG(_pcidev), (_offset))
+
+#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
+    pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value))
+
+#else /* XSERVER_LIBPCIACCESS */
+
+typedef struct pci_device *pciVideoPtr;
+
+#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor_id)
+#define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->device_id)
+#define PCI_DEV_REVISION(_pcidev)  ((_pcidev)->revision)
+
+#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subvendor_id)
+#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subdevice_id)
+
+/* pci-rework functions take a 'pci_device' parameter instead of a tag */
+#define PCI_DEV_TAG(_pcidev)        (_pcidev)
+
+/* PCI_DEV macros, typically used in printf's, add domain ? XXX */
+#define PCI_DEV_BUS(_pcidev)       ((_pcidev)->bus)
+#define PCI_DEV_DEV(_pcidev)       ((_pcidev)->dev)
+#define PCI_DEV_FUNC(_pcidev)      ((_pcidev)->func)
+
+/* pci-rework functions take a 'pci_device' parameter instead of a tag */
+#define PCI_CFG_TAG(_pcidev)        (_pcidev)
+
+/* PCI_CFG macros, typically used in DRI init, contain the domain */
+#define PCI_CFG_BUS(_pcidev)      (((_pcidev)->domain << 8) | \
+                                    (_pcidev)->bus)
+#define PCI_CFG_DEV(_pcidev)       ((_pcidev)->dev)
+#define PCI_CFG_FUNC(_pcidev)      ((_pcidev)->func)
+
+#define PCI_REGION_BASE(_pcidev, _b, _type) ((_pcidev)->regions[(_b)].base_addr)
+#define PCI_REGION_SIZE(_pcidev, _b)        ((_pcidev)->regions[(_b)].size)
+
+#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \
+    pci_device_cfg_read_u8((_pcidev), (_value_ptr), (_offset))
+
+#define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \
+    pci_device_cfg_read_u32((_pcidev), (_value_ptr), (_offset))
+
+#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
+    pci_device_cfg_write_u32((_pcidev), (_value), (_offset))
+
+#endif /* XSERVER_LIBPCIACCESS */
+
+#endif /* SISPCIRENAME_H */
diff --git a/src/pm2_video.c b/src/pm2_video.c
index e64d991..46d5d74 100644
--- a/src/pm2_video.c
+++ b/src/pm2_video.c
@@ -41,6 +41,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
 
 #undef MIN
 #undef ABS
@@ -2767,9 +2769,9 @@ NewAdaptorPriv(ScrnInfoPtr pScrn, Bool VideoIO)
 	    xvipc.pAPriv = pAPriv;		/* Server head ID */
 	    xvipc.op = OP_CONNECT;
 
-	    xvipc.a = pGlint->PciInfo->bus;
-	    xvipc.b = pGlint->PciInfo->device;
-	    xvipc.c = pGlint->PciInfo->func;
+	    xvipc.a = PCI_DEV_BUS(pGlint->PciInfo);
+	    xvipc.b = PCI_DEV_DEV(pGlint->PciInfo);
+	    xvipc.c = PCI_DEV_FUNC(pGlint->PciInfo);
 
 	    xvipc.d = pScrn->videoRam << 10;	/* XF86Config overrides probing */
 
@@ -3004,8 +3006,10 @@ Permedia2VideoInit(ScreenPtr pScreen)
 	    break;
     }
 
-    if (VideoIO)
-	switch (pciReadLong(pGlint->PciTag, PCI_SUBSYSTEM_ID_REG)) {
+    if (VideoIO) {
+      unsigned int temp;
+      PCI_READ_LONG(pGlint->PciInfo, &temp, PCI_SUBSYSTEM_ID_REG);
+      switch (temp) {
 	case PCI_SUBSYSTEM_ID_WINNER_2000_P2A:
 	case PCI_SUBSYSTEM_ID_WINNER_2000_P2C:
 	case PCI_SUBSYSTEM_ID_GLORIA_SYNERGY_P2A:
@@ -3016,7 +3020,7 @@ Permedia2VideoInit(ScreenPtr pScreen)
 	    xf86DrvMsgVerb(pScrn->scrnIndex, X_PROBED, 1, "No Xv vio support for this board\n");
 	    VideoIO = FALSE;
 	}
-
+    }
     if (pGlint->NoAccel && !VideoIO)
 	return;
 
diff --git a/src/pm3_accel.c b/src/pm3_accel.c
index e027c94..ed64669 100644
--- a/src/pm3_accel.c
+++ b/src/pm3_accel.c
@@ -67,7 +67,7 @@
 #define PM3_OTHERWRITEMASK \
   (pGlint->PM3_UsingSGRAM ? PM3FBSoftwareWriteMask : PM3FBHardwareWriteMask )
 
-#ifndef XF86DRI
+#ifndef XF86DRI_DEVEL
 #define PM3_PLANEMASK(planemask)				\
 { 								\
 	if (planemask != pGlint->planemask) {			\
diff --git a/src/pm3_dac.c b/src/pm3_dac.c
index c390c4d..e11d190 100644
--- a/src/pm3_dac.c
+++ b/src/pm3_dac.c
@@ -65,10 +65,24 @@ Permedia3MemorySizeDetect(ScrnInfoPtr pScrn)
      * regardless of memory configuration */
     pGlint->FbMapSize = 64*1024*1024;
 
+#ifndef XSERVER_LIBPCIACCESS    
     /* Mark as VIDMEM_MMIO to avoid write-combining while detecting memory */
     pGlint->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
 			pGlint->PciTag, pGlint->FbAddress, pGlint->FbMapSize);
+#else
+    {
+      void** result = (void**)&pGlint->FbBase;
+      int err = pci_device_map_range(pGlint->PciInfo,
+				     pGlint->FbAddress,
+				     pGlint->FbMapSize,
+				     PCI_DEV_MAP_FLAG_WRITABLE,
+				     result);
+      
+      if (err) 
+	return FALSE;
+    }
 
+#endif
     if (pGlint->FbBase == NULL) 
 	return 0;
 
@@ -119,8 +133,12 @@ Permedia3MemorySizeDetect(ScrnInfoPtr pScrn)
 
     GLINT_SLOW_WRITE_REG(temp, PM3MemBypassWriteMask);
 
+#ifndef XSERVER_LIBPCIACCESS
     xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pGlint->FbBase, 
 							pGlint->FbMapSize);
+#else
+    pci_device_unmap_range(pGlint->PciInfo, pGlint->FbBase, pGlint->FbMapSize);
+#endif
 
     pGlint->FbBase = NULL;
     pGlint->FbMapSize = 0;
@@ -466,10 +484,8 @@ Permedia3Init(ScrnInfoPtr pScrn, DisplayModePtr mode, GLINTRegPtr pReg)
 
     if (pGlint->MultiAperture) {
 	STOREREG(GMultGLINTAperture, pGlint->realWidth);
-	STOREREG(GMultGLINT1, 
-			pGlint->MultiPciInfo[0]->memBase[2] & 0xFF800000);
-	STOREREG(GMultGLINT2,
-			pGlint->MultiPciInfo[1]->memBase[2] & 0xFF800000);
+	STOREREG(GMultGLINT1, PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM) & 0xFF800000);
+	STOREREG(GMultGLINT2, PCI_REGION_BASE(pGlint->MultiPciInfo[1], 2, REGION_MEM) & 0xFF800000);
     }
 
     STOREREG(PM3MemBypassWriteMask, 	0xffffffff);
diff --git a/src/tx_accel.c b/src/tx_accel.c
index 98dd624..14a689d 100644
--- a/src/tx_accel.c
+++ b/src/tx_accel.c
@@ -296,7 +296,7 @@ static void TXLoadCoord(
 ){
     GLINTPtr pGlint = GLINTPTR(pScrn);
     
-#ifndef XF86DRI
+#ifndef XF86DRI_DEVEL
     if (w != pGlint->startxsub) {
     	GLINT_WRITE_REG(w<<16, StartXSub);
 	pGlint->startxsub = w;
diff --git a/src/tx_dac.c b/src/tx_dac.c
index 3ec4888..0ad4ef1 100644
--- a/src/tx_dac.c
+++ b/src/tx_dac.c
@@ -69,10 +69,8 @@ TXInit(ScrnInfoPtr pScrn, DisplayModePtr mode, GLINTRegPtr pReg)
          * as incorrect scanline interleaving when software rendering.
          */
 	STOREREG(GMultGLINTAperture, pGlint->realWidth);
-	STOREREG(GMultGLINT1, 
-			pGlint->MultiPciInfo[0]->memBase[2] & 0xFF800000);
-	STOREREG(GMultGLINT2,
-			pGlint->MultiPciInfo[1]->memBase[2] & 0xFF800000);
+	STOREREG(GMultGLINT1, PCI_REGION_BASE(pGlint->MultiPciInfo[0], 2, REGION_MEM) & 0xFF800000);
+	STOREREG(GMultGLINT2, PCI_REGION_BASE(pGlint->MultiPciInfo[1], 2, REGION_MEM) & 0xFF800000);
     }
 
     if (IS_GMX2000 || IS_GLORIAXXL) {


Index: xorg-x11-drv-glint.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-glint/devel/xorg-x11-drv-glint.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- xorg-x11-drv-glint.spec	20 Feb 2008 07:23:35 -0000	1.18
+++ xorg-x11-drv-glint.spec	11 Mar 2008 00:30:23 -0000	1.19
@@ -9,7 +9,7 @@
 Summary:   Xorg X11 glint video driver
 Name:      xorg-x11-drv-glint
 Version:   1.1.1
-Release:   8%{?dist}
+Release:   9%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -18,8 +18,11 @@
 Source0:   ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
 Source1:   glint.xinf
 
+Patch0: glint-pciaccess.patch
+
 ExcludeArch: s390 s390x
 
+BuildRequires: automake autoconf libtool
 BuildRequires: xorg-x11-server-sdk >= 1.3.0.0-6
 %if %{with_dri}
 BuildRequires: mesa-libGL-devel >= 6.4-4
@@ -34,8 +37,10 @@
 
 %prep
 %setup -q -n %{tarball}-%{version}
+%patch0 -p1 -b .pciaccess
 
 %build
+autoreconf -v --install
 %configure --disable-static \
 %if ! %{with_dri}
            --disable-dri
@@ -64,6 +69,9 @@
 %{_mandir}/man4/glint.4*
 
 %changelog
+* Tue Mar 11 2008 Dave Airlie <airlied at gmail.com> 1.1.1-9
+- pciaccess conversion
+
 * Wed Feb 20 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.1.1-8
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list