[arch-commits] Commit in xf86-video-tdfx/repos (6 files)
Laurent Carlier
lcarlier at archlinux.org
Thu Feb 5 21:43:05 UTC 2015
Date: Thursday, February 5, 2015 @ 22:43:05
Author: lcarlier
Revision: 230865
archrelease: copy trunk to staging-i686, staging-x86_64
Added:
xf86-video-tdfx/repos/staging-i686/
xf86-video-tdfx/repos/staging-i686/PKGBUILD
(from rev 230864, xf86-video-tdfx/trunk/PKGBUILD)
xf86-video-tdfx/repos/staging-i686/git-fixes.patch
(from rev 230864, xf86-video-tdfx/trunk/git-fixes.patch)
xf86-video-tdfx/repos/staging-x86_64/
xf86-video-tdfx/repos/staging-x86_64/PKGBUILD
(from rev 230864, xf86-video-tdfx/trunk/PKGBUILD)
xf86-video-tdfx/repos/staging-x86_64/git-fixes.patch
(from rev 230864, xf86-video-tdfx/trunk/git-fixes.patch)
--------------------------------+
staging-i686/PKGBUILD | 37 +++
staging-i686/git-fixes.patch | 420 +++++++++++++++++++++++++++++++++++++++
staging-x86_64/PKGBUILD | 37 +++
staging-x86_64/git-fixes.patch | 420 +++++++++++++++++++++++++++++++++++++++
4 files changed, 914 insertions(+)
Copied: xf86-video-tdfx/repos/staging-i686/PKGBUILD (from rev 230864, xf86-video-tdfx/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD (rev 0)
+++ staging-i686/PKGBUILD 2015-02-05 21:43:05 UTC (rev 230865)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=xf86-video-tdfx
+pkgver=1.4.5
+pkgrel=6
+pkgdesc="X.org tdfx video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=19')
+conflicts=('xorg-server<1.16' 'X-ABI-VIDEODRV_VERSION<19' 'X-ABI-VIDEODRV_VERSION>=20')
+optdepends=('tdfx-dri: DRI1 support from community repo')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 git-fixes.patch)
+sha256sums=('70d5fbadfb60fc25e4f90f2a1aad258f64fa3953efbc1059103a8d845870d859'
+ '8e63c17584d4e2afed2ce496de3270f0c99460eab2923dce123a072026542cc3')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/git-fixes.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
Copied: xf86-video-tdfx/repos/staging-i686/git-fixes.patch (from rev 230864, xf86-video-tdfx/trunk/git-fixes.patch)
===================================================================
--- staging-i686/git-fixes.patch (rev 0)
+++ staging-i686/git-fixes.patch 2015-02-05 21:43:05 UTC (rev 230865)
@@ -0,0 +1,420 @@
+From 10498d2730c651eb7a1890eb9e728269732e9dad Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Tue, 25 Sep 2012 12:54:59 +0000
+Subject: Remove mibstore.h
+
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index ddd5431..412da07 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -62,10 +62,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ #include "compiler.h"
+
+-/* Drivers using the mi implementation of backing store need: */
+-
+-#include "mibstore.h"
+-
+ /* All drivers using the vgahw module need this */
+ /* This driver needs to be modified to not use vgaHW for multihead operation */
+ #include "vgaHW.h"
+@@ -2373,7 +2369,6 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) {
+ }
+ }
+
+- miInitializeBackingStore(pScreen);
+ xf86SetBackingStore(pScreen);
+ xf86SetSilkenMouse(pScreen);
+
+--
+cgit v0.9.0.2-2-gbebe
+From 457bd576a4895f0d3a65e550dbe2470177bf650d Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 18:52:01 +0200
+Subject: Define local PCI IDs instead of using xf86PciInfo.h
+
+The header file is deprecated and issues a warning now. Stop using
+it, and move the definitions to the local tree as recommended by the
+warning.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index 7782473..7e3be81 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -12,7 +12,6 @@
+ #include <string.h>
+ #include <stdio.h>
+
+-#include "xf86PciInfo.h"
+ #include "xf86Pci.h"
+ #include "xf86DDC.h"
+ #include "xf86xv.h"
+@@ -73,6 +72,17 @@
+ (p)->memBase[region]
+ #endif
+
++#define PCI_VENDOR_3DFX 0x121A
++
++#define PCI_CHIP_VOODOO_GRAPHICS 0x0001
++#define PCI_CHIP_VOODOO2 0x0002
++#define PCI_CHIP_BANSHEE 0x0003
++#define PCI_CHIP_VOODOO3 0x0005
++#define PCI_CHIP_VOODOO5 0x0009
++
++#define PCI_CARD_VOODOO3_2000 0x0036
++#define PCI_CARD_VOODOO3_3000 0x003A
++
+ struct _TDFXRec;
+ typedef struct _TDFXRec *TDFXPtr;
+
+diff --git a/src/tdfx_accel.c b/src/tdfx_accel.c
+index 65933b4..e62e193 100644
+--- a/src/tdfx_accel.c
++++ b/src/tdfx_accel.c
+@@ -11,9 +11,6 @@
+ /* Drivers that need to access the PCI config space directly need this */
+ #include "xf86Pci.h"
+
+-/* Drivers for PCI hardware need this */
+-#include "xf86PciInfo.h"
+-
+ /* Drivers that use XAA need this */
+ #ifdef HAVE_XAA_H
+ #include "xaalocal.h"
+diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
+index 76064c3..87ec0e8 100644
+--- a/src/tdfx_dri.c
++++ b/src/tdfx_dri.c
+@@ -5,7 +5,6 @@
+
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+-#include "xf86PciInfo.h"
+ #include "xf86Pci.h"
+ #include "fb.h"
+ #include "miline.h"
+--
+cgit v0.10.2
+From 646137de571a9df950d3a3edb454803268fd5f98 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 19:06:31 +0200
+Subject: Rename XSERVER_PCIACCESS to XSERVER_LIBPCIACCESS
+
+Using the wrong macro name means that the code uses an obsolete typedef
+that issues warnings.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index 7e3be81..d8a72db 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -226,7 +226,7 @@ typedef struct _TDFXRec {
+ unsigned long MMIOAddr[MAXCHIPS];
+ EntityInfoPtr pEnt;
+ int numChips;
+-#ifndef XSERVER_PCIACCESS
++#ifndef XSERVER_LIBPCIACCESS
+ PCITAG PciTag[MAXCHIPS];
+ #endif
+ Bool Primary;
+--
+cgit v0.10.2
+From 774461a4ac92c39c3b3ec975a887540dfa791eae Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 19:20:11 +0200
+Subject: Use new pci_device_(un)map_range functions instead of deprecated ones
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 412da07..6bc123b 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -1253,11 +1253,11 @@ TDFXMapMem(ScrnInfoPtr pScrn)
+ * FIXME: don't have any such hardware to test.
+ */
+ for (i = 0; i < pTDFX->numChips; i++) {
+- err = pci_device_map_memory_range(pTDFX->PciInfo[i],
+- pTDFX->MMIOAddr[i],
+- TDFXIOMAPSIZE,
+- TRUE,
+- & pTDFX->MMIOBase[i]);
++ err = pci_device_map_range(pTDFX->PciInfo[i],
++ pTDFX->MMIOAddr[i],
++ TDFXIOMAPSIZE,
++ PCI_DEV_MAP_FLAG_WRITABLE,
++ & pTDFX->MMIOBase[i]);
+ if (err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to map MMIO region for card %u (%d).\n",
+@@ -1267,11 +1267,11 @@ TDFXMapMem(ScrnInfoPtr pScrn)
+ }
+
+
+- err = pci_device_map_memory_range(pTDFX->PciInfo[0],
+- pTDFX->LinearAddr[0],
+- pTDFX->FbMapSize,
+- TRUE,
+- & pTDFX->FbBase);
++ err = pci_device_map_range(pTDFX->PciInfo[0],
++ pTDFX->LinearAddr[0],
++ pTDFX->FbMapSize,
++ PCI_DEV_MAP_FLAG_WRITABLE,
++ & pTDFX->FbBase);
+ if (err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to map framebuffer (%d).\n", err);
+@@ -1307,8 +1307,12 @@ TDFXUnmapMem(ScrnInfoPtr pScrn)
+ pTDFX = TDFXPTR(pScrn);
+
+ #ifdef XSERVER_LIBPCIACCESS
+- pci_device_unmap_region(pTDFX->PciInfo[0], 0);
+- pci_device_unmap_region(pTDFX->PciInfo[0], 1);
++ pci_device_unmap_range(pTDFX->PciInfo[0],
++ pTDFX->FbBase,
++ pTDFX->FbMapSize);
++ pci_device_unmap_range(pTDFX->PciInfo[0],
++ pTDFX->MMIOBase[0],
++ TDFXIOMAPSIZE);
+
+ (void) memset(pTDFX->MMIOBase, 0, sizeof(pTDFX->MMIOBase));
+ pTDFX->FbBase = NULL;
+--
+cgit v0.10.2
+From 58b2ac6dd1487580f49869f582a8852b003a34fa Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Tue, 1 Oct 2013 05:36:34 +0200
+Subject: Remove unreachable breaks after return statements
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 6bc123b..7e76814 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -2585,14 +2585,11 @@ TDFXValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
+ switch (pTDFX->ChipType) {
+ case PCI_CHIP_BANSHEE:
+ return MODE_BAD;
+- break;
+ case PCI_CHIP_VOODOO3:
+ case PCI_CHIP_VOODOO5:
+ return MODE_OK;
+- break;
+ default:
+ return MODE_BAD;
+- break;
+ }
+ }
+ /* In clock doubled mode widths must be divisible by 16 instead of 8 */
+--
+cgit v0.10.2
+From 828c151064083e4488a4cb3854f8dcb23265e5cb Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Wed, 2 Oct 2013 21:22:33 +0200
+Subject: Use the PCI ID macros instead of hardcoded values
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 7e76814..130c066 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -149,15 +149,15 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
+
+ #ifdef XSERVER_LIBPCIACCESS
+ #define TDFX_DEVICE_MATCH(d, sub, i) \
+- { 0x121A, (d), PCI_MATCH_ANY, (sub), 0, 0, (i) }
++ { PCI_VENDOR_3DFX, (d), PCI_MATCH_ANY, (sub), 0, 0, (i) }
+
+ static const struct pci_id_match tdfx_device_match[] = {
+ TDFX_DEVICE_MATCH(PCI_CHIP_BANSHEE, PCI_MATCH_ANY, Banshee),
+
+ /* There are *many* missing PCI IDs here.
+ */
+- TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, 0x0036, Voodoo3_2000),
+- TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, 0x003A, Voodoo3_3000),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_2000, Voodoo3_2000),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_3000, Voodoo3_3000),
+
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_MATCH_ANY, Voodoo3_Unknown),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO5, PCI_MATCH_ANY, Voodoo5),
+--
+cgit v0.10.2
+From b15c1e8ef9858c85ead44ded22c7d48bd8ffa501 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Thu, 3 Oct 2013 14:25:45 +0200
+Subject: Unmap MMIO ranges for all chips
+
+This is relevant on SLI setups, where each chip has their own MMIO
+range.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 130c066..bcd674f 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -1310,9 +1310,12 @@ TDFXUnmapMem(ScrnInfoPtr pScrn)
+ pci_device_unmap_range(pTDFX->PciInfo[0],
+ pTDFX->FbBase,
+ pTDFX->FbMapSize);
+- pci_device_unmap_range(pTDFX->PciInfo[0],
+- pTDFX->MMIOBase[0],
+- TDFXIOMAPSIZE);
++
++ for (i = 0; i < pTDFX->numChips; i++) {
++ pci_device_unmap_range(pTDFX->PciInfo[i],
++ pTDFX->MMIOBase[i],
++ TDFXIOMAPSIZE);
++ }
+
+ (void) memset(pTDFX->MMIOBase, 0, sizeof(pTDFX->MMIOBase));
+ pTDFX->FbBase = NULL;
+--
+cgit v0.10.2
+From d8873445199bf1d229503ff1d12c6a2f3f23c863 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Thu, 3 Oct 2013 15:35:05 +0200
+Subject: Add more PCI IDs for supported chips
+
+Add support for Velocity and Voodoo4 chips.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index d8a72db..38a7ad3 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -77,7 +77,9 @@
+ #define PCI_CHIP_VOODOO_GRAPHICS 0x0001
+ #define PCI_CHIP_VOODOO2 0x0002
+ #define PCI_CHIP_BANSHEE 0x0003
++#define PCI_CHIP_VELOCITY 0x0004
+ #define PCI_CHIP_VOODOO3 0x0005
++#define PCI_CHIP_VOODOO4 0x0007
+ #define PCI_CHIP_VOODOO5 0x0009
+
+ #define PCI_CARD_VOODOO3_2000 0x0036
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index bcd674f..03fa165 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -154,12 +154,15 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
+ static const struct pci_id_match tdfx_device_match[] = {
+ TDFX_DEVICE_MATCH(PCI_CHIP_BANSHEE, PCI_MATCH_ANY, Banshee),
+
++ TDFX_DEVICE_MATCH(PCI_CHIP_VELOCITY, PCI_MATCH_ANY, Voodoo3_Unknown),
++
+ /* There are *many* missing PCI IDs here.
+ */
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_2000, Voodoo3_2000),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_3000, Voodoo3_3000),
+
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_MATCH_ANY, Voodoo3_Unknown),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO4, PCI_MATCH_ANY, Voodoo5),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO5, PCI_MATCH_ANY, Voodoo5),
+ { 0, 0, 0 }
+ };
+@@ -198,7 +201,9 @@ _X_EXPORT DriverRec TDFX = {
+ /* Chipsets */
+ static SymTabRec TDFXChipsets[] = {
+ { PCI_CHIP_BANSHEE, "3dfx Banshee"},
++ { PCI_CHIP_VELOCITY, "3dfx Velocity"},
+ { PCI_CHIP_VOODOO3, "3dfx Voodoo3"},
++ { PCI_CHIP_VOODOO4, "3dfx Voodoo4"},
+ { PCI_CHIP_VOODOO5, "3dfx Voodoo5"},
+ { -1, NULL }
+ };
+@@ -206,7 +211,9 @@ static SymTabRec TDFXChipsets[] = {
+ #ifndef XSERVER_LIBPCIACCESS
+ static PciChipsets TDFXPciChipsets[] = {
+ { PCI_CHIP_BANSHEE, PCI_CHIP_BANSHEE, RES_SHARED_VGA },
++ { PCI_CHIP_VELOCITY, PCI_CHIP_VELOCITY, RES_SHARED_VGA },
+ { PCI_CHIP_VOODOO3, PCI_CHIP_VOODOO3, RES_SHARED_VGA },
++ { PCI_CHIP_VOODOO4, PCI_CHIP_VOODOO4, RES_SHARED_VGA },
+ { PCI_CHIP_VOODOO5, PCI_CHIP_VOODOO5, RES_SHARED_VGA },
+ { -1, -1, RES_UNDEFINED }
+ };
+@@ -1050,6 +1057,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ case PCI_CHIP_BANSHEE:
+ pTDFX->MaxClock = 270000;
+ break;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
+ switch(match->subsysCard) {
+ case PCI_CARD_VOODOO3_2000:
+@@ -1063,6 +1071,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ break;
+ }
+ break;
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ pTDFX->MaxClock = 350000;
+ break;
+@@ -1078,7 +1087,9 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ case PCI_CHIP_BANSHEE:
+ clockRanges->interlaceAllowed = FALSE;
+ break;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ clockRanges->interlaceAllowed = TRUE;
+ break;
+@@ -2267,7 +2278,7 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) {
+ }
+
+ scanlines = (pTDFX->backOffset - pTDFX->fbOffset) / pTDFX->stride;
+- if(pTDFX->ChipType < PCI_CHIP_VOODOO5) {
++ if(pTDFX->ChipType < PCI_CHIP_VOODOO4) {
+ if (scanlines > 2047)
+ scanlines = 2047;
+ } else {
+@@ -2588,7 +2599,9 @@ TDFXValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
+ switch (pTDFX->ChipType) {
+ case PCI_CHIP_BANSHEE:
+ return MODE_BAD;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ return MODE_OK;
+ default:
+--
+cgit v0.10.2
+From 2f71b05e29ae13a0fb6fbc74f4f76c78b6ddb0d7 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Tue, 29 Jul 2014 09:15:49 -0400
+Subject: dri: Stop (uselessly) initializing the ValidateTree hooks
+
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
+index 87ec0e8..981867a 100644
+--- a/src/tdfx_dri.c
++++ b/src/tdfx_dri.c
+@@ -361,8 +361,6 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
+ pDRIInfo->frameBufferStride = pTDFX->stride;
+ pDRIInfo->ddxDrawableTableEntry = TDFX_MAX_DRAWABLES;
+
+- pDRIInfo->wrap.ValidateTree = 0;
+- pDRIInfo->wrap.PostValidateTree = 0;
+ pTDFX->coreBlockHandler = pDRIInfo->wrap.BlockHandler;
+ pDRIInfo->wrap.BlockHandler = TDFXDoBlockHandler;
+ pTDFX->coreWakeupHandler = pDRIInfo->wrap.WakeupHandler;
+--
+cgit v0.10.2
+
Copied: xf86-video-tdfx/repos/staging-x86_64/PKGBUILD (from rev 230864, xf86-video-tdfx/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2015-02-05 21:43:05 UTC (rev 230865)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=xf86-video-tdfx
+pkgver=1.4.5
+pkgrel=6
+pkgdesc="X.org tdfx video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=19')
+conflicts=('xorg-server<1.16' 'X-ABI-VIDEODRV_VERSION<19' 'X-ABI-VIDEODRV_VERSION>=20')
+optdepends=('tdfx-dri: DRI1 support from community repo')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 git-fixes.patch)
+sha256sums=('70d5fbadfb60fc25e4f90f2a1aad258f64fa3953efbc1059103a8d845870d859'
+ '8e63c17584d4e2afed2ce496de3270f0c99460eab2923dce123a072026542cc3')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/git-fixes.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
Copied: xf86-video-tdfx/repos/staging-x86_64/git-fixes.patch (from rev 230864, xf86-video-tdfx/trunk/git-fixes.patch)
===================================================================
--- staging-x86_64/git-fixes.patch (rev 0)
+++ staging-x86_64/git-fixes.patch 2015-02-05 21:43:05 UTC (rev 230865)
@@ -0,0 +1,420 @@
+From 10498d2730c651eb7a1890eb9e728269732e9dad Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Tue, 25 Sep 2012 12:54:59 +0000
+Subject: Remove mibstore.h
+
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index ddd5431..412da07 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -62,10 +62,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ #include "compiler.h"
+
+-/* Drivers using the mi implementation of backing store need: */
+-
+-#include "mibstore.h"
+-
+ /* All drivers using the vgahw module need this */
+ /* This driver needs to be modified to not use vgaHW for multihead operation */
+ #include "vgaHW.h"
+@@ -2373,7 +2369,6 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) {
+ }
+ }
+
+- miInitializeBackingStore(pScreen);
+ xf86SetBackingStore(pScreen);
+ xf86SetSilkenMouse(pScreen);
+
+--
+cgit v0.9.0.2-2-gbebe
+From 457bd576a4895f0d3a65e550dbe2470177bf650d Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 18:52:01 +0200
+Subject: Define local PCI IDs instead of using xf86PciInfo.h
+
+The header file is deprecated and issues a warning now. Stop using
+it, and move the definitions to the local tree as recommended by the
+warning.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index 7782473..7e3be81 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -12,7 +12,6 @@
+ #include <string.h>
+ #include <stdio.h>
+
+-#include "xf86PciInfo.h"
+ #include "xf86Pci.h"
+ #include "xf86DDC.h"
+ #include "xf86xv.h"
+@@ -73,6 +72,17 @@
+ (p)->memBase[region]
+ #endif
+
++#define PCI_VENDOR_3DFX 0x121A
++
++#define PCI_CHIP_VOODOO_GRAPHICS 0x0001
++#define PCI_CHIP_VOODOO2 0x0002
++#define PCI_CHIP_BANSHEE 0x0003
++#define PCI_CHIP_VOODOO3 0x0005
++#define PCI_CHIP_VOODOO5 0x0009
++
++#define PCI_CARD_VOODOO3_2000 0x0036
++#define PCI_CARD_VOODOO3_3000 0x003A
++
+ struct _TDFXRec;
+ typedef struct _TDFXRec *TDFXPtr;
+
+diff --git a/src/tdfx_accel.c b/src/tdfx_accel.c
+index 65933b4..e62e193 100644
+--- a/src/tdfx_accel.c
++++ b/src/tdfx_accel.c
+@@ -11,9 +11,6 @@
+ /* Drivers that need to access the PCI config space directly need this */
+ #include "xf86Pci.h"
+
+-/* Drivers for PCI hardware need this */
+-#include "xf86PciInfo.h"
+-
+ /* Drivers that use XAA need this */
+ #ifdef HAVE_XAA_H
+ #include "xaalocal.h"
+diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
+index 76064c3..87ec0e8 100644
+--- a/src/tdfx_dri.c
++++ b/src/tdfx_dri.c
+@@ -5,7 +5,6 @@
+
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+-#include "xf86PciInfo.h"
+ #include "xf86Pci.h"
+ #include "fb.h"
+ #include "miline.h"
+--
+cgit v0.10.2
+From 646137de571a9df950d3a3edb454803268fd5f98 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 19:06:31 +0200
+Subject: Rename XSERVER_PCIACCESS to XSERVER_LIBPCIACCESS
+
+Using the wrong macro name means that the code uses an obsolete typedef
+that issues warnings.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index 7e3be81..d8a72db 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -226,7 +226,7 @@ typedef struct _TDFXRec {
+ unsigned long MMIOAddr[MAXCHIPS];
+ EntityInfoPtr pEnt;
+ int numChips;
+-#ifndef XSERVER_PCIACCESS
++#ifndef XSERVER_LIBPCIACCESS
+ PCITAG PciTag[MAXCHIPS];
+ #endif
+ Bool Primary;
+--
+cgit v0.10.2
+From 774461a4ac92c39c3b3ec975a887540dfa791eae Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Fri, 27 Sep 2013 19:20:11 +0200
+Subject: Use new pci_device_(un)map_range functions instead of deprecated ones
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 412da07..6bc123b 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -1253,11 +1253,11 @@ TDFXMapMem(ScrnInfoPtr pScrn)
+ * FIXME: don't have any such hardware to test.
+ */
+ for (i = 0; i < pTDFX->numChips; i++) {
+- err = pci_device_map_memory_range(pTDFX->PciInfo[i],
+- pTDFX->MMIOAddr[i],
+- TDFXIOMAPSIZE,
+- TRUE,
+- & pTDFX->MMIOBase[i]);
++ err = pci_device_map_range(pTDFX->PciInfo[i],
++ pTDFX->MMIOAddr[i],
++ TDFXIOMAPSIZE,
++ PCI_DEV_MAP_FLAG_WRITABLE,
++ & pTDFX->MMIOBase[i]);
+ if (err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to map MMIO region for card %u (%d).\n",
+@@ -1267,11 +1267,11 @@ TDFXMapMem(ScrnInfoPtr pScrn)
+ }
+
+
+- err = pci_device_map_memory_range(pTDFX->PciInfo[0],
+- pTDFX->LinearAddr[0],
+- pTDFX->FbMapSize,
+- TRUE,
+- & pTDFX->FbBase);
++ err = pci_device_map_range(pTDFX->PciInfo[0],
++ pTDFX->LinearAddr[0],
++ pTDFX->FbMapSize,
++ PCI_DEV_MAP_FLAG_WRITABLE,
++ & pTDFX->FbBase);
+ if (err) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Unable to map framebuffer (%d).\n", err);
+@@ -1307,8 +1307,12 @@ TDFXUnmapMem(ScrnInfoPtr pScrn)
+ pTDFX = TDFXPTR(pScrn);
+
+ #ifdef XSERVER_LIBPCIACCESS
+- pci_device_unmap_region(pTDFX->PciInfo[0], 0);
+- pci_device_unmap_region(pTDFX->PciInfo[0], 1);
++ pci_device_unmap_range(pTDFX->PciInfo[0],
++ pTDFX->FbBase,
++ pTDFX->FbMapSize);
++ pci_device_unmap_range(pTDFX->PciInfo[0],
++ pTDFX->MMIOBase[0],
++ TDFXIOMAPSIZE);
+
+ (void) memset(pTDFX->MMIOBase, 0, sizeof(pTDFX->MMIOBase));
+ pTDFX->FbBase = NULL;
+--
+cgit v0.10.2
+From 58b2ac6dd1487580f49869f582a8852b003a34fa Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Tue, 1 Oct 2013 05:36:34 +0200
+Subject: Remove unreachable breaks after return statements
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 6bc123b..7e76814 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -2585,14 +2585,11 @@ TDFXValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
+ switch (pTDFX->ChipType) {
+ case PCI_CHIP_BANSHEE:
+ return MODE_BAD;
+- break;
+ case PCI_CHIP_VOODOO3:
+ case PCI_CHIP_VOODOO5:
+ return MODE_OK;
+- break;
+ default:
+ return MODE_BAD;
+- break;
+ }
+ }
+ /* In clock doubled mode widths must be divisible by 16 instead of 8 */
+--
+cgit v0.10.2
+From 828c151064083e4488a4cb3854f8dcb23265e5cb Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Wed, 2 Oct 2013 21:22:33 +0200
+Subject: Use the PCI ID macros instead of hardcoded values
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 7e76814..130c066 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -149,15 +149,15 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
+
+ #ifdef XSERVER_LIBPCIACCESS
+ #define TDFX_DEVICE_MATCH(d, sub, i) \
+- { 0x121A, (d), PCI_MATCH_ANY, (sub), 0, 0, (i) }
++ { PCI_VENDOR_3DFX, (d), PCI_MATCH_ANY, (sub), 0, 0, (i) }
+
+ static const struct pci_id_match tdfx_device_match[] = {
+ TDFX_DEVICE_MATCH(PCI_CHIP_BANSHEE, PCI_MATCH_ANY, Banshee),
+
+ /* There are *many* missing PCI IDs here.
+ */
+- TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, 0x0036, Voodoo3_2000),
+- TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, 0x003A, Voodoo3_3000),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_2000, Voodoo3_2000),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_3000, Voodoo3_3000),
+
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_MATCH_ANY, Voodoo3_Unknown),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO5, PCI_MATCH_ANY, Voodoo5),
+--
+cgit v0.10.2
+From b15c1e8ef9858c85ead44ded22c7d48bd8ffa501 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Thu, 3 Oct 2013 14:25:45 +0200
+Subject: Unmap MMIO ranges for all chips
+
+This is relevant on SLI setups, where each chip has their own MMIO
+range.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 130c066..bcd674f 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -1310,9 +1310,12 @@ TDFXUnmapMem(ScrnInfoPtr pScrn)
+ pci_device_unmap_range(pTDFX->PciInfo[0],
+ pTDFX->FbBase,
+ pTDFX->FbMapSize);
+- pci_device_unmap_range(pTDFX->PciInfo[0],
+- pTDFX->MMIOBase[0],
+- TDFXIOMAPSIZE);
++
++ for (i = 0; i < pTDFX->numChips; i++) {
++ pci_device_unmap_range(pTDFX->PciInfo[i],
++ pTDFX->MMIOBase[i],
++ TDFXIOMAPSIZE);
++ }
+
+ (void) memset(pTDFX->MMIOBase, 0, sizeof(pTDFX->MMIOBase));
+ pTDFX->FbBase = NULL;
+--
+cgit v0.10.2
+From d8873445199bf1d229503ff1d12c6a2f3f23c863 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Thu, 3 Oct 2013 15:35:05 +0200
+Subject: Add more PCI IDs for supported chips
+
+Add support for Velocity and Voodoo4 chips.
+
+Signed-off-by: Guillem Jover <guillem at hadrons.org>
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx.h b/src/tdfx.h
+index d8a72db..38a7ad3 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -77,7 +77,9 @@
+ #define PCI_CHIP_VOODOO_GRAPHICS 0x0001
+ #define PCI_CHIP_VOODOO2 0x0002
+ #define PCI_CHIP_BANSHEE 0x0003
++#define PCI_CHIP_VELOCITY 0x0004
+ #define PCI_CHIP_VOODOO3 0x0005
++#define PCI_CHIP_VOODOO4 0x0007
+ #define PCI_CHIP_VOODOO5 0x0009
+
+ #define PCI_CARD_VOODOO3_2000 0x0036
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index bcd674f..03fa165 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -154,12 +154,15 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
+ static const struct pci_id_match tdfx_device_match[] = {
+ TDFX_DEVICE_MATCH(PCI_CHIP_BANSHEE, PCI_MATCH_ANY, Banshee),
+
++ TDFX_DEVICE_MATCH(PCI_CHIP_VELOCITY, PCI_MATCH_ANY, Voodoo3_Unknown),
++
+ /* There are *many* missing PCI IDs here.
+ */
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_2000, Voodoo3_2000),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_3000, Voodoo3_3000),
+
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_MATCH_ANY, Voodoo3_Unknown),
++ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO4, PCI_MATCH_ANY, Voodoo5),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO5, PCI_MATCH_ANY, Voodoo5),
+ { 0, 0, 0 }
+ };
+@@ -198,7 +201,9 @@ _X_EXPORT DriverRec TDFX = {
+ /* Chipsets */
+ static SymTabRec TDFXChipsets[] = {
+ { PCI_CHIP_BANSHEE, "3dfx Banshee"},
++ { PCI_CHIP_VELOCITY, "3dfx Velocity"},
+ { PCI_CHIP_VOODOO3, "3dfx Voodoo3"},
++ { PCI_CHIP_VOODOO4, "3dfx Voodoo4"},
+ { PCI_CHIP_VOODOO5, "3dfx Voodoo5"},
+ { -1, NULL }
+ };
+@@ -206,7 +211,9 @@ static SymTabRec TDFXChipsets[] = {
+ #ifndef XSERVER_LIBPCIACCESS
+ static PciChipsets TDFXPciChipsets[] = {
+ { PCI_CHIP_BANSHEE, PCI_CHIP_BANSHEE, RES_SHARED_VGA },
++ { PCI_CHIP_VELOCITY, PCI_CHIP_VELOCITY, RES_SHARED_VGA },
+ { PCI_CHIP_VOODOO3, PCI_CHIP_VOODOO3, RES_SHARED_VGA },
++ { PCI_CHIP_VOODOO4, PCI_CHIP_VOODOO4, RES_SHARED_VGA },
+ { PCI_CHIP_VOODOO5, PCI_CHIP_VOODOO5, RES_SHARED_VGA },
+ { -1, -1, RES_UNDEFINED }
+ };
+@@ -1050,6 +1057,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ case PCI_CHIP_BANSHEE:
+ pTDFX->MaxClock = 270000;
+ break;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
+ switch(match->subsysCard) {
+ case PCI_CARD_VOODOO3_2000:
+@@ -1063,6 +1071,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ break;
+ }
+ break;
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ pTDFX->MaxClock = 350000;
+ break;
+@@ -1078,7 +1087,9 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ case PCI_CHIP_BANSHEE:
+ clockRanges->interlaceAllowed = FALSE;
+ break;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ clockRanges->interlaceAllowed = TRUE;
+ break;
+@@ -2267,7 +2278,7 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) {
+ }
+
+ scanlines = (pTDFX->backOffset - pTDFX->fbOffset) / pTDFX->stride;
+- if(pTDFX->ChipType < PCI_CHIP_VOODOO5) {
++ if(pTDFX->ChipType < PCI_CHIP_VOODOO4) {
+ if (scanlines > 2047)
+ scanlines = 2047;
+ } else {
+@@ -2588,7 +2599,9 @@ TDFXValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
+ switch (pTDFX->ChipType) {
+ case PCI_CHIP_BANSHEE:
+ return MODE_BAD;
++ case PCI_CHIP_VELOCITY:
+ case PCI_CHIP_VOODOO3:
++ case PCI_CHIP_VOODOO4:
+ case PCI_CHIP_VOODOO5:
+ return MODE_OK;
+ default:
+--
+cgit v0.10.2
+From 2f71b05e29ae13a0fb6fbc74f4f76c78b6ddb0d7 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax at redhat.com>
+Date: Tue, 29 Jul 2014 09:15:49 -0400
+Subject: dri: Stop (uselessly) initializing the ValidateTree hooks
+
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+
+diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
+index 87ec0e8..981867a 100644
+--- a/src/tdfx_dri.c
++++ b/src/tdfx_dri.c
+@@ -361,8 +361,6 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
+ pDRIInfo->frameBufferStride = pTDFX->stride;
+ pDRIInfo->ddxDrawableTableEntry = TDFX_MAX_DRAWABLES;
+
+- pDRIInfo->wrap.ValidateTree = 0;
+- pDRIInfo->wrap.PostValidateTree = 0;
+ pTDFX->coreBlockHandler = pDRIInfo->wrap.BlockHandler;
+ pDRIInfo->wrap.BlockHandler = TDFXDoBlockHandler;
+ pTDFX->coreWakeupHandler = pDRIInfo->wrap.WakeupHandler;
+--
+cgit v0.10.2
+
More information about the arch-commits
mailing list