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

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



 .cvsignore          |   19 --------
 .gitignore          |   20 ++++++++
 configure.ac        |   15 +++++-
 man/Makefile.am     |    1 
 man/apm.man         |    6 +-
 src/Makefile.am     |    3 -
 src/apm.h           |   10 +++-
 src/apm_accel.c     |    1 
 src/apm_cursor.c    |    2 
 src/apm_dga.c       |    1 
 src/apm_driver.c    |   74 +++++++++++++++++++++++++++----
 src/apm_funcs.c     |    1 
 src/apm_i2c.c       |    1 
 src/apm_pcirename.h |  122 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/apm_regs.h      |    1 
 src/apm_rush.c      |    2 
 src/apm_video.c     |    1 
 17 files changed, 234 insertions(+), 46 deletions(-)

New commits:
commit 3cbb51c4a94b1d19cdc5b9542449281cc0952356
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 12:10:48 2008 -0400

    apm 1.2.0

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

commit 6c374fadd3b81a6d58c4f5d361d957c85cab1d4a
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 11:05:14 2008 -0400

    Death to RCS tags.

diff --git a/src/apm.h b/src/apm.h
index 97b02ac..3d500c3 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm.h,v 1.19tsi Exp $ */
 
 #include "apm_pcirename.h"
 #include <string.h>
diff --git a/src/apm_accel.c b/src/apm_accel.c
index 4a7a149..4526097 100644
--- a/src/apm_accel.c
+++ b/src/apm_accel.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_accel.c,v 1.20tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/apm_cursor.c b/src/apm_cursor.c
index 14dbc62..3638cf2 100644
--- a/src/apm_cursor.c
+++ b/src/apm_cursor.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_cursor.c,v 1.14 2000/06/30 18:27:02 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/apm_dga.c b/src/apm_dga.c
index 152e91b..313d03b 100644
--- a/src/apm_dga.c
+++ b/src/apm_dga.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_dga.c,v 1.9 2001/01/06 21:29:11 tsi Exp $ */
 /*
  * file: apm_dga.c
  * ported from s3virge, ported from mga
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 9e4603a..49b74d3 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_driver.c,v 1.65 2003/10/30 17:36:57 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/apm_funcs.c b/src/apm_funcs.c
index 78e5bf7..01d50c3 100644
--- a/src/apm_funcs.c
+++ b/src/apm_funcs.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_funcs.c,v 1.18tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/apm_i2c.c b/src/apm_i2c.c
index a452c32..b0691a1 100644
--- a/src/apm_i2c.c
+++ b/src/apm_i2c.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_i2c.c,v 1.6.4.1 2001/11/28 22:35:13 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/apm_regs.h b/src/apm_regs.h
index 633a1eb..3f60eef 100644
--- a/src/apm_regs.h
+++ b/src/apm_regs.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_regs.h,v 1.8 2002/01/25 21:55:55 tsi Exp $ */
 
 
 
diff --git a/src/apm_rush.c b/src/apm_rush.c
index 61c066a..74d85a3 100644
--- a/src/apm_rush.c
+++ b/src/apm_rush.c
@@ -1,5 +1,3 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_rush.c,v 1.4 2005/04/20 12:25:22 daniels Exp $ */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_rush.c,v 1.11tsi Exp $ */
 /*
  * Copyright Loïc Grenié 1999
  */
diff --git a/src/apm_video.c b/src/apm_video.c
index acf65da..9a9bc39 100644
--- a/src/apm_video.c
+++ b/src/apm_video.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_video.c,v 1.11tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"

commit 9c5bd06addbd5470c891760b1ba84c27eddeecad
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Mar 11 10:50:32 2008 +1000

    further build fixes

diff --git a/src/apm.h b/src/apm.h
index 1f616eb..97b02ac 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -128,7 +128,7 @@ typedef struct {
     unsigned char	savedSR10;
     CARD8		MiscOut;
     CARD8		c9, d9, db, Rush;
-    unsigned long	saveCmd;
+    unsigned int	saveCmd;
     pointer		FontInfo;
     Bool		hwCursor;
     Bool		noLinear;
diff --git a/src/apm_driver.c b/src/apm_driver.c
index b5b5874..9e4603a 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -415,9 +415,11 @@ ApmProbe(DriverPtr drv, int flags)
      * file info to override any contradictions.
      */
 
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86GetPciVideoInfo() == NULL) {
 	return FALSE;
     }
+#endif
     numUsed = xf86MatchPciInstances(APM_NAME, PCI_VENDOR_ALLIANCE,
 		    ApmChipsets, ApmPciChipsets, DevSections, numDevSections,
 		    drv, &usedChips);
@@ -1928,8 +1930,10 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     if (pApm->noLinear) {
 	PCI_READ_LONG(pApm->PciInfo, &pApm->saveCmd, PCI_CMD_STAT_REG);
 	PCI_WRITE_LONG(pApm->PciInfo, pApm->saveCmd | (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE), PCI_CMD_STAT_REG);
+#ifndef XSERVER_LIBPCIACCESS
 	pApm->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
 				 pApm->PciTag, 0xA0000, 0x10000);
+#endif
     }
     else
 	if (!ApmMapMem(pScrn))

commit 5e0510dd0144c8ee85b2bd8bde58ae212f0d8453
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Mar 11 10:48:19 2008 +1000

    xf1/4 bpp conversion

diff --git a/configure.ac b/configure.ac
index a69f813..851373a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,8 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
               [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
               [#include "xorg-server.h"])
+AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
+AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
 CPPFLAGS="$SAVE_CPPFLAGS"
 
 # Checks for header files.
diff --git a/src/apm.h b/src/apm.h
index f938257..1f616eb 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -31,8 +31,12 @@
 #include "micmap.h"
 
 /* Needed for the 1 and 4 bpp framebuffers */
+#ifdef HAVE_XF1BPP
 #include "xf1bpp.h"
+#endif
+#ifdef HAVE_XF4BPP
 #include "xf4bpp.h"
+#endif
 
 #include "fb.h"
 
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 831a463..b5b5874 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -206,8 +206,12 @@ static const char *shadowSymbols[] = {
 
 #ifdef XFree86LOADER
 static const char *miscfbSymbols[] = {
+#ifdef HAVE_XF1BPP
     "xf1bppScreenInit",
+#endif
+#ifdef HAVE_XF4BPP
     "xf4bppScreenInit",
+#endif
     NULL
 };
 #endif
@@ -1155,14 +1159,18 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 
     /* Load bpp-specific modules */
     switch (pScrn->bitsPerPixel) {
+#ifdef HAVE_XF1BPP
     case 1:
 	mod = "xf1bpp";
 	req = "xf1bppScreenInit";
 	break;
+#endif
+#ifndef HAVE_XF4BPP
     case 4:
 	mod = "xf4bpp";
 	req = "xf4bppScreenInit";
 	break;
+#endif
     case 8:
     case 16:
     case 24:
@@ -1987,18 +1995,22 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     miSetPixmapDepths();
 
     switch (pScrn->bitsPerPixel) {
+#ifndef HAVE_XF1BPP
     case 1:
 	ret = xf1bppScreenInit(pScreen, FbBase,
 			pScrn->virtualX, pScrn->virtualY,
 			pScrn->xDpi, pScrn->yDpi,
 			pScrn->displayWidth);
 	break;
+#endif
+#ifdef HAVE_XF4BPP
     case 4:
 	ret = xf4bppScreenInit(pScreen, FbBase,
 			pScrn->virtualX, pScrn->virtualY,
 			pScrn->xDpi, pScrn->yDpi,
 			pScrn->displayWidth);
 	break;
+#endif
     case 8:
     case 16:
     case 24:

commit d1e29902483a82e86b07cd30d41d411e71b776ea
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Mar 11 10:45:08 2008 +1000

    pcirename conversion

diff --git a/configure.ac b/configure.ac
index 8830683..a69f813 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,10 +68,21 @@ AC_SUBST([CFLAGS])
 AC_SUBST([INCLUDES])
 
 # 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
+
 DRIVER_NAME=apm
 AC_SUBST([DRIVER_NAME])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index d641e62..8a6779e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,7 +35,8 @@ apm_drv_la_SOURCES = \
          apm_driver.c \
          apm.h \
          apm_i2c.c \
-         apm_regs.h
+         apm_regs.h \
+	 apm_pcirename.h
 	
 if XF86RUSH
 apm_drv_la_SOURCES += apm_rush.c
diff --git a/src/apm.h b/src/apm.h
index a9f9e79..f938257 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -1,5 +1,6 @@
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm.h,v 1.19tsi Exp $ */
 
+#include "apm_pcirename.h"
 #include <string.h>
 
 /* All drivers should typically include these */
@@ -104,7 +105,9 @@ typedef struct {
 
 typedef struct {
     pciVideoPtr		PciInfo;
+#ifndef XSERVER_LIBPCIACCESS
     PCITAG		PciTag;
+#endif
     int			scrnIndex;
     int			Chipset;
     int			ChipRev;
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 81356a0..831a463 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -550,12 +550,16 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
     pEnt = pApm->pEnt	= xf86GetEntityInfo(pScrn->entityList[0]);
     if (pEnt->location.type == BUS_PCI) {
 	pApm->PciInfo	= xf86GetPciInfoForEntity(pEnt->index);
+#ifndef XSERVER_LIBPCIACCESS
 	pApm->PciTag	= pciTag(pApm->PciInfo->bus, pApm->PciInfo->device,
 				 pApm->PciInfo->func);
+#endif
     }
     else {
 	pApm->PciInfo	= NULL;
+#ifndef XSERVER_LIBPCIACCESS
 	pApm->PciTag	= 0;
+#endif
     }
 
     if (flags & PROBE_DETECT) {
@@ -653,10 +657,15 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 	/* Default to 8 */
 	pScrn->rgbBits = 8;
     }
+#ifndef XSERVER_LIBPCIACCESS
+    /* you're getting a linear framebuffer with pciaccess */
     if (xf86ReturnOptValBool(pApm->Options, OPTION_NOLINEAR, FALSE)) {
 	pApm->noLinear = TRUE;
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "No linear framebuffer\n");
     }
+#else
+    pApm->noLinear = FALSE;
+#endif
     from = X_DEFAULT;
     pApm->hwCursor = FALSE;
     if (xf86GetOptValBool(pApm->Options, OPTION_HW_CURSOR, &pApm->hwCursor))
@@ -778,7 +787,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
     } else {
 	from = X_PROBED;
 	if (pApm->PciInfo)
-	    pApm->Chipset = pApm->PciInfo->chipType;
+	    pApm->Chipset = PCI_DEV_DEVICE_ID(pApm->PciInfo);
 	else
 	    pApm->Chipset = pEnt->chipset;
 	pScrn->chipset = (char *)xf86TokenToString(ApmChipsets, pApm->Chipset);
@@ -794,7 +803,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
 		   pApm->ChipRev);
     } else if (pApm->PciInfo) {
-	pApm->ChipRev = pApm->PciInfo->chipRev;
+        pApm->ChipRev = PCI_DEV_REVISION(pApm->PciInfo);
     }
 
     /*
@@ -818,7 +827,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 	pApm->LinAddress = pEnt->device->MemBase;
 	from = X_CONFIG;
     } else if (pApm->PciInfo) {
-	pApm->LinAddress = pApm->PciInfo->memBase[0] & 0xFF800000;
+        pApm->LinAddress = PCI_REGION_BASE(pApm->PciInfo, 0, REGION_MEM) & 0xFF800000;
 	from = X_PROBED;
     } else {
 	/*
@@ -883,9 +892,24 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
 	/*unsigned long		save;*/
 	volatile unsigned char	*LinMap;
 
+#ifndef XSERVER_LIBPCIACCESS
 	LinMap = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
 				     pApm->PciTag, pApm->LinAddress,
 				     pApm->LinMapSize);
+#else
+	{
+	    void** result = (void**)&LinMap;
+	    int err = pci_device_map_range(pApm->PciInfo,
+					   pApm->LinAddress,
+					   pApm->LinMapSize,
+					   PCI_DEV_MAP_FLAG_WRITABLE,
+					   result);
+	    
+	    if (err)
+		return FALSE;
+	}
+#endif
+
 	/*save = pciReadLong(pApm->PciTag, PCI_CMD_STAT_REG);
 	pciWriteLong(pApm->PciTag, PCI_CMD_STAT_REG, save | PCI_CMD_MEM_ENABLE);*/
 	d9 = LinMap[0xFFECD9];
@@ -1211,10 +1235,27 @@ ApmMapMem(ScrnInfoPtr pScrn)
     APMDECL(pScrn);
     vgaHWPtr	hwp = VGAHWPTR(pScrn);
 
+#ifndef XSERVER_LIBPCIACCESS
     pApm->LinMap = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
 				 pApm->PciTag,
 				 (unsigned long)pApm->LinAddress,
 				 pApm->LinMapSize);
+#else
+    {
+	void** result = (void**)&pApm->LinMap;
+	int err = pci_device_map_range(pApm->PciInfo,
+				       pApm->LinAddress,
+				       pApm->LinMapSize,
+				       PCI_DEV_MAP_FLAG_WRITABLE |
+				       PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+				       result);
+	
+	if (err) 
+	    return FALSE;
+    }
+#endif
+
+
     if (pApm->LinMap == NULL)
 	return FALSE;
 
@@ -1877,8 +1918,8 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
     /* Map the chip memory and MMIO areas */
     if (pApm->noLinear) {
-	pApm->saveCmd = pciReadLong(pApm->PciTag, PCI_CMD_STAT_REG);
-	pciWriteLong(pApm->PciTag, PCI_CMD_STAT_REG, pApm->saveCmd | (PCI_CMD_IO_ENABLE|PCI_CMD_MEM_ENABLE));
+	PCI_READ_LONG(pApm->PciInfo, &pApm->saveCmd, PCI_CMD_STAT_REG);
+	PCI_WRITE_LONG(pApm->PciInfo, pApm->saveCmd | (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE), PCI_CMD_STAT_REG);
 	pApm->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
 				 pApm->PciTag, 0xA0000, 0x10000);
     }
diff --git a/src/apm_pcirename.h b/src/apm_pcirename.h
new file mode 100644
index 0000000..f0f5cf8
--- /dev/null
+++ b/src/apm_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 5d2abb8ff9fdcfab6d5fe4f16acf302cb6811d58
Author: Matthieu Herrb <matthieu@bluenote.herrb.net>
Date:   Sat Mar 8 23:20:13 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 ca78b41a6fcb4110d8e19636baa8dfb4a9ef07bd
Author: Brice Goglin <bgoglin@debian.org>
Date:   Tue Aug 7 10:15:10 2007 +0200

    Define APM_*_VERSION using PACKAGE_VERSION_*

diff --git a/src/apm_driver.c b/src/apm_driver.c
index e5b6006..81356a0 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -19,9 +19,9 @@
 #define APM_VERSION		4000
 #define APM_NAME		"APM"
 #define APM_DRIVER_NAME		"apm"
-#define APM_MAJOR_VERSION       1
-#define APM_MINOR_VERSION       1
-#define APM_PATCHLEVEL          1
+#define APM_MAJOR_VERSION       PACKAGE_VERSION_MAJOR
+#define APM_MINOR_VERSION       PACKAGE_VERSION_MINOR
+#define APM_PATCHLEVEL          PACKAGE_VERSION_PATCHLEVEL
 #ifndef PCI_CHIP_AT3D
 #define PCI_CHIP_AT3D	0x643D
 #endif

commit 5c471bae5933a3e915d8aba2dbf7c4f68c3086b7
Author: Adam Jackson <ajax@benzedrine.nwnk.net>
Date:   Thu Mar 1 17:46:28 2007 -0500

    Remove useless mfb.h include.

diff --git a/src/apm_cursor.c b/src/apm_cursor.c
index ea21ac2..14dbc62 100644
--- a/src/apm_cursor.c
+++ b/src/apm_cursor.c
@@ -13,7 +13,6 @@
 #include "scrnintstr.h"
 #include "servermd.h"
 #include "windowstr.h"
-#include "mfb.h"
 #include "mipointer.h"
 
 #include "apm.h"

commit 3419d02714e4d10fa267b427af012de81c447a23
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Mar 1 10:40:39 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
+*~

commit a56ca8d06b4286d8c4e4188e6056eff00a2209f5
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Mar 1 10:40:15 2007 -0800

    Replace references to XFree86/XF86Config in man page

diff --git a/man/apm.man b/man/apm.man
index cb206c1..739c658 100644
--- a/man/apm.man
+++ b/man/apm.man
@@ -14,7 +14,7 @@ apm \- Alliance ProMotion video driver
 .fi
 .SH DESCRIPTION
 .B apm 
-is an XFree86 driver for Alliance ProMotion video cards. The driver
+is an __xservername__ driver for Alliance ProMotion video cards. The driver
 is accelerated for supported hardware/depth combination. It supports
 framebuffer depths of 8, 15, 16, 24 and 32 bits. For 6420, 6422, AT24,
 AT3D and AT25, all depths are fully accelerated except 24 bpp for which
@@ -35,7 +35,7 @@ ProMotion chipsets
 .TP 12
 .B AT25
 .SH CONFIGURATION DETAILS
-Please refer to XF86Config(__filemansuffix__) for general configuration
+Please refer to __xconfigfile__(__filemansuffix__) for general configuration
 details.  This section only covers configuration details specific to this
 driver.
 .PP
@@ -101,6 +101,6 @@ Force the software cursor.  Default: off.
 .BI "Option \*qShadowFB\*q \*q" boolean \*q
 Enable or disable use of the shadow framebuffer layer.  Default: off.
 .SH "SEE ALSO"
-XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__)
+__xservername__(1), __xconfigfile__(__filemansuffix__), xorgconfig(1), Xserver(1), X(__miscmansuffix__)
 .SH AUTHORS
 Authors include: ...


Reply to: