rpms/xorg-x11-drv-nv/devel nv-update-git.patch, NONE, 1.1 nv-save-rom.patch, 1.2, 1.3 xorg-x11-drv-nv.spec, 1.89, 1.90

Dave Airlie airlied at fedoraproject.org
Tue Aug 4 06:05:31 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-nv/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7893

Modified Files:
	nv-save-rom.patch xorg-x11-drv-nv.spec 
Added Files:
	nv-update-git.patch 
Log Message:
* Tue Aug 04 2009 Dave Airlie <airlied at redhat.com> 2.1.14-3
- update for new ABI


nv-update-git.patch:
 Makefile.am        |    2 +-
 configure.ac       |   10 ++++++++++
 src/g80_dac.c      |    5 +++++
 src/g80_driver.c   |   14 +++++++++++++-
 src/g80_sor.c      |    5 +++++
 src/nv_driver.c    |    4 ++++
 src/nv_include.h   |    6 ++++--
 src/nv_video.c     |    1 -
 src/riva_driver.c  |    5 ++++-
 src/riva_include.h |    5 ++++-
 src/riva_type.h    |    2 +-
 11 files changed, 51 insertions(+), 8 deletions(-)

--- NEW FILE nv-update-git.patch ---
diff --git a/Makefile.am b/Makefile.am
index cdce83e..0891338 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,6 @@ CLEANFILES = ChangeLog
 .PHONY: ChangeLog
 
 ChangeLog:
-	(GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index e67a1ef..839512b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,11 @@ AC_INIT([xf86-video-nv],
 
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_CONFIG_HEADER([config.h])
+
+# Require xorg-macros: XORG_RELEASE_VERSION XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
+
 AC_CONFIG_AUX_DIR(.)
 
 AM_INIT_AUTOMAKE([dist-bzip2])
@@ -61,6 +66,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+                  HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+                  HAVE_XEXTPROTO_71="no")
+AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
 sdkdir=$(pkg-config --variable=sdkdir xorg-server)
 
 # Checks for libraries.
@@ -129,6 +138,7 @@ AC_SUBST([DRIVER_NAME])
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([
 	Makefile
diff --git a/src/g80_dac.c b/src/g80_dac.c
index 404f178..307e412 100644
--- a/src/g80_dac.c
+++ b/src/g80_dac.c
@@ -27,8 +27,13 @@
 
 #include <unistd.h>
 
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
 #include <xf86_OSproc.h>
 
 #include "g80_type.h"
diff --git a/src/g80_driver.c b/src/g80_driver.c
index 5ecf895..13e417a 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -28,16 +28,24 @@
 
 #include <string.h>
 
+#include <xf86.h>
 #include <xf86_OSproc.h>
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include <xf86Resources.h>
-#include <xf86RandR12.h>
+#endif
 #include <mipointer.h>
 #include <mibstore.h>
 #include <micmap.h>
 #include <xf86cmap.h>
 #include <fb.h>
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
+#include <xf86RandR12.h>
 
 #include "nv_const.h"
 #include "g80_type.h"
@@ -224,8 +232,10 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
     }
 
     /* Disable VGA access */
+#ifndef XSERVER_LIBPCIACCESS
     xf86SetOperatingState(resVgaIo, pEnt->index, ResUnusedOpr);
     xf86SetOperatingState(resVgaMem, pEnt->index, ResDisableOpr);
+#endif
 
     pScrn->monitor = pScrn->confScreen->monitor;
 
@@ -309,11 +319,13 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MMIO registers mapped at %p\n",
                (void*)pNv->reg);
 
+#ifndef XSERVER_LIBPCIACCESS
     if(xf86RegisterResources(pEnt->index, NULL, ResExclusive)) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "xf86RegisterResources() found "
                    "resource conflicts\n");
         goto fail;
     }
+#endif
 
     pNv->architecture = pNv->reg[0] >> 20 & 0x1ff;
     tmp = pNv->reg[0x0010020C/4];
diff --git a/src/g80_sor.c b/src/g80_sor.c
index c1ef42d..185761f 100644
--- a/src/g80_sor.c
+++ b/src/g80_sor.c
@@ -25,8 +25,13 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
+
 #include <X11/Xatom.h>
 
 #include "g80_type.h"
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 3a396e0..a7cf2dc 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1264,8 +1264,10 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 #endif
     }
    
+#ifndef XSERVER_LIBPCIACCESS
     xf86SetOperatingState(resVgaIo, pNv->pEnt->index, ResUnusedOpr);
     xf86SetOperatingState(resVgaMem, pNv->pEnt->index, ResDisableOpr);
+#endif
 
     /* Set pScrn->monitor */
     pScrn->monitor = pScrn->confScreen->monitor;
@@ -1642,6 +1644,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
     xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX\n",
 	       (unsigned long)pNv->IOAddress);
      
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86RegisterResources(pNv->pEnt->index, NULL, ResExclusive)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		"xf86RegisterResources() found resource conflicts\n");
@@ -1649,6 +1652,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	NVFreeRec(pScrn);
 	return FALSE;
     }
+#endif
 
     switch (pNv->Chipset & 0x0ff0) {
     case 0x0100:   /* GeForce 256 */
diff --git a/src/nv_include.h b/src/nv_include.h
index b579b37..a0d5ad1 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -8,7 +8,11 @@
 /* All drivers should typically include these */
 #include "xf86.h"
 #include "xf86_OSproc.h"
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
+#include "xf86RAC.h"
+#endif
 #include "compiler.h"
 
 /* Drivers for PCI hardware need this */
@@ -29,8 +33,6 @@
 
 #include "vbe.h"
 
-#include "xf86RAC.h"
-
 #include "nv_const.h"
 
 #include "dixstruct.h"
diff --git a/src/nv_video.c b/src/nv_video.c
index e11e0d0..6b13e5f 100644
--- a/src/nv_video.c
+++ b/src/nv_video.c
@@ -4,7 +4,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86Resources.h"
 #include "compiler.h"
 #include "xf86PciInfo.h"
 #include "xf86Pci.h"
diff --git a/src/riva_driver.c b/src/riva_driver.c
index 3540fe9..afe0972 100644
--- a/src/riva_driver.c
+++ b/src/riva_driver.c
@@ -396,8 +396,10 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
 #endif
     }
    
+#ifndef XSERVER_LIBPCIACCESS
     xf86SetOperatingState(resVgaIo, pRiva->pEnt->index, ResUnusedOpr);
     xf86SetOperatingState(resVgaMem, pRiva->pEnt->index, ResDisableOpr);
+#endif
 
     /* Set pScrn->monitor */
     pScrn->monitor = pScrn->confScreen->monitor;
@@ -633,6 +635,7 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
     xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX\n",
 	       (unsigned long)pRiva->IOAddress);
      
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86RegisterResources(pRiva->pEnt->index, NULL, ResExclusive)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		"xf86RegisterResources() found resource conflicts\n");
@@ -640,7 +643,7 @@ RivaPreInit(ScrnInfoPtr pScrn, int flags)
 	RivaFreeRec(pScrn);
 	return FALSE;
     }
-
+#endif
     Riva3Setup(pScrn);
 
     /*
diff --git a/src/riva_include.h b/src/riva_include.h
index 6726fcc..04c35a6 100644
--- a/src/riva_include.h
+++ b/src/riva_include.h
@@ -6,7 +6,11 @@
 /* All drivers should typically include these */
 #include "xf86.h"
 #include "xf86_OSproc.h"
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
+#include "xf86RAC.h"
+#endif
 #include "compiler.h"
 
 /* Drivers for PCI hardware need this */
@@ -27,7 +31,6 @@
 
 #include "vbe.h"
 
-#include "xf86RAC.h"
 
 #include "riva_const.h"
 
diff --git a/src/riva_type.h b/src/riva_type.h
index 5a1317f..456f813 100644
--- a/src/riva_type.h
+++ b/src/riva_type.h
@@ -56,8 +56,8 @@ typedef struct {
 #else
     pciVideoPtr         PciInfo;
     PCITAG              PciTag;
-#endif
     xf86AccessRec       Access;
+#endif
     int                 ChipRev;
     Bool                Primary;
     CARD32              IOAddress;

nv-save-rom.patch:
 g80_driver.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Index: nv-save-rom.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nv/devel/nv-save-rom.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- nv-save-rom.patch	7 Apr 2009 17:57:42 -0000	1.2
+++ nv-save-rom.patch	4 Aug 2009 06:05:29 -0000	1.3
@@ -1,18 +1,17 @@
-diff -up xf86-video-nv-2.1.13/src/g80_driver.c.save-rom xf86-video-nv-2.1.13/src/g80_driver.c
---- xf86-video-nv-2.1.13/src/g80_driver.c.save-rom	2008-10-27 17:54:04.000000000 -0400
-+++ xf86-video-nv-2.1.13/src/g80_driver.c	2009-04-07 13:50:34.000000000 -0400
-@@ -28,6 +28,10 @@
+diff -up xf86-video-nv-2.1.14/src/g80_driver.c.da xf86-video-nv-2.1.14/src/g80_driver.c
+--- xf86-video-nv-2.1.14/src/g80_driver.c.da	2009-08-04 16:03:45.000000000 +1000
++++ xf86-video-nv-2.1.14/src/g80_driver.c	2009-08-04 16:04:06.000000000 +1000
+@@ -27,6 +27,9 @@
+ #endif
  
  #include <string.h>
- 
 +#include <sys/types.h>
 +#include <sys/stat.h>
 +#include <fcntl.h>
-+
+ 
+ #include <xf86.h>
  #include <xf86_OSproc.h>
- #include <xf86Resources.h>
- #include <xf86RandR12.h>
-@@ -205,6 +209,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+@@ -163,6 +166,7 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
      char *s;
      CARD32 tmp;
      memType BAR1sizeKB;
@@ -20,7 +19,7 @@ diff -up xf86-video-nv-2.1.13/src/g80_dr
  
      if(flags & PROBE_DETECT)
          return TRUE;
-@@ -429,6 +434,14 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
+@@ -390,6 +394,14 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
      else
          pNv->table1 -= 0x10000;
  
@@ -35,7 +34,7 @@ diff -up xf86-video-nv-2.1.13/src/g80_dr
      xf86CrtcConfigInit(pScrn, &randr12_screen_funcs);
      xf86CrtcSetSizeRange(pScrn, 320, 200, 8192, 8192);
  
-@@ -984,6 +997,8 @@ G80EnterVT(int scrnIndex, int flags)
+@@ -939,6 +951,8 @@ G80EnterVT(int scrnIndex, int flags)
      ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
      G80Ptr pNv = G80PTR(pScrn);
  


Index: xorg-x11-drv-nv.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nv/devel/xorg-x11-drv-nv.spec,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- xorg-x11-drv-nv.spec	27 Jul 2009 08:29:07 -0000	1.89
+++ xorg-x11-drv-nv.spec	4 Aug 2009 06:05:29 -0000	1.90
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 nv video driver
 Name:      xorg-x11-drv-nv
 Version:   2.1.14
-Release:   2%{?dist}.1
+Release:   3%{?dist}
 URL:       http://www.x.org
 License: MIT
 Group:     User Interface/X Hardware Support
@@ -22,6 +22,7 @@ BuildRequires: libdrm-devel >= 2.3.0-7
 Requires:  hwdata
 Requires:  xorg-x11-server-Xorg >= 1.6.0
 
+Patch3:     nv-update-git.patch
 Patch4:     nv-reserve-fbarea.patch
 Patch5:	    nv-2.1.6-starvation.patch
 Patch6:	    nv-2.1.6-panel-fix.patch
@@ -35,6 +36,7 @@ X.Org X11 nv video driver.
 %prep
 %setup -q -n %{tarball}-%{version}
 
+%patch3 -p1 -b .git
 %patch4 -p1 -b .reserve-fbarea
 %patch5 -p1 -b .starve
 %patch6 -p1 -b .panel
@@ -67,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/nv.4*
 
 %changelog
+* Tue Aug 04 2009 Dave Airlie <airlied at redhat.com> 2.1.14-3
+- update for new ABI
+
 * Mon Jul 27 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.14-2.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list