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

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



Rebased ref, commits from common ancestor:
commit ac4bce50754528efbf55daa87dd4992ac70c4af2
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 15:42:53 2008 -0400

    trident 1.3.0

diff --git a/configure.ac b/configure.ac
index 45aea41..e0b3b18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-trident],
-        1.2.4,
+        1.3.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-trident)
 

commit 012794d5aa4cf862f7d5b83d744acc2d5a13bf52
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 15:41:46 2008 -0400

    Fix distcheck

diff --git a/src/Makefile.am b/src/Makefile.am
index 8c309a3..216bad4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,6 +39,7 @@ trident_drv_la_SOURCES = \
          trident_driver.c \
          trident.h \
          tridenthelper.c \
+	 tridentpcirename.h \
          trident_i2c.c \
          trident_regs.h \
          trident_shadow.c \

commit 6e64c2a2d8bfc9cf3daf5f0df430ede5a5d0d7fb
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Mar 19 15:40:11 2008 -0400

    Death to RCS tags.

diff --git a/src/blade_accel.c b/src/blade_accel.c
index a2725d3..31d97df 100644
--- a/src/blade_accel.c
+++ b/src/blade_accel.c
@@ -23,7 +23,6 @@
  * 
  * Trident Blade3D accelerated options.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/blade_accel.c,v 1.21 2003/10/30 13:38:01 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/image_accel.c b/src/image_accel.c
index 479de5e..f46c6a3 100644
--- a/src/image_accel.c
+++ b/src/image_accel.c
@@ -23,7 +23,6 @@
  * 
  * Trident 3DImage' accelerated options.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v 1.26 2003/10/30 13:38:01 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident.h b/src/trident.h
index ceca43e..6b96649 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -21,7 +21,6 @@
  *
  * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident.h,v 1.59 2003/09/05 22:07:28 alanh Exp $ */
 /*#define VBE_INFO*/
 
 #ifndef _TRIDENT_H_
diff --git a/src/trident_accel.c b/src/trident_accel.c
index d5d033d..c2087cc 100644
--- a/src/trident_accel.c
+++ b/src/trident_accel.c
@@ -23,7 +23,6 @@
  * 
  * Trident accelerated options.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_accel.c,v 1.28 2003/10/30 13:38:01 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_bank.c b/src/trident_bank.c
index be0536a..824d1ac 100644
--- a/src/trident_bank.c
+++ b/src/trident_bank.c
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_bank.c,v 1.4 2000/12/07 16:48:04 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_dac.c b/src/trident_dac.c
index 1324ddf..6240b7f 100644
--- a/src/trident_dac.c
+++ b/src/trident_dac.c
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dac.c,v 1.79 2003/11/03 05:11:42 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_dga.c b/src/trident_dga.c
index b91ee74..78fa8f4 100644
--- a/src/trident_dga.c
+++ b/src/trident_dga.c
@@ -21,7 +21,6 @@
  *
  * Authors:  Alan Hourihane, <alanh@fairlite.demon.co.uk>
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_dga.c,v 1.4 2002/10/08 22:14:11 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_driver.c b/src/trident_driver.c
index 5be9ee9..b5ab968 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -28,7 +28,6 @@
  *	    Massimiliano Ghilardi, max@Linuz.sns.it, some fixes to the
  *				   clockchip programming code.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v 1.190 2004/01/21 22:31:54 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_i2c.c b/src/trident_i2c.c
index bf3a273..1a1991e 100644
--- a/src/trident_i2c.c
+++ b/src/trident_i2c.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_i2c.c,v 1.2 1999/01/23 09:55:59 dawes Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_regs.h b/src/trident_regs.h
index c0bc99c..aacfa74 100644
--- a/src/trident_regs.h
+++ b/src/trident_regs.h
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_regs.h,v 1.27 2003/09/05 22:07:29 alanh Exp $ */
 
 #define DEBUG 1
 
