[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-neomagic: Changes to 'upstream-experimental'



 .cvsignore          |   19 --------
 .gitignore          |   20 ++++++++
 configure.ac        |   15 +++++-
 man/Makefile.am     |    1 
 src/Makefile.am     |    3 -
 src/neo.h           |    6 ++
 src/neo_2070.c      |    1 
 src/neo_2090.c      |    1 
 src/neo_2097.c      |    1 
 src/neo_2200.c      |    1 
 src/neo_bank.c      |    1 
 src/neo_cursor.c    |    1 
 src/neo_dga.c       |    1 
 src/neo_driver.c    |   74 ++++++++++++++++++++++++++++---
 src/neo_i2c.c       |    1 
 src/neo_macros.h    |    1 
 src/neo_pcirename.h |  122 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/neo_reg.h       |    1 
 src/neo_shadow.c    |    1 
 src/neo_video.c     |    1 
 src/neo_video.h     |    1 
 21 files changed, 229 insertions(+), 44 deletions(-)

New commits:
commit 09543c5376f15521820dae14e2e48d3c4a01ba7a
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 14:40:18 2008 -0400

    neomagic 1.2.0

diff --git a/configure.ac b/configure.ac
index 1b0f433..e0542ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-neomagic],
-        1.1.1,
+        1.2.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-neomagic)
 

commit cd46430570e6de9e4253786c60609bc84c134c32
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 14:36:41 2008 -0400

    Death to RCS tags.

diff --git a/src/neo.h b/src/neo.h
index 27ec566..c412792 100644
--- a/src/neo.h
+++ b/src/neo.h
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo.h,v 1.23tsi Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_2070.c b/src/neo_2070.c
index c308d70..007a304 100644
--- a/src/neo_2070.c
+++ b/src/neo_2070.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2070.c,v 1.4 2002/04/04 14:05:44 eich Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_2090.c b/src/neo_2090.c
index 5bdda37..45f34dd 100644
--- a/src/neo_2090.c
+++ b/src/neo_2090.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2090.c,v 1.6 2002/04/04 14:05:44 eich Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_2097.c b/src/neo_2097.c
index 6cc54df..ed9014c 100644
--- a/src/neo_2097.c
+++ b/src/neo_2097.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2097.c,v 1.11 2002/10/30 12:52:21 alanh Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_2200.c b/src/neo_2200.c
index 7812804..78b3367 100644
--- a/src/neo_2200.c
+++ b/src/neo_2200.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_2200.c,v 1.19tsi Exp $ */
 /*
  * The original Precision Insight driver for
  * XFree86 v.3.3 has been sponsored by Red Hat.
diff --git a/src/neo_bank.c b/src/neo_bank.c
index d59fb5b..ec014ce 100644
--- a/src/neo_bank.c
+++ b/src/neo_bank.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_bank.c,v 1.3 2002/01/25 21:56:05 tsi Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_cursor.c b/src/neo_cursor.c
index bf7e980..c524527 100644
--- a/src/neo_cursor.c
+++ b/src/neo_cursor.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_cursor.c,v 1.8 2001/10/28 03:33:42 tsi Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_dga.c b/src/neo_dga.c
index 6220d46..4227da6 100644
--- a/src/neo_dga.c
+++ b/src/neo_dga.c
@@ -21,7 +21,6 @@
  *
  * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_dga.c,v 1.4 2001/10/01 13:44:07 eich Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/neo_driver.c b/src/neo_driver.c
index fec51ce..1ac21c3 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -30,7 +30,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * Copyright 2002 Shigehiro Nomura
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_driver.c,v 1.74 2003/12/31 05:07:30 dawes Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_i2c.c b/src/neo_i2c.c
index a06b9f9..82d1f2a 100644
--- a/src/neo_i2c.c
+++ b/src/neo_i2c.c
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_i2c.c,v 1.4 2002/09/16 18:05:58 eich Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_macros.h b/src/neo_macros.h
index 7e53519..4dc79ec 100644
--- a/src/neo_macros.h
+++ b/src/neo_macros.h
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_macros.h,v 1.2 2002/10/30 12:52:22 alanh Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_reg.h b/src/neo_reg.h
index 389323d..72c84b8 100644
--- a/src/neo_reg.h
+++ b/src/neo_reg.h
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_reg.h,v 1.2 2002/10/30 12:52:22 alanh Exp $ */
 
 /*
  * The original Precision Insight driver for
diff --git a/src/neo_shadow.c b/src/neo_shadow.c
index f70253b..c5b682f 100644
--- a/src/neo_shadow.c
+++ b/src/neo_shadow.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_shadow.c,v 1.2 2000/11/03 18:46:11 eich Exp $ */
 
 /*
    Copyright (c) 1999, 2000 The XFree86 Project Inc. 
diff --git a/src/neo_video.c b/src/neo_video.c
index 08b5085..dd02839 100644
--- a/src/neo_video.c
+++ b/src/neo_video.c
@@ -26,7 +26,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 /*
  * Copyright 2002 SuSE Linux AG, Author: Egbert Eich
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_video.c,v 1.6tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/neo_video.h b/src/neo_video.h
index 708bd01..1b15077 100644
--- a/src/neo_video.h
+++ b/src/neo_video.h
@@ -22,7 +22,6 @@ RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 **********************************************************************/
-/* $XFree86$ */
 
 #ifndef _NEO_VIDEO_H
 #define _NEO_VIDEO_H

commit 0b82e12e40f80d6a4787dc748155d3d05471b272
Author: Dave Airlie <airlied@clockmaker.usersys.redhat.com>
Date:   Mon Mar 10 15:22:05 2008 +1000

    finish pciaccess conversion
    
    thanks to pcpa again

diff --git a/src/neo_driver.c b/src/neo_driver.c
index 5ce737a..fec51ce 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -612,7 +612,10 @@ NEOProbe(DriverPtr drv, int flags)
     }
   
     /* PCI BUS */
-    if (xf86GetPciVideoInfo() ) {
+#ifndef XSERVER_LIBPCIACCESS
+    if (xf86GetPciVideoInfo() )
+#endif
+    {
 	numUsed = xf86MatchPciInstances(NEO_NAME, PCI_VENDOR_NEOMAGIC,
 					NEOChipsets, NEOPCIchipsets, 
 					devSections,numDevSections,

commit 79c04709e21ff37feea031063939c4e396b0a3ad
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Sat Mar 8 23:40:30 2008 +0100

    Makefile.am: nuke RCS Id

diff --git a/man/Makefile.am b/man/Makefile.am
index bf7ec17..f0eb29b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,3 @@
-# $Id$
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # 

commit e9da23854dce210d72c209d971effabf41029853
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Feb 27 13:27:51 2008 +1000

    neo: finish pciaccess conversion

diff --git a/src/neo_driver.c b/src/neo_driver.c
index 3d18916..5ce737a 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -2148,16 +2148,30 @@ neoUnmapMem(ScrnInfoPtr pScrn)
     NEOPtr nPtr = NEOPTR(pScrn);
 
     if (!nPtr->noLinear) {
+#ifndef XSERVER_LIBPCIACCESS
       if (nPtr->NeoMMIOBase)
 	  xf86UnMapVidMem(pScrn->scrnIndex, (pointer)nPtr->NeoMMIOBase,
 			  0x200000L);
+#else
+      if (nPtr->NeoMMIOBase)
+	  pci_device_unmap_range(nPtr->PciInfo, (pointer)nPtr->NeoMMIOBase, 0x200000L);
+#endif
       nPtr->NeoMMIOBase = NULL;
+#ifndef XSERVER_LIBPCIACCESS
       if (nPtr->NeoMMIOBase2)
 	  xf86UnMapVidMem(pScrn->scrnIndex, (pointer)nPtr->NeoMMIOBase2,
 			  0x100000L);
+#else
+      if (nPtr->NeoMMIOBase2)
+	  pci_device_unmap_range(nPtr->PciInfo, (pointer)nPtr->NeoMMIOBase2, 0x100000L);
+#endif
       nPtr->NeoMMIOBase2 = NULL;
+#ifndef XSERVER_LIBPCIACCESS
       xf86UnMapVidMem(pScrn->scrnIndex, (pointer)nPtr->NeoFbBase,
 		    nPtr->NeoFbMapSize); 
+#else
+      pci_device_unmap_range(nPtr->PciInfo, (pointer)nPtr->NeoFbBase, nPtr->NeoFbMapSize);
+#endif
     }
     nPtr->NeoFbBase = NULL;
     

commit e8ee089bc9a46cca015994c95a4e7b2d950c4870
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Feb 27 11:14:53 2008 +1000

    neomagic: port to libpciaccess

diff --git a/configure.ac b/configure.ac
index 50c0a20..1b0f433 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,7 @@ AC_ARG_WITH(xorg-module-dir,
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
 
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -59,10 +60,22 @@ 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
 
+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([XORG_CFLAGS])
 AC_SUBST([moduledir])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index cf5ab19..c09962b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,4 +43,5 @@ neomagic_drv_la_SOURCES = \
          neo_reg.h \
          neo_shadow.c \
          neo_video.c \
-         neo_video.h
+         neo_video.h \
+	 neo_pcirename.h
diff --git a/src/neo.h b/src/neo.h
index 23f2c7c..27ec566 100644
--- a/src/neo.h
+++ b/src/neo.h
@@ -37,6 +37,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
 #include <string.h>
+
+#include "neo_pcirename.h"
+
 /* All drivers should typically include these */
 #include "xf86.h"
 #include "xf86_OSproc.h"
@@ -201,7 +204,9 @@ typedef struct neoRec
 {
     int NeoChipset;
     pciVideoPtr PciInfo;
+#ifndef XSERVER_LIBPCIACCESS
     PCITAG      PciTag;
+#endif
     EntityInfoPtr pEnt;
     XAAInfoRecPtr	AccelInfoRec;
     NEOACLRec Accel;
diff --git a/src/neo_driver.c b/src/neo_driver.c
index ef0676e..3d18916 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -778,9 +778,11 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
 	/* This driver can handle ISA and PCI buses */
 	if (nPtr->pEnt->location.type == BUS_PCI) {
 	    nPtr->PciInfo = xf86GetPciInfoForEntity(nPtr->pEnt->index);
+#ifndef XSERVER_LIBPCIACCESS
 	    nPtr->PciTag = pciTag(nPtr->PciInfo->bus, 
 				  nPtr->PciInfo->device,
 				  nPtr->PciInfo->func);
+#endif
 	}
     }
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Chipset is a ");
@@ -1221,7 +1223,7 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
 	
     if (nPtr->pEnt->location.type == BUS_PCI) {
 	if (!nPtr->NeoLinearAddr) {
-	    nPtr->NeoLinearAddr = nPtr->PciInfo->memBase[0];
+	    nPtr->NeoLinearAddr = PCI_REGION_BASE(nPtr->PciInfo, 0, REGION_MEM);
 	    xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
 		       "FB base address is set at 0x%lX.\n",
 		       nPtr->NeoLinearAddr);
@@ -1241,8 +1243,8 @@ NEOPreInit(ScrnInfoPtr pScrn, int flags)
 	    case NM2230:
 	    case NM2360:
 	    case NM2380:
-		nPtr->NeoMMIOAddr = nPtr->PciInfo->memBase[1];
-		nPtr->NeoMMIOAddr2 = nPtr->PciInfo->memBase[2];
+		nPtr->NeoMMIOAddr = PCI_REGION_BASE(nPtr->PciInfo, 1, REGION_MEM);
+		nPtr->NeoMMIOAddr2 = PCI_REGION_BASE(nPtr->PciInfo, 2, REGION_MEM);
 		break;
 	    }
 	    xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
@@ -2057,6 +2059,8 @@ neoMapMem(ScrnInfoPtr pScrn)
     if (!nPtr->noLinear) {
 	if (!nPtr->noMMIO) {
 	    if (nPtr->pEnt->location.type == BUS_PCI){
+
+#ifndef XSERVER_LIBPCIACCESS
 		nPtr->NeoMMIOBase =
 		    xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
 				  nPtr->PciTag, nPtr->NeoMMIOAddr,
@@ -2067,6 +2071,29 @@ neoMapMem(ScrnInfoPtr pScrn)
 				      nPtr->PciTag, nPtr->NeoMMIOAddr2,
 				      0x100000L);
 		}
+
+#else
+		void** result = (void**)&nPtr->NeoMMIOBase;
+		int err = pci_device_map_range(nPtr->PciInfo,
+					       nPtr->NeoMMIOAddr,
+					       0x200000L,
+					       PCI_DEV_MAP_FLAG_WRITABLE,
+					       result);
+		if (err)
+		    return FALSE;
+		
+		if (nPtr->NeoMMIOAddr2 != 0){
+		    result = (void**)&nPtr->NeoMMIOBase2;
+		    int err = pci_device_map_range(nPtr->PciInfo,
+						   nPtr->NeoMMIOAddr2,
+						   0x100000L,
+						   PCI_DEV_MAP_FLAG_WRITABLE,
+						   result);
+
+		    if (err) 
+			return FALSE;
+		}
+#endif
 	    } else
 		nPtr->NeoMMIOBase =
 		    xf86MapVidMem(pScrn->scrnIndex,
@@ -2077,11 +2104,26 @@ neoMapMem(ScrnInfoPtr pScrn)
 	}
 
 	if (nPtr->pEnt->location.type == BUS_PCI)
+
+#ifndef XSERVER_LIBPCIACCESS
 	    nPtr->NeoFbBase =
 		xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
 			      nPtr->PciTag,
 			      (unsigned long)nPtr->NeoLinearAddr,
 			      nPtr->NeoFbMapSize);
+#else
+	{
+	    void** result = (void**)&nPtr->NeoFbBase;
+	    int err = pci_device_map_range(nPtr->PciInfo,
+					   nPtr->NeoLinearAddr,
+					   nPtr->NeoFbMapSize,
+					   PCI_DEV_MAP_FLAG_WRITABLE |
+					   PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+					   result);
+	    if (err)
+		return FALSE;
+	}
+#endif
 	else
 	    nPtr->NeoFbBase =
 		xf86MapVidMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
diff --git a/src/neo_pcirename.h b/src/neo_pcirename.h
new file mode 100644
index 0000000..f0f5cf8
--- /dev/null
+++ b/src/neo_pcirename.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 CIRPCIRENAME_H
+#define CIRPCIRENAME_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 /* CIRPCIRENAME_H */

commit dc44c5e32c416e94197db3cde29ca3eea3cd01fe
Author: Brice Goglin <bgoglin@debian.org>
Date:   Tue Aug 7 12:20:00 2007 +0200

    Define NEO_*_VERSION using PACKAGE_VERSION_*

diff --git a/src/neo_driver.c b/src/neo_driver.c
index 1fca1f5..ef0676e 100644
--- a/src/neo_driver.c
+++ b/src/neo_driver.c
@@ -158,9 +158,9 @@ static int      neoFindMode(int xres, int yres, int depth);
 #define NEO_NAME "NEOMAGIC"
 #define NEO_DRIVER_NAME "neomagic"
 
-#define NEO_MAJOR_VERSION 1
-#define NEO_MINOR_VERSION 1
-#define NEO_PATCHLEVEL 1
+#define NEO_MAJOR_VERSION PACKAGE_VERSION_MAJOR
+#define NEO_MINOR_VERSION PACKAGE_VERSION_MINOR
+#define NEO_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
 
 /*
  * This is intentionally screen-independent.  It indicates the binding

commit 2c84df159e337b43e6664d880fbf04fde7a33d90
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Mar 1 10:51:44 2007 -0800

    renamed: .cvsignore -> .gitignore

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index fb1befd..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-Makefile
-Makefile.in
-*.la
-*.lo
-aclocal.m4
-autom4te.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-missing
-stamp-h1
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2df4a8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+Makefile
+Makefile.in
+*.la
+*.lo
+aclocal.m4
+autom4te.cache
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+missing
+stamp-h1
+*~


Reply to: