[xorg-x11-drv-tdfx] ABI rebuild tdfx-1.4.3-git.patch: Sync with git for new ABI

Adam Jackson ajax at fedoraproject.org
Wed Nov 9 21:34:37 UTC 2011


commit b38e78edb752c027e9c3a84107f279cf956708a7
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Nov 9 16:34:34 2011 -0500

    ABI rebuild
    tdfx-1.4.3-git.patch: Sync with git for new ABI

 tdfx-1.4.3-git.patch   |  715 ++++++++++++++++++++++++++++++++++++++++++++++++
 xorg-x11-drv-tdfx.spec |    8 +-
 2 files changed, 721 insertions(+), 2 deletions(-)
---
diff --git a/tdfx-1.4.3-git.patch b/tdfx-1.4.3-git.patch
new file mode 100644
index 0000000..464a5bf
--- /dev/null
+++ b/tdfx-1.4.3-git.patch
@@ -0,0 +1,715 @@
+diff --git a/COPYING b/COPYING
+index 7f33cbf..e590b95 100644
+--- a/COPYING
++++ b/COPYING
+@@ -1,12 +1,23 @@
+-This is a stub file.  This package has not yet had its complete licensing
+-information compiled.  Please see the individual source files for details on
+-your rights to use and modify this software.
++Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
++All Rights Reserved.
+ 
+-Please submit updated COPYING files to the Xorg bugzilla:
++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, sub license, 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:
+ 
+-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
++The above copyright notice and this permission notice (including the
++next paragraph) shall be included in all copies or substantial portions
++of the Software.
+ 
+-All licensing questions regarding this software should be directed at the
+-Xorg mailing list:
++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 NON-INFRINGEMENT.
++IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
+ 
+-http://lists.freedesktop.org/mailman/listinfo/xorg
+diff --git a/ChangeLog b/ChangeLog
+deleted file mode 100644
+index 2562102..0000000
+--- a/ChangeLog
++++ /dev/null
+@@ -1,76 +0,0 @@
+-2006-06-17  Donnie Berkholz  <spyderous at gentoo.org>
+-
+-	* src/tdfx_priv.c: (TDFXResetFifo), (TDFXSyncFifo):
+-	Bug #7149 <https://bugs.freedesktop.org/show_bug.cgi?id=7149>
+-	Change use of getsecs to xf86getsecs (Gustavo Pichorim Boiko).
+-
+-2006-04-07  Adam Jackson  <ajax at freedesktop.org>
+-
+-	* configure.ac:
+-	* src/tdfx.h:
+-	Bump to 1.2.1 for Xv changes.
+-
+-2006-04-07  Aaron Plattner  <aplattner at nvidia.com>
+-
+-	* src/tdfx_video.c: (TDFXPutImageTexture), (TDFXPutImageOverlay):
+-	Add a DrawablePtr argument to the XV functions to pave the way for
+-	redirected video.
+-
+-2006-04-07  Adam Jackson  <ajax at freedesktop.org>
+-
+-	* configure.ac:
+-	* src/tdfx.h:
+-	* src/tdfx_accel.c:
+-	* src/tdfx_dga.c:
+-	* src/tdfx_dri.c:
+-	* src/tdfx_driver.c:
+-	* src/tdfx_hwcurs.c:
+-	* src/tdfx_io.c:
+-	* src/tdfx_priv.c:
+-	* src/tdfx_sli.c:
+-	Unlibcwrap.  Bump server version requirement.  Bump to 1.2.0.
+-
+-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Update package version for X11R7 release.
+-
+-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Update package version number for final X11R7 release candidate.
+-
+-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* man/Makefile.am:
+-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+-
+-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Update package version number for X11R7 RC3 release.
+-
+-2005-12-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Remove extraneous AC_MSG_RESULT.
+-
+-2005-11-20  Adam Jackson  <ajax at freedesktop.org>
+-
+-	* configure.ac:
+-	Bump libdrm dep to 2.0.
+-
+-2005-11-29  Adam Jackson  <ajax at freedesktop.org>
+-
+-	* configure.ac:
+-	Only build dlloader modules by default.
+-
+-2005-11-09  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Update package version number for X11R7 RC2 release.
+-
+-2005-11-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
+-
+-	* configure.ac:
+-	Update pkgcheck dependencies to work with separate build roots.
+diff --git a/Makefile.am b/Makefile.am
+index 7052905..00c154d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,5 +18,14 @@
+ #  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.
+ 
+-AUTOMAKE_OPTIONS = foreign
+ SUBDIRS = src man
++MAINTAINERCLEANFILES = ChangeLog INSTALL
++.PHONY: ChangeLog INSTALL
++
++INSTALL:
++	$(INSTALL_CMD)
++
++ChangeLog:
++	$(CHANGELOG_CMD)
++
++dist-hook: ChangeLog INSTALL
+diff --git a/configure.ac b/configure.ac
+index f2949ea..33ed17c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,47 +20,53 @@
+ #
+ # Process this file with autoconf to produce a configure script
+ 
+-AC_PREREQ(2.57)
++# Initialize Autoconf
++AC_PREREQ([2.60])
+ AC_INIT([xf86-video-tdfx],
+-        1.4.3,
++        [1.4.3],
+         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
+-        xf86-video-tdfx)
+-
++        [xf86-video-tdfx])
+ AC_CONFIG_SRCDIR([Makefile.am])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_AUX_DIR(.)
+ 
+-AM_INIT_AUTOMAKE([dist-bzip2])
+-
++# Initialize Automake
++AM_INIT_AUTOMAKE([foreign dist-bzip2])
+ AM_MAINTAINER_MODE
+ 
+-# Checks for programs.
++# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
++m4_ifndef([XORG_MACROS_VERSION],
++          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
++XORG_MACROS_VERSION(1.8)
++XORG_DEFAULT_OPTIONS
++
++# Initialize libtool
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-AC_PROG_CC
+ 
+ AH_TOP([#include "xorg-server.h"])
+ 
++# Define a configure option for an alternate module directory
+ AC_ARG_WITH(xorg-module-dir,
+-            AC_HELP_STRING([--with-xorg-module-dir=DIR],
++            AS_HELP_STRING([--with-xorg-module-dir=DIR],
+                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+             [moduledir="$withval"],
+             [moduledir="$libdir/xorg/modules"])
+ 
+-AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
++AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri],
+                                   [Disable DRI support [[default=auto]]]),
+               [DRI="$enableval"],
+               [DRI=auto])
+ 
+-# Checks for extensions
++# Store the list of server defined optional extensions in REQUIRED_MODULES
+ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
+ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
+ 
+-# Checks for pkg-config packages
++# Obtain compiler/linker options for the driver dependencies
+ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
+-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
++sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+ 
+ # Checks for libraries.
+ SAVE_CPPFLAGS="$CPPFLAGS"
+@@ -70,9 +76,6 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ 	      [#include "xorg-server.h"])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ 
+-# Checks for header files.
+-AC_HEADER_STDC
+-
+ if test "$DRI" != no; then
+         AC_CHECK_FILE([${sdkdir}/dri.h],
+                       [have_dri_h="yes"], [have_dri_h="no"])
+@@ -107,18 +110,14 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ fi
+ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+ 
+-AC_SUBST([DRI_CFLAGS])
+-AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([moduledir])
+ 
+ DRIVER_NAME=tdfx
+ AC_SUBST([DRIVER_NAME])
+ 
+-XORG_MANPAGE_SECTIONS
+-XORG_RELEASE_VERSION
+-
+-AC_OUTPUT([
+-	Makefile
+-	src/Makefile
+-	man/Makefile
++AC_CONFIG_FILES([
++                Makefile
++                src/Makefile
++                man/Makefile
+ ])
++AC_OUTPUT
+diff --git a/man/Makefile.am b/man/Makefile.am
+index f0eb29b..b3688ce 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -1,27 +1,24 @@
+ #
+ # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+-# 
+-# Permission to use, copy, modify, distribute, and sell this software and its
+-# documentation for any purpose is hereby granted without fee, provided that
+-# the above copyright notice appear in all copies and that both that
+-# copyright notice and this permission notice appear in supporting
+-# documentation.
+-# 
+-# The above copyright notice and this permission notice 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 OPEN GROUP 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.
+-# 
+-# Except as contained in this notice, the name of the copyright holders shall
+-# not be used in advertising or otherwise to promote the sale, use or
+-# other dealings in this Software without prior written authorization
+-# from the copyright holders.
++#
++# 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.
+ # 
+ 
+ drivermandir = $(DRIVER_MAN_DIR)
+@@ -34,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME at .man
+ 
+ CLEANFILES = $(driverman_DATA)
+ 
+-SED = sed
+ 
+-# Strings to replace in man pages
+-XORGRELSTRING = @PACKAGE_STRING@
+-  XORGMANNAME = X Version 11
++# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+ 
+-MAN_SUBSTS = \
+-	-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+-	-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+-	-e 's|__xservername__|Xorg|g' \
+-	-e 's|__xconfigfile__|xorg.conf|g' \
+-	-e 's|__projectroot__|$(prefix)|g' \
+-	-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+-	-e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
+-	-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+-	-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+-	-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+ 
+ SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
+ 
+ .man.$(DRIVER_MAN_SUFFIX):
+-	sed $(MAN_SUBSTS) < $< > $@
++	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+diff --git a/man/tdfx.man b/man/tdfx.man
+index e78bd48..bf9e809 100644
+--- a/man/tdfx.man
++++ b/man/tdfx.man
+@@ -1,4 +1,3 @@
+-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.man,v 1.2 2001/01/27 18:20:55 dawes Exp $ 
+ .\" shorthand for double quote that works everywhere.
+ .ds q \N'34'
+ .TH TDFX __drivermansuffix__ __vendorversion__
+diff --git a/src/tdfx.h b/src/tdfx.h
+index 15f6d11..dbdf4c6 100644
+--- a/src/tdfx.h
++++ b/src/tdfx.h
+@@ -191,7 +191,7 @@ typedef struct _TDFXRec {
+   unsigned char *FbBase;
+   unsigned char *myFbBase;
+ #endif
+-  IOADDRESS PIOBase[MAXCHIPS];
++  unsigned long PIOBase[MAXCHIPS];
+   long FbMapSize;
+   int pixelFormat;
+   int stride;
+diff --git a/src/tdfx_accel.c b/src/tdfx_accel.c
+index 6191aeb..c7aea8c 100644
+--- a/src/tdfx_accel.c
++++ b/src/tdfx_accel.c
+@@ -254,8 +254,8 @@ TDFXAccelInit(ScreenPtr pScreen)
+   infoPtr->ScreenToScreenCopyFlags = commonFlags;
+ 
+   /* When we're using the fifo we have to use indirect expansion */
+-  pTDFX->scanlineColorExpandBuffers[0] = xalloc((pScrn->virtualX+62)/32*4);
+-  pTDFX->scanlineColorExpandBuffers[1] = xalloc((pScrn->virtualX+62)/32*4);
++  pTDFX->scanlineColorExpandBuffers[0] = malloc((pScrn->virtualX+62)/32*4);
++  pTDFX->scanlineColorExpandBuffers[1] = malloc((pScrn->virtualX+62)/32*4);
+   infoPtr->NumScanlineColorExpandBuffers=2;
+   infoPtr->ScanlineColorExpandBuffers=pTDFX->scanlineColorExpandBuffers;
+   infoPtr->SetupForScanlineCPUToScreenColorExpandFill =
+diff --git a/src/tdfx_dga.c b/src/tdfx_dga.c
+index f88c09b..0fae286 100644
+--- a/src/tdfx_dga.c
++++ b/src/tdfx_dga.c
+@@ -48,10 +48,10 @@ TDFXDGAInit(ScreenPtr pScreen)
+   pMode = firstMode = pScrn->modes;
+ 
+   while (pMode) {
+-    newmodes = xrealloc(modes, (num+1)*sizeof(DGAModeRec));
++    newmodes = realloc(modes, (num+1)*sizeof(DGAModeRec));
+ 
+     if (!newmodes) {
+-      xfree(modes);
++      free(modes);
+       return FALSE;
+     }
+     modes = newmodes;
+diff --git a/src/tdfx_dri.c b/src/tdfx_dri.c
+index 220e910..f42e232 100644
+--- a/src/tdfx_dri.c
++++ b/src/tdfx_dri.c
+@@ -53,19 +53,19 @@ TDFXInitVisualConfigs(ScreenPtr pScreen)
+   case 16:
+     numConfigs = 16;
+ 
+-    if (!(pConfigs = (__GLXvisualConfig*)xcalloc(sizeof(__GLXvisualConfig),
++    if (!(pConfigs = (__GLXvisualConfig*)calloc(sizeof(__GLXvisualConfig),
+ 						   numConfigs))) {
+       return FALSE;
+     }
+-    if (!(pTDFXConfigs = (TDFXConfigPrivPtr)xcalloc(sizeof(TDFXConfigPrivRec),
++    if (!(pTDFXConfigs = (TDFXConfigPrivPtr)calloc(sizeof(TDFXConfigPrivRec),
+ 						     numConfigs))) {
+-      xfree(pConfigs);
++      free(pConfigs);
+       return FALSE;
+     }
+-    if (!(pTDFXConfigPtrs = (TDFXConfigPrivPtr*)xcalloc(sizeof(TDFXConfigPrivPtr),
++    if (!(pTDFXConfigPtrs = (TDFXConfigPrivPtr*)calloc(sizeof(TDFXConfigPrivPtr),
+ 							 numConfigs))) {
+-      xfree(pConfigs);
+-      xfree(pTDFXConfigs);
++      free(pConfigs);
++      free(pTDFXConfigs);
+       return FALSE;
+     }
+     for (i=0; i<numConfigs; i++)
+@@ -144,20 +144,20 @@ TDFXInitVisualConfigs(ScreenPtr pScreen)
+   case 32:
+     numConfigs = 8;
+ 
+-    pConfigs = (__GLXvisualConfig*) xcalloc(sizeof(__GLXvisualConfig), numConfigs);
++    pConfigs = (__GLXvisualConfig*) calloc(sizeof(__GLXvisualConfig), numConfigs);
+     if (!pConfigs)
+       return FALSE;
+ 
+-    pTDFXConfigs = (TDFXConfigPrivPtr) xcalloc(sizeof(TDFXConfigPrivRec), numConfigs);
++    pTDFXConfigs = (TDFXConfigPrivPtr) calloc(sizeof(TDFXConfigPrivRec), numConfigs);
+     if (!pTDFXConfigs) {
+-      xfree(pConfigs);
++      free(pConfigs);
+       return FALSE;
+     }
+ 
+-    pTDFXConfigPtrs = (TDFXConfigPrivPtr *) xcalloc(sizeof(TDFXConfigPrivPtr), numConfigs);
++    pTDFXConfigPtrs = (TDFXConfigPrivPtr *) calloc(sizeof(TDFXConfigPrivPtr), numConfigs);
+     if (!pTDFXConfigPtrs) {
+-      xfree(pConfigs);
+-      xfree(pTDFXConfigs);
++      free(pConfigs);
++      free(pTDFXConfigs);
+       return FALSE;
+     }
+ 
+@@ -350,7 +350,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
+   if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
+     pDRIInfo->busIdString = DRICreatePCIBusID(pTDFX->PciInfo);
+   } else {
+-    pDRIInfo->busIdString = xalloc(64);
++    pDRIInfo->busIdString = malloc(64);
+     sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
+ 	    ((pciConfigPtr)pTDFX->PciInfo->thisCard)->busnum,
+ 	    ((pciConfigPtr)pTDFX->PciInfo->thisCard)->devnum,
+@@ -395,7 +395,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
+   pDRIInfo->SAREASize = SAREA_MAX;
+ #endif
+ 
+-  if (!(pTDFXDRI = (TDFXDRIPtr)xcalloc(sizeof(TDFXDRIRec),1))) {
++  if (!(pTDFXDRI = (TDFXDRIPtr)calloc(sizeof(TDFXDRIRec),1))) {
+     xf86DrvMsg(pScreen->myNum, X_ERROR,
+                "[dri] DRI memory allocation failed, disabling DRI.\n");
+     DRIDestroyInfoRec(pTDFX->pDRIInfo);
+@@ -421,7 +421,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
+   pDRIInfo->createDummyCtxPriv = FALSE;
+ 
+   if (!DRIScreenInit(pScreen, pDRIInfo, &pTDFX->drmSubFD)) {
+-    xfree(pDRIInfo->devPrivate);
++    free(pDRIInfo->devPrivate);
+     pDRIInfo->devPrivate=0;
+     DRIDestroyInfoRec(pTDFX->pDRIInfo);
+     pTDFX->pDRIInfo=0;
+@@ -483,14 +483,14 @@ TDFXDRICloseScreen(ScreenPtr pScreen)
+ 
+   if (pTDFX->pDRIInfo) {
+     if (pTDFX->pDRIInfo->devPrivate) {
+-      xfree(pTDFX->pDRIInfo->devPrivate);
++      free(pTDFX->pDRIInfo->devPrivate);
+       pTDFX->pDRIInfo->devPrivate=0;
+     }
+     DRIDestroyInfoRec(pTDFX->pDRIInfo);
+     pTDFX->pDRIInfo=0;
+   }
+-  if (pTDFX->pVisualConfigs) xfree(pTDFX->pVisualConfigs);
+-  if (pTDFX->pVisualConfigsPriv) xfree(pTDFX->pVisualConfigsPriv);
++  if (pTDFX->pVisualConfigs) free(pTDFX->pVisualConfigs);
++  if (pTDFX->pVisualConfigsPriv) free(pTDFX->pVisualConfigsPriv);
+ }
+ 
+ static Bool
+diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
+index 8935505..673bbc7 100644
+--- a/src/tdfx_driver.c
++++ b/src/tdfx_driver.c
+@@ -306,7 +306,7 @@ static void
+ TDFXFreeRec(ScrnInfoPtr pScrn) {
+   if (!pScrn) return;
+   if (!pScrn->driverPrivate) return;
+-  xfree(pScrn->driverPrivate);
++  free(pScrn->driverPrivate);
+   pScrn->driverPrivate=0;
+ }
+ 
+@@ -429,7 +429,7 @@ TDFXProbe(DriverPtr drv, int flags)
+ 				  devSections, numDevSections,
+ 				  drv, &usedChips);
+ 
+-  xfree(devSections);
++  free(devSections);
+   if (numUsed<=0) return FALSE;
+ 
+   if (flags & PROBE_DETECT)
+@@ -457,7 +457,7 @@ TDFXProbe(DriverPtr drv, int flags)
+ 	foundScreen = TRUE;
+     }
+   }
+-  xfree(usedChips);
++  free(usedChips);
+ 
+   return foundScreen;
+ }
+@@ -927,7 +927,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
+ 
+   /* Process the options */
+   xf86CollectOptions(pScrn, NULL);
+-  if (!(pTDFX->Options = xalloc(sizeof(TDFXOptions))))
++  if (!(pTDFX->Options = malloc(sizeof(TDFXOptions))))
+     return FALSE;
+   memcpy(pTDFX->Options, TDFXOptions, sizeof(TDFXOptions));
+   xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTDFX->Options);
+@@ -1682,7 +1682,7 @@ TDFXInitWithBIOSData(ScrnInfoPtr pScrn)
+   }
+ 
+ #define T_B_SIZE (64 * 1024)
+-  bios = xcalloc(T_B_SIZE, 1);
++  bios = calloc(T_B_SIZE, 1);
+   if (!bios)
+     return FALSE;
+ 
+@@ -1692,7 +1692,7 @@ TDFXInitWithBIOSData(ScrnInfoPtr pScrn)
+   if (!xf86ReadPciBIOS(0, pTDFX->PciTag[0], 1, bios, T_B_SIZE)) {
+ #if 0
+     xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Bad BIOS read.\n");
+-    xfree(bios);
++    free(bios);
+     return FALSE;
+ #endif
+   }
+@@ -1700,7 +1700,7 @@ TDFXInitWithBIOSData(ScrnInfoPtr pScrn)
+ 
+   if (bios[0] != 0x55 || bios[1] != 0xAA) {
+     xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Bad BIOS signature.\n");
+-    xfree(bios);
++    free(bios);
+     return FALSE;
+   }
+ 
+@@ -1744,7 +1744,7 @@ TDFXInitWithBIOSData(ScrnInfoPtr pScrn)
+   pTDFX->writeLong(pTDFX, MISCINIT0, 0xF3);
+   pTDFX->writeLong(pTDFX, MISCINIT0, uint[1]);
+ 
+-  xfree(bios);
++  free(bios);
+   return TRUE;
+ }
+ #endif
+@@ -2542,19 +2542,19 @@ TDFXCloseScreen(int scrnIndex, ScreenPtr pScreen)
+   
+   if (pTDFX->AccelInfoRec) XAADestroyInfoRec(pTDFX->AccelInfoRec);
+   pTDFX->AccelInfoRec=0;
+-  if (pTDFX->DGAModes) xfree(pTDFX->DGAModes);
++  if (pTDFX->DGAModes) free(pTDFX->DGAModes);
+   pTDFX->DGAModes=0;
+   if (pTDFX->scanlineColorExpandBuffers[0])
+-    xfree(pTDFX->scanlineColorExpandBuffers[0]);
++    free(pTDFX->scanlineColorExpandBuffers[0]);
+   pTDFX->scanlineColorExpandBuffers[0]=0;
+   if (pTDFX->scanlineColorExpandBuffers[1])
+-    xfree(pTDFX->scanlineColorExpandBuffers[1]);
++    free(pTDFX->scanlineColorExpandBuffers[1]);
+   pTDFX->scanlineColorExpandBuffers[1]=0;
+   if (pTDFX->overlayAdaptor)
+-    xfree(pTDFX->overlayAdaptor);
++    free(pTDFX->overlayAdaptor);
+   pTDFX->overlayAdaptor=0;
+   if (pTDFX->textureAdaptor)
+-    xfree(pTDFX->textureAdaptor);
++    free(pTDFX->textureAdaptor);
+   pTDFX->textureAdaptor=0;
+ 
+   pScrn->vtSema=FALSE;
+diff --git a/src/tdfx_priv.c b/src/tdfx_priv.c
+index 3f3228b..77ce676 100644
+--- a/src/tdfx_priv.c
++++ b/src/tdfx_priv.c
+@@ -3,6 +3,8 @@
+ #include "config.h"
+ #endif
+ 
++#include <sys/time.h>
++
+ #include "xf86.h"
+ #include "xf86_OSproc.h"
+ #include "xf86fbman.h"
+@@ -197,7 +199,7 @@ Bool TDFXInitFifo(ScreenPtr pScreen)
+ #endif
+   pTDFX->fifoBase = (uint32*)(pTDFX->FbBase+pTDFX->fifoOffset);
+ #ifdef DEBUG_FIFO
+-  pTDFX->fifoMirrorBase = xalloc(pTDFX->fifoSize);
++  pTDFX->fifoMirrorBase = malloc(pTDFX->fifoSize);
+   pTDFX->fifoMirrorPtr = pTDFX->fifoMirrorBase;
+ #endif
+   pTDFX->sync=TDFXSyncFifo;
+@@ -215,7 +217,7 @@ void TDFXShutdownFifo(ScreenPtr pScreen)
+   TDFXWriteLongMMIO(pTDFX, SST_FIFO_BASESIZE0, 0);
+   pTDFX->sync=TDFXSync;
+ #ifdef DEBUG_FIFO
+-  if (pTDFX->fifoMirrorBase) xfree(pTDFX->fifoMirrorBase);
++  if (pTDFX->fifoMirrorBase) free(pTDFX->fifoMirrorBase);
+   pTDFX->fifoMirrorBase=0;
+ #endif
+ }
+diff --git a/src/tdfx_sli.c b/src/tdfx_sli.c
+index 416edca..1507515 100644
+--- a/src/tdfx_sli.c
++++ b/src/tdfx_sli.c
+@@ -17,7 +17,7 @@
+ Bool TDFXDisableSLI(TDFXPtr pTDFX)
+ {
+   int i;
+-  int v;
++  uint32_t v;
+ 
+   for (i=0; i<pTDFX->numChips; i++) {
+       PCI_READ_LONG(v, CFG_INIT_ENABLE, i);
+@@ -83,7 +83,8 @@ Bool TDFXDisableSLI(TDFXPtr pTDFX)
+ Bool TDFXSetupSLI(ScrnInfoPtr pScrn, Bool sliEnable, int aaSamples)
+ {
+   TDFXPtr pTDFX;
+-  int i, sliLines, sliLinesLog2, nChipsLog2, v;
++  uint32_t v;
++  int i, sliLines, sliLinesLog2, nChipsLog2;
+   int sli_renderMask, sli_compareMask, sli_scanMask;
+   int sliAnalog, dwFormat;
+ 
+diff --git a/src/tdfx_video.c b/src/tdfx_video.c
+index 22be0d3..733e6c7 100644
+--- a/src/tdfx_video.c
++++ b/src/tdfx_video.c
+@@ -151,7 +151,7 @@ void TDFXInitVideo(ScreenPtr pScreen)
+ 	    adaptors = &newAdaptor;
+ 	} else {
+             newAdaptors = 
+-		xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
++		malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+             if(newAdaptors) {
+                 memcpy(newAdaptors, adaptors, num_adaptors * 
+ 						sizeof(XF86VideoAdaptorPtr));
+@@ -166,7 +166,7 @@ void TDFXInitVideo(ScreenPtr pScreen)
+         xf86XVScreenInit(pScreen, adaptors, num_adaptors);
+ 
+     if(newAdaptors)
+-        xfree(newAdaptors);
++        free(newAdaptors);
+ }
+ 
+ 
+@@ -185,9 +185,9 @@ TDFXAllocAdaptor(ScrnInfoPtr pScrn, int numberPorts)
+     if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn)))
+         return NULL;
+ 
+-    if(!(pPriv = xcalloc(1, sizeof(TDFXPortPrivRec) + (numberPorts * sizeof(DevUnion)))))
++    if(!(pPriv = calloc(1, sizeof(TDFXPortPrivRec) + (numberPorts * sizeof(DevUnion)))))
+     {
+-        xfree(adapt);
++        free(adapt);
+         return NULL;
+     }
+ 
+@@ -1185,18 +1185,18 @@ TDFXAllocateSurface(
+     surface->width = w;
+     surface->height = h;
+ 
+-    if(!(surface->pitches = xalloc(sizeof(int)))) {
++    if(!(surface->pitches = malloc(sizeof(int)))) {
+ 	xf86FreeOffscreenLinear(linear);
+ 	return BadAlloc;
+     }
+-    if(!(surface->offsets = xalloc(sizeof(int)))) {
+-	xfree(surface->pitches);
++    if(!(surface->offsets = malloc(sizeof(int)))) {
++	free(surface->pitches);
+ 	xf86FreeOffscreenLinear(linear);
+ 	return BadAlloc;
+     }
+-    if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
+-	xfree(surface->pitches);
+-	xfree(surface->offsets);
++    if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) {
++	free(surface->pitches);
++	free(surface->offsets);
+ 	xf86FreeOffscreenLinear(linear);
+ 	return BadAlloc;
+     }
+@@ -1239,9 +1239,9 @@ TDFXFreeSurface(
+     if(pPriv->isOn)
+ 	TDFXStopSurface(surface);
+     xf86FreeOffscreenLinear(pPriv->linear);
+-    xfree(surface->pitches);
+-    xfree(surface->offsets);
+-    xfree(surface->devPrivate.ptr);
++    free(surface->pitches);
++    free(surface->offsets);
++    free(surface->devPrivate.ptr);
+ 
+     return Success;
+ }
+@@ -1332,7 +1332,7 @@ TDFXInitOffscreenImages(ScreenPtr pScreen)
+     XF86OffscreenImagePtr offscreenImages;
+ 
+     /* need to free this someplace */
+-    if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
++    if(!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
+ 	return;
+ 
+     offscreenImages[0].image = &OverlayImages[0];
diff --git a/xorg-x11-drv-tdfx.spec b/xorg-x11-drv-tdfx.spec
index 834f4ed..eb6a8fe 100644
--- a/xorg-x11-drv-tdfx.spec
+++ b/xorg-x11-drv-tdfx.spec
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 tdfx video driver
 Name:      xorg-x11-drv-tdfx
 Version:   1.4.3
-Release:   10%{?dist}
+Release:   11%{?dist}
 URL:       http://www.x.org
 License: MIT
 Group:     User Interface/X Hardware Support
@@ -13,6 +13,8 @@ Group:     User Interface/X Hardware Support
 Source0:   ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
 Source1:   tdfx.xinf
 
+Patch0: tdfx-1.4.3-git.patch
+
 ExcludeArch: s390 s390x
 
 BuildRequires: xorg-x11-server-sdk 
@@ -30,6 +32,7 @@ X.Org X11 tdfx video driver.
 
 %prep
 %setup -q -n %{tarball}-%{version}
+%patch0 -p1 -b .git
 
 %build
 %configure --disable-static
@@ -57,8 +60,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/tdfx.4*
 
 %changelog
-* Wed Nov 09 2011 ajax <ajax at redhat.com> - 1.4.3-10
+* Wed Nov 09 2011 Adam Jackson <ajax at redhat.com> 1.4.3-11
 - ABI rebuild
+- tdfx-1.4.3-git.patch: Sync with git for new ABI
 
 * Thu Aug 18 2011 Adam Jackson <ajax at redhat.com> - 1.4.3-9
 - Rebuild for xserver 1.11 ABI


More information about the scm-commits mailing list