diff --git a/src/trident_shadow.c b/src/trident_shadow.c
index 9f56a61..d2169c8 100644
--- a/src/trident_shadow.c
+++ b/src/trident_shadow.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_shadow.c,v 1.2 2000/11/16 19:45:01 eich Exp $ */
 
 /*
    Copyright (c) 1999, 2000 The XFree86 Project Inc. 
diff --git a/src/trident_tv.c b/src/trident_tv.c
index 8086ce3..156a9c0 100644
--- a/src/trident_tv.c
+++ b/src/trident_tv.c
@@ -2,7 +2,6 @@
  * VIA TV additions
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_tv.c,v 1.1 2003/04/15 22:13:43 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/trident_video.c b/src/trident_video.c
index 8607d93..7b6fb10 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_video.c,v 1.45 2003/11/10 18:22:34 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/tridenthelper.c b/src/tridenthelper.c
index b377206..5b6eb4a 100644
--- a/src/tridenthelper.c
+++ b/src/tridenthelper.c
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/tridenthelper.c,v 1.20 2001/10/28 03:33:52 tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/tvga_dac.c b/src/tvga_dac.c
index 442eed8..d09da58 100644
--- a/src/tvga_dac.c
+++ b/src/tvga_dac.c
@@ -21,7 +21,6 @@
  *
  * Author:  Alan Hourihane, alanh@fairlite.demon.co.uk
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/tvga_dac.c,v 1.7tsi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/xp4_accel.c b/src/xp4_accel.c
index 9ac3e97..a8a86b5 100644
--- a/src/xp4_accel.c
+++ b/src/xp4_accel.c
@@ -23,7 +23,6 @@
  * 
  * CyberBladeXP4 accelerated options.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/xp_accel.c,v 1.8tsi Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/xp_accel.c b/src/xp_accel.c
index d715042..74b8039 100644
--- a/src/xp_accel.c
+++ b/src/xp_accel.c
@@ -23,7 +23,6 @@
  * 
  * BladeXP accelerated options.
  */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/xp_accel.c,v 1.6 2003/10/30 13:38:02 alanh Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"

commit 8419334ee64c977870194a651e2c5f05b6e89fa4
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Sun Mar 9 00:01:45 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 a34c4ca7e1e8f2734aa443c0d597840f970e0eef
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Feb 18 16:51:10 2008 +1000

    initial trident pciaccess support

diff --git a/configure.ac b/configure.ac
index 815670e..45aea41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,19 @@ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
+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"
+
+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)
+
 # Checks for libraries.
 
 # Checks for header files.
diff --git a/src/trident.h b/src/trident.h
index 48216dd..ceca43e 100644
--- a/src/trident.h
+++ b/src/trident.h
@@ -31,6 +31,8 @@
 #include <string.h>
 #include <math.h>
 
+#include "tridentpcirename.h"
+
 #include "exa.h"
 #include "xf86Cursor.h"
 #include "xaa.h"
diff --git a/src/trident_driver.c b/src/trident_driver.c
index df2260f..5be9ee9 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -937,7 +937,12 @@ TRIDENTProbe(DriverPtr drv, int flags)
      * All of the cards this driver supports are PCI, so the "probing" just
      * amounts to checking the PCI data that the server has already collected.
      */
-    if (xf86GetPciVideoInfo()) {
+#ifndef XSERVER_LIBPCIACCESS
+    if (xf86GetPciVideoInfo()== NULL) {
+	return FALSE;
+    }
+#endif
+    {
     	numUsed = xf86MatchPciInstances(TRIDENT_NAME, PCI_VENDOR_TRIDENT,
 		   TRIDENTChipsets, TRIDENTPciChipsets, devSections,
 		   numDevSections, drv, &usedChips);
@@ -1092,9 +1097,9 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
 	/* This driver can handle ISA and PCI buses */
 	if (pTrident->pEnt->location.type == BUS_PCI) {
 	    pTrident->PciInfo = xf86GetPciInfoForEntity(pTrident->pEnt->index);
-	    pTrident->PciTag = pciTag(pTrident->PciInfo->bus, 
-				  pTrident->PciInfo->device,
-				  pTrident->PciInfo->func);
+#ifndef XSERVER_LIBPCIACCESS
+	    pTrident->PciTag = PCI_DEV_TAG(pTrident->PciInfo);
+#endif
     	    pTrident->Linear = TRUE;
 	} else {
     	    pTrident->Linear = FALSE;
@@ -1491,7 +1496,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
 	    from = X_CONFIG;
     	} else {
     	    if (IsPciCard)
-	    	pTrident->FbAddress = pTrident->PciInfo->memBase[0]& 0xFFFFFFF0;
+	    	pTrident->FbAddress = PCI_REGION_BASE(pTrident->PciInfo, 0, REGION_MEM) & 0xFFFFFFF0;
 	    else
 	    	pTrident->FbAddress = 0xA0000;
     	}
@@ -1510,7 +1515,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
 	    from = X_CONFIG;
     	} else {
     	    if (IsPciCard)
-	    	pTrident->IOAddress = pTrident->PciInfo->memBase[1]& 0xFFFFC000;
+	    	pTrident->IOAddress = PCI_REGION_BASE(pTrident->PciInfo, 1, REGION_MEM) & 0xFFFFC000;
 	    else
 	    	/* FIXME - Multihead UNAWARE */
     	    	pTrident->IOAddress = 0xBF000;
@@ -1996,7 +2001,7 @@ TRIDENTPreInit(ScrnInfoPtr pScrn, int flags)
 	    pTrident->NewClockCode = TRUE;
 	    pTrident->frequency = NTSC;
 	    OUTB(0x3C4, 0x5D);
-	    if (pTrident->PciInfo->subsysVendor != 0x1023) {
+	    if (PCI_SUB_VENDOR_ID(pTrident->PciInfo) != 0x1023) {
 	    	chipset = "CyberBladeXP";
 	    	pTrident->IsCyber = TRUE;
 	    } else
@@ -2542,12 +2547,32 @@ TRIDENTMapMem(ScrnInfoPtr pScrn)
     if (Is3Dchip) mapsize = 0x20000;
 
     if (IsPciCard && UseMMIO)
+#ifndef XSERVER_LIBPCIACCESS
     	pTrident->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO, 
 		pTrident->PciTag, pTrident->IOAddress, mapsize);
+#else
+	{
+		void **result = (void **)&pTrident->IOBase;
+		int err = pci_device_map_range(pTrident->PciInfo,
+						pTrident->IOAddress,
+						mapsize,
+						PCI_DEV_MAP_FLAG_WRITABLE,
+						result);
+		if (err) {
+			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+				"Unable to map IO aperture. %s (%d)\n",
+				strerror(err), err);
+		}
+	}
+#endif
     else {
+#ifndef XSERVER_LIBPCIACCESS
     	pTrident->IOBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO, 
 		pTrident->PciTag, pTrident->IOAddress, 0x1000);
     	pTrident->IOBase += 0xF00;
+#else
+	return FALSE;
+#endif
     }
 
     if (pTrident->IOBase == NULL)
@@ -2555,11 +2580,28 @@ TRIDENTMapMem(ScrnInfoPtr pScrn)
 
     if (pTrident->Linear) {
         if (pTrident->FbMapSize != 0) {
+#ifndef XSERVER_LIBPCIACCESS
 	    pTrident->FbBase = xf86MapPciMem(pScrn->scrnIndex, 
 				VIDMEM_FRAMEBUFFER,
 				 pTrident->PciTag,
 				 (unsigned long)pTrident->FbAddress,
 				 pTrident->FbMapSize);
+#else
+	    {
+		void **result = (void **)&pTrident->FbBase;
+		int err = pci_device_map_range(pTrident->PciInfo,
+						pTrident->FbAddress,
+						pTrident->FbMapSize,
+						PCI_DEV_MAP_FLAG_WRITABLE |
+						PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+						result);
+		if (err) {
+			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+				"Unable to map VRAM aperture. %s (%d)\n",
+				strerror(err), err);
+		}
+	    }
+#endif
 	    if (pTrident->FbBase == NULL)
 		return FALSE;
     	}
@@ -2585,19 +2627,27 @@ TRIDENTUnmapMem(ScrnInfoPtr pScrn)
     /*
      * Unmap IO registers to virtual address space
      */ 
-    if (IsPciCard && UseMMIO) 
+#ifdef XSERVER_LIBPCIACCESS
+    pci_device_unmap_range(pTrident->PciInfo, (pointer)pTrident->IOBase, mapsize);
+#else
+    if (IsPciCard && UseMMIO) {
     	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->IOBase, mapsize);
-    else {
+    } else {
     	pTrident->IOBase -= 0xF00;
     	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->IOBase, 0x1000);
     }
+#endif
     pTrident->IOBase = NULL;
 
     if (pTrident->Linear) {
     	if (pTrident->FbMapSize != 0) {
+#ifdef XSERVER_LIBPCIACCESS
+	    pci_device_unmap_range(pTrident->PciInfo, (pointer)pTrident->FbBase, pTrident->FbMapSize);
+#else
     	    xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->FbBase, 
 							pTrident->FbMapSize);
-    	pTrident->FbBase = NULL;
+#endif
+	    pTrident->FbBase = NULL;
         }
     }
 
diff --git a/src/tridentpcirename.h b/src/tridentpcirename.h
new file mode 100644
index 0000000..c93988a
--- /dev/null
+++ b/src/tridentpcirename.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 TRIDENTPCIRENAME_H
+#define TRIDENTPCIRENAME_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 /* TRIDENTPCIRENAME_H */

commit 707a7c779c6859761c1b895b397239a36abef4c6
Author: Alan Hourihane <alanh@tungstengraphics.com>
Date:   Sun Feb 10 21:12:33 2008 +0000

    bump to 1.2.4

diff --git a/configure.ac b/configure.ac
index c3e3b39..815670e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-trident],
-        1.2.3,
+        1.2.4,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-trident)
 

commit 6e204c6f73ccf262cb9f1eaa68af9d4c86321bd8
Author: Kostas Georgiou <hannibal@astral.lodz.pl>
Date:   Sun Feb 10 21:11:01 2008 +0000

    Don't set VID_DOUBLE_LINEBUFFER_FOR_WIDE_SRC for XP4

diff --git a/src/trident_video.c b/src/trident_video.c
index a8eb890..8607d93 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -113,7 +113,7 @@ void TRIDENTInitVideo(ScreenPtr pScreen)
 
     if (pTrident->Chipset == CYBER9397DVD || 
 	pTrident->Chipset == CYBER9525DVD ||
-	pTrident->Chipset >= BLADE3D)
+	(pTrident->Chipset >= BLADE3D && pTrident->Chipset < CYBERBLADEXP4))
 		pTrident->videoFlags |= VID_DOUBLE_LINEBUFFER_FOR_WIDE_SRC;
 
     newAdaptor = TRIDENTSetupImageVideo(pScreen);

commit 8e8eafa82c66873fcc0f159b56fd638c03304a6d
Author: Alan Hourihane <alanh@tungstengraphics.com>
Date:   Sun Jan 6 20:26:13 2008 +0000

    Fix typo

diff --git a/src/trident_video.c b/src/trident_video.c
index 9b1eca8..a8eb890 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -1315,7 +1315,7 @@ tridentFixFrame(ScrnInfoPtr pScrn, int *fixFrame)
 	    break;
 	case CYBERBLADEXP4:
 	    pTrident->hsync -= 24;
-	    pTrident->hsync_rskew = -=1;
+	    pTrident->hsync_rskew = -1;
 	    break;
 	case CYBER9397:
 	    pTrident->hsync -= 1;

commit 61a0dcfa57702fbe4d2a1832a014ce9bc5ddfc89
Author: Jan Darmochwal <jdarmochwal@gmx.de>
Date:   Sun Jan 6 20:23:58 2008 +0000

    Turn on colour key for XP4

diff --git a/src/trident_video.c b/src/trident_video.c
index b62242f..9b1eca8 100644
--- a/src/trident_video.c
+++ b/src/trident_video.c
@@ -261,6 +261,9 @@ void TRIDENTResetVideo(ScrnInfoPtr pScrn)
 	OUTW(0x3C4, 0x007A);
 	OUTW(0x3C4, 0x007D);
     }
+    if (pTrident->Chipset == CYBERBLADEXP4) {
+    	OUTW(0x3CE, 0x0462);
+    }
     switch (pScrn->depth) {
     case 8:
 	VIDEOOUT(pPriv->colorKey, pTrident->keyOffset);
@@ -1310,12 +1313,16 @@ tridentFixFrame(ScrnInfoPtr pScrn, int *fixFrame)
 	case CYBERBLADEE4:
 	    pTrident->hsync -= 8;
 	    break;
+	case CYBERBLADEXP4:
+	    pTrident->hsync -= 24;
+	    pTrident->hsync_rskew = -=1;
+	    break;
 	case CYBER9397:
 	    pTrident->hsync -= 1;
   	    pTrident->vsync -= 0;	     
 	    pTrident->vsync_bskew = 0;
 	    break;
-    case CYBER9397DVD:
+	case CYBER9397DVD:
 	    pTrident->hsync_rskew = -1;
 	    pTrident->vsync_bskew = -1;
 	    break;

commit 1a6bbe36a7f91d90e39251ba7759f3db5b6d4d24
Author: Brice Goglin <bgoglin@debian.org>
Date:   Tue Aug 7 11:53:13 2007 +0200

    TRIDENT_*_VERSION using PACKAGE_VERSION_*

diff --git a/src/trident_driver.c b/src/trident_driver.c
index a5b11df..df2260f 100644
--- a/src/trident_driver.c
+++ b/src/trident_driver.c
@@ -115,9 +115,9 @@ static int pix24bpp = 0;
 #define TRIDENT_VERSION 4000
 #define TRIDENT_NAME "TRIDENT"
 #define TRIDENT_DRIVER_NAME "trident"
-#define TRIDENT_MAJOR_VERSION 1
-#define TRIDENT_MINOR_VERSION 2
-#define TRIDENT_PATCHLEVEL 3
+#define TRIDENT_MAJOR_VERSION PACKAGE_VERSION_MAJOR
+#define TRIDENT_MINOR_VERSION PACKAGE_VERSION_MINOR
+#define TRIDENT_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
 
 /* 
  * This contains the functions needed by the server after loading the driver


Reply to: