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

xserver-xorg-video-nv: Changes to 'upstream-unstable'



 Makefile.am       |    4 +-
 README            |   20 +++++++++++
 README.NV1        |   42 -----------------------
 configure.ac      |    2 -
 man/nv.man        |    2 -
 src/g80_display.c |    5 +-
 src/g80_driver.c  |   21 +++++------
 src/g80_exa.c     |    4 +-
 src/g80_output.c  |   13 +++++--
 src/g80_xaa.c     |   12 +++---
 src/nv_dac.c      |   95 ++++++++++++++++++++++++++++++------------------------
 src/nv_driver.c   |   34 ++++++++++++++++---
 src/nv_hw.c       |   12 +++++-
 src/nv_setup.c    |   20 +++++++++--
 src/nv_type.h     |   14 +++----
 src/riva_dac.c    |   78 ++++++++++++++++++++++----------------------
 src/riva_setup.c  |    7 +++
 src/riva_type.h   |   14 +++----
 18 files changed, 221 insertions(+), 178 deletions(-)

New commits:
commit df87eaf191209b0f1619ea74dc9fb0314b6fd288
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Apr 7 13:40:36 2009 -0400

    nv 2.1.13

diff --git a/Makefile.am b/Makefile.am
index d2f5b56..cdce83e 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)
+	(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)
 
 dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index c87b553..bd26111 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nv],
-        2.1.12,
+        2.1.13,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nv)
 

commit c0cc7d1247798867c695aeddcffe88edacbb6c7c
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Apr 7 13:34:26 2009 -0400

    Remove README.NV1
    
    There's no nv1 support here, so.

diff --git a/Makefile.am b/Makefile.am
index aa4996b..d2f5b56 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man compat
 
-EXTRA_DIST = README.NV1 README.G80 ChangeLog
+EXTRA_DIST = README.G80 ChangeLog
 
 CLEANFILES = ChangeLog
 .PHONY: ChangeLog
diff --git a/README.NV1 b/README.NV1
deleted file mode 100644
index d209d5f..0000000
--- a/README.NV1
+++ /dev/null
@@ -1,42 +0,0 @@
-           Information for NVidia NV1 / SGS-Thomson STG2000 Users
-
-                                 David McKay
-
-                               20th March 1997
-
-1.  XFree driver for NVidia NV1 / SGS-Thomson STG2000 v1.0
-
-This driver now accelerates bitblits and filled rectangles. It also support a
-hardware cursor.  More graphic acceleration is planned. There is no plan to
-support the audio functionality of the chip.
-
-1.1  Notes
-
-   o THE DRIVER DOES NOT SUPPORT THE VIRTUAL DESKTOP FEATURES OF XFREE86 This
-     is because the NV1 does not have the necessary hardware to support this
-     feature. If you want to change resolutions, you will have to modify your
-     config file. Comment out all but the mode you wish to use.
-
-   o The generic VGA16 server will not work with the NV1.  For this reason
-     XF86Setup cannot be used to configure the server.  Use xf86config
-     instead.  Select `Diamond Edge 3D' as your board, and select only ONE
-     mode for each of 8bpp and 16bpp.  Do not select a virtual desktop.
-     Also, make sure you don't select a RAMDAC or clock chip.
-
-   o The NV1 only supports a 555 RGB Weight in 16 bpp, the hardware does not
-     do 565. You must put a Weight 555 in the Display section.
-
-   o 24/32 bpp mode is not yet supported.
-
-1.2  Known Bugs
-
-   o The driver should force Weight 555 in 16 bpp mode
-
-   o The hardware cursor doesn't work if an doublescan mode is selected.
-
-   o Screen blanking doesn't work, nor does DPMS.
-
-     Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/NV1.sgml,v 3.3 1997/03/22 09:35:30 hohndel Exp $
-
-
-$XFree86$

commit b278aca7d7b92b7fd62045d1aab44d78f694d608
Author: Bryce Harrington <bryce@bryceharrington.org>
Date:   Thu Mar 12 16:56:57 2009 -0700

    Add missing pci id for GeForce 7100 GS
    
    Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index faf73a9..20f96fb 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -303,6 +303,7 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0167, "GeForce Go 6200" },
   { 0x10DE0168, "GeForce Go 6400" },
   { 0x10DE0169, "GeForce 6250" },
+  { 0x10DE016A, "GeForce 7100 GS" },
 
   { 0x10DE0211, "GeForce 6800" },
   { 0x10DE0212, "GeForce 6800 LE" },

commit 74758ef3b184a37d211572d0deb826bd30d0de13
Author: Chris Ball <cjb@laptop.org>
Date:   Fri Feb 27 10:55:11 2009 -0500

    Revert "Build fix: set EXA_DRIVER_KNOWN_MAJOR=3"
    
    This reverts commit 492513bf047f7660ef9fd32fda7ebc28704079be.
    The EXA developers have backed out this ABI bump.
    
    Signed-off-by: Chris Ball <cjb@laptop.org>

diff --git a/configure.ac b/configure.ac
index 795dd4b..c87b553 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,9 +74,6 @@ CFLAGS="$XORG_CFLAGS"
 # RandR 1.2
 AC_CHECK_HEADER(xf86Modes.h,[BUILD_XMODES=no],[BUILD_XMODES=yes],[#include "xorg-server.h"])
 
-# Required by exa.h
-AC_DEFINE(EXA_DRIVER_KNOWN_MAJOR, 3, [Major version of EXA we can handle])
-
 # PCI rework
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
               [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],

commit 492513bf047f7660ef9fd32fda7ebc28704079be
Author: Chris Ball <cjb@laptop.org>
Date:   Tue Feb 24 23:44:47 2009 -0500

    Build fix: set EXA_DRIVER_KNOWN_MAJOR=3
    
    EXA in server HEAD requires this now.  Since this driver doesn't
    use {Prepare,Finish}Access or UploadToScratch, the change is safe.
    
    Signed-off-by: Chris Ball <cjb@laptop.org>

diff --git a/configure.ac b/configure.ac
index c87b553..795dd4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,9 @@ CFLAGS="$XORG_CFLAGS"
 # RandR 1.2
 AC_CHECK_HEADER(xf86Modes.h,[BUILD_XMODES=no],[BUILD_XMODES=yes],[#include "xorg-server.h"])
 
+# Required by exa.h
+AC_DEFINE(EXA_DRIVER_KNOWN_MAJOR, 3, [Major version of EXA we can handle])
+
 # PCI rework
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
               [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],

commit b9140a510efa49b36973d02f1e110d33d22e653d
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Feb 3 13:28:07 2009 -0800

    Add NV_/RIVA_ prefixes to fix build warnings.
    
    xserver commit 5e0967f5 pollutes the namespace by adding a "SetBit" macro to
    inputstr.h that conflicts with the preexisting ones in nv_type.h and
    riva_type.h.

diff --git a/src/nv_dac.c b/src/nv_dac.c
index a256d0a..b6df107 100644
--- a/src/nv_dac.c
+++ b/src/nv_dac.c
@@ -118,58 +118,58 @@ NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
            horizTotal += 2;
     }
 
-    pVga->CRTC[0x0]  = Set8Bits(horizTotal);
-    pVga->CRTC[0x1]  = Set8Bits(horizDisplay);
-    pVga->CRTC[0x2]  = Set8Bits(horizBlankStart);
-    pVga->CRTC[0x3]  = SetBitField(horizBlankEnd,4:0,4:0) 
-                       | SetBit(7);
-    pVga->CRTC[0x4]  = Set8Bits(horizStart);
-    pVga->CRTC[0x5]  = SetBitField(horizBlankEnd,5:5,7:7)
-                       | SetBitField(horizEnd,4:0,4:0);
-    pVga->CRTC[0x6]  = SetBitField(vertTotal,7:0,7:0);
-    pVga->CRTC[0x7]  = SetBitField(vertTotal,8:8,0:0)
-                       | SetBitField(vertDisplay,8:8,1:1)
-                       | SetBitField(vertStart,8:8,2:2)
-                       | SetBitField(vertBlankStart,8:8,3:3)
-                       | SetBit(4)
-                       | SetBitField(vertTotal,9:9,5:5)
-                       | SetBitField(vertDisplay,9:9,6:6)
-                       | SetBitField(vertStart,9:9,7:7);
-    pVga->CRTC[0x9]  = SetBitField(vertBlankStart,9:9,5:5)
-                       | SetBit(6)
+    pVga->CRTC[0x0]  = NV_Set8Bits(horizTotal);
+    pVga->CRTC[0x1]  = NV_Set8Bits(horizDisplay);
+    pVga->CRTC[0x2]  = NV_Set8Bits(horizBlankStart);
+    pVga->CRTC[0x3]  = NV_SetBitField(horizBlankEnd,4:0,4:0) 
+                       | NV_SetBit(7);
+    pVga->CRTC[0x4]  = NV_Set8Bits(horizStart);
+    pVga->CRTC[0x5]  = NV_SetBitField(horizBlankEnd,5:5,7:7)
+                       | NV_SetBitField(horizEnd,4:0,4:0);
+    pVga->CRTC[0x6]  = NV_SetBitField(vertTotal,7:0,7:0);
+    pVga->CRTC[0x7]  = NV_SetBitField(vertTotal,8:8,0:0)
+                       | NV_SetBitField(vertDisplay,8:8,1:1)
+                       | NV_SetBitField(vertStart,8:8,2:2)
+                       | NV_SetBitField(vertBlankStart,8:8,3:3)
+                       | NV_SetBit(4)
+                       | NV_SetBitField(vertTotal,9:9,5:5)
+                       | NV_SetBitField(vertDisplay,9:9,6:6)
+                       | NV_SetBitField(vertStart,9:9,7:7);
+    pVga->CRTC[0x9]  = NV_SetBitField(vertBlankStart,9:9,5:5)
+                       | NV_SetBit(6)
                        | ((mode->Flags & V_DBLSCAN) ? 0x80 : 0x00);
-    pVga->CRTC[0x10] = Set8Bits(vertStart);
-    pVga->CRTC[0x11] = SetBitField(vertEnd,3:0,3:0) | SetBit(5);
-    pVga->CRTC[0x12] = Set8Bits(vertDisplay);
+    pVga->CRTC[0x10] = NV_Set8Bits(vertStart);
+    pVga->CRTC[0x11] = NV_SetBitField(vertEnd,3:0,3:0) | NV_SetBit(5);
+    pVga->CRTC[0x12] = NV_Set8Bits(vertDisplay);
     pVga->CRTC[0x13] = ((pLayout->displayWidth/8)*(pLayout->bitsPerPixel/8));
-    pVga->CRTC[0x15] = Set8Bits(vertBlankStart);
-    pVga->CRTC[0x16] = Set8Bits(vertBlankEnd);
+    pVga->CRTC[0x15] = NV_Set8Bits(vertBlankStart);
+    pVga->CRTC[0x16] = NV_Set8Bits(vertBlankEnd);
 
     pVga->Attribute[0x10] = 0x01;
 
     if(pNv->Television)
        pVga->Attribute[0x11] = 0x00;
 
-    nvReg->screen = SetBitField(horizBlankEnd,6:6,4:4)
-                  | SetBitField(vertBlankStart,10:10,3:3)
-                  | SetBitField(vertStart,10:10,2:2)
-                  | SetBitField(vertDisplay,10:10,1:1)
-                  | SetBitField(vertTotal,10:10,0:0);
+    nvReg->screen = NV_SetBitField(horizBlankEnd,6:6,4:4)
+                  | NV_SetBitField(vertBlankStart,10:10,3:3)
+                  | NV_SetBitField(vertStart,10:10,2:2)
+                  | NV_SetBitField(vertDisplay,10:10,1:1)
+                  | NV_SetBitField(vertTotal,10:10,0:0);
 
-    nvReg->horiz  = SetBitField(horizTotal,8:8,0:0) 
-                  | SetBitField(horizDisplay,8:8,1:1)
-                  | SetBitField(horizBlankStart,8:8,2:2)
-                  | SetBitField(horizStart,8:8,3:3);
+    nvReg->horiz  = NV_SetBitField(horizTotal,8:8,0:0) 
+                  | NV_SetBitField(horizDisplay,8:8,1:1)
+                  | NV_SetBitField(horizBlankStart,8:8,2:2)
+                  | NV_SetBitField(horizStart,8:8,3:3);
 
-    nvReg->extra  = SetBitField(vertTotal,11:11,0:0)
-                    | SetBitField(vertDisplay,11:11,2:2)
-                    | SetBitField(vertStart,11:11,4:4)
-                    | SetBitField(vertBlankStart,11:11,6:6);
+    nvReg->extra  = NV_SetBitField(vertTotal,11:11,0:0)
+                    | NV_SetBitField(vertDisplay,11:11,2:2)
+                    | NV_SetBitField(vertStart,11:11,4:4)
+                    | NV_SetBitField(vertBlankStart,11:11,6:6);
 
     if(mode->Flags & V_INTERLACE) {
        horizTotal = (horizTotal >> 1) & ~1;
-       nvReg->interlace = Set8Bits(horizTotal);
-       nvReg->horiz |= SetBitField(horizTotal,8:8,4:4);
+       nvReg->interlace = NV_Set8Bits(horizTotal);
+       nvReg->horiz |= NV_SetBitField(horizTotal,8:8,4:4);
     } else {
        nvReg->interlace = 0xff;  /* interlace off */
     }
diff --git a/src/nv_type.h b/src/nv_type.h
index 2710c5a..8ebb9a8 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -14,13 +14,13 @@
 #define NV_ARCH_40  0x40
 
 
-#define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1)  << (b))
-#define MASKEXPAND(mask) BITMASK(1?mask,0?mask)
-#define SetBF(mask,value) ((value) << (0?mask))
-#define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) )
-#define SetBitField(value,from,to) SetBF(to, GetBF(value,from))
-#define SetBit(n) (1<<(n))
-#define Set8Bits(value) ((value)&0xff)
+#define NV_BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1)  << (b))
+#define NV_MASKEXPAND(mask) NV_BITMASK(1?mask,0?mask)
+#define NV_SetBF(mask,value) ((value) << (0?mask))
+#define NV_GetBF(var,mask) (((unsigned)((var) & NV_MASKEXPAND(mask))) >> (0?mask) )
+#define NV_SetBitField(value,from,to) NV_SetBF(to, NV_GetBF(value,from))
+#define NV_SetBit(n) (1<<(n))
+#define NV_Set8Bits(value) ((value)&0xff)
 
 typedef struct {
     int bitsPerPixel;
diff --git a/src/riva_dac.c b/src/riva_dac.c
index 6e9f346..9b7b518 100644
--- a/src/riva_dac.c
+++ b/src/riva_dac.c
@@ -67,55 +67,55 @@ RivaDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
     if(mode->Flags & V_INTERLACE) 
         vertTotal |= 1;
 
-    pVga->CRTC[0x0]  = Set8Bits(horizTotal);
-    pVga->CRTC[0x1]  = Set8Bits(horizDisplay);
-    pVga->CRTC[0x2]  = Set8Bits(horizBlankStart);
-    pVga->CRTC[0x3]  = SetBitField(horizBlankEnd,4:0,4:0) 
-                       | SetBit(7);
-    pVga->CRTC[0x4]  = Set8Bits(horizStart);
-    pVga->CRTC[0x5]  = SetBitField(horizBlankEnd,5:5,7:7)
-                       | SetBitField(horizEnd,4:0,4:0);
-    pVga->CRTC[0x6]  = SetBitField(vertTotal,7:0,7:0);
-    pVga->CRTC[0x7]  = SetBitField(vertTotal,8:8,0:0)
-                       | SetBitField(vertDisplay,8:8,1:1)
-                       | SetBitField(vertStart,8:8,2:2)
-                       | SetBitField(vertBlankStart,8:8,3:3)
-                       | SetBit(4)
-                       | SetBitField(vertTotal,9:9,5:5)
-                       | SetBitField(vertDisplay,9:9,6:6)
-                       | SetBitField(vertStart,9:9,7:7);
-    pVga->CRTC[0x9]  = SetBitField(vertBlankStart,9:9,5:5)
-                       | SetBit(6)
+    pVga->CRTC[0x0]  = RIVA_Set8Bits(horizTotal);
+    pVga->CRTC[0x1]  = RIVA_Set8Bits(horizDisplay);
+    pVga->CRTC[0x2]  = RIVA_Set8Bits(horizBlankStart);
+    pVga->CRTC[0x3]  = RIVA_SetBitField(horizBlankEnd,4:0,4:0) 
+                       | RIVA_SetBit(7);
+    pVga->CRTC[0x4]  = RIVA_Set8Bits(horizStart);
+    pVga->CRTC[0x5]  = RIVA_SetBitField(horizBlankEnd,5:5,7:7)
+                       | RIVA_SetBitField(horizEnd,4:0,4:0);
+    pVga->CRTC[0x6]  = RIVA_SetBitField(vertTotal,7:0,7:0);
+    pVga->CRTC[0x7]  = RIVA_SetBitField(vertTotal,8:8,0:0)
+                       | RIVA_SetBitField(vertDisplay,8:8,1:1)
+                       | RIVA_SetBitField(vertStart,8:8,2:2)
+                       | RIVA_SetBitField(vertBlankStart,8:8,3:3)
+                       | RIVA_SetBit(4)
+                       | RIVA_SetBitField(vertTotal,9:9,5:5)
+                       | RIVA_SetBitField(vertDisplay,9:9,6:6)
+                       | RIVA_SetBitField(vertStart,9:9,7:7);
+    pVga->CRTC[0x9]  = RIVA_SetBitField(vertBlankStart,9:9,5:5)
+                       | RIVA_SetBit(6)
                        | ((mode->Flags & V_DBLSCAN) ? 0x80 : 0x00);
-    pVga->CRTC[0x10] = Set8Bits(vertStart);
-    pVga->CRTC[0x11] = SetBitField(vertEnd,3:0,3:0) | SetBit(5);
-    pVga->CRTC[0x12] = Set8Bits(vertDisplay);
+    pVga->CRTC[0x10] = RIVA_Set8Bits(vertStart);
+    pVga->CRTC[0x11] = RIVA_SetBitField(vertEnd,3:0,3:0) | RIVA_SetBit(5);
+    pVga->CRTC[0x12] = RIVA_Set8Bits(vertDisplay);
     pVga->CRTC[0x13] = ((pLayout->displayWidth/8)*(pLayout->bitsPerPixel/8));
-    pVga->CRTC[0x15] = Set8Bits(vertBlankStart);
-    pVga->CRTC[0x16] = Set8Bits(vertBlankEnd);
+    pVga->CRTC[0x15] = RIVA_Set8Bits(vertBlankStart);
+    pVga->CRTC[0x16] = RIVA_Set8Bits(vertBlankEnd);
 
     pVga->Attribute[0x10] = 0x01;
 
-    rivaReg->screen = SetBitField(horizBlankEnd,6:6,4:4)
-                  | SetBitField(vertBlankStart,10:10,3:3)
-                  | SetBitField(vertStart,10:10,2:2)
-                  | SetBitField(vertDisplay,10:10,1:1)
-                  | SetBitField(vertTotal,10:10,0:0);
+    rivaReg->screen = RIVA_SetBitField(horizBlankEnd,6:6,4:4)
+                  | RIVA_SetBitField(vertBlankStart,10:10,3:3)
+                  | RIVA_SetBitField(vertStart,10:10,2:2)
+                  | RIVA_SetBitField(vertDisplay,10:10,1:1)
+                  | RIVA_SetBitField(vertTotal,10:10,0:0);
 
-    rivaReg->horiz  = SetBitField(horizTotal,8:8,0:0) 
-                  | SetBitField(horizDisplay,8:8,1:1)
-                  | SetBitField(horizBlankStart,8:8,2:2)
-                  | SetBitField(horizStart,8:8,3:3);
+    rivaReg->horiz  = RIVA_SetBitField(horizTotal,8:8,0:0) 
+                  | RIVA_SetBitField(horizDisplay,8:8,1:1)
+                  | RIVA_SetBitField(horizBlankStart,8:8,2:2)
+                  | RIVA_SetBitField(horizStart,8:8,3:3);
 
-    rivaReg->extra  = SetBitField(vertTotal,11:11,0:0)
-                    | SetBitField(vertDisplay,11:11,2:2)
-                    | SetBitField(vertStart,11:11,4:4)
-                    | SetBitField(vertBlankStart,11:11,6:6);
+    rivaReg->extra  = RIVA_SetBitField(vertTotal,11:11,0:0)
+                    | RIVA_SetBitField(vertDisplay,11:11,2:2)
+                    | RIVA_SetBitField(vertStart,11:11,4:4)
+                    | RIVA_SetBitField(vertBlankStart,11:11,6:6);
 
     if(mode->Flags & V_INTERLACE) {
        horizTotal = (horizTotal >> 1) & ~1;
-       rivaReg->interlace = Set8Bits(horizTotal);
-       rivaReg->horiz |= SetBitField(horizTotal,8:8,4:4);
+       rivaReg->interlace = RIVA_Set8Bits(horizTotal);
+       rivaReg->horiz |= RIVA_SetBitField(horizTotal,8:8,4:4);
     } else {
        rivaReg->interlace = 0xff;  /* interlace off */
     }
diff --git a/src/riva_type.h b/src/riva_type.h
index e9448e6..5a1317f 100644
--- a/src/riva_type.h
+++ b/src/riva_type.h
@@ -9,13 +9,13 @@
 #include "xf86int10.h"
 
 
-#define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1)  << (b))
-#define MASKEXPAND(mask) BITMASK(1?mask,0?mask)
-#define SetBF(mask,value) ((value) << (0?mask))
-#define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) )
-#define SetBitField(value,from,to) SetBF(to, GetBF(value,from))
-#define SetBit(n) (1<<(n))
-#define Set8Bits(value) ((value)&0xff)
+#define RIVA_BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1)  << (b))
+#define RIVA_MASKEXPAND(mask) RIVA_BITMASK(1?mask,0?mask)
+#define RIVA_SetBF(mask,value) ((value) << (0?mask))
+#define RIVA_GetBF(var,mask) (((unsigned)((var) & RIVA_MASKEXPAND(mask))) >> (0?mask) )
+#define RIVA_SetBitField(value,from,to) RIVA_SetBF(to, RIVA_GetBF(value,from))
+#define RIVA_SetBit(n) (1<<(n))
+#define RIVA_Set8Bits(value) ((value)&0xff)
 
 typedef RIVA_HW_STATE* RivaRegPtr;
 

commit 3890a0aefc4c133999a10fad9d32745b635634ac
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 30 20:43:04 2009 -0800

    Add README with pointers to mailing list, bugzilla & git repos

diff --git a/README b/README
new file mode 100644
index 0000000..b4442d1
--- /dev/null
+++ b/README
@@ -0,0 +1,20 @@
+xf86-video-nv - NVIDIA video driver for the Xorg X server
+
+Please submit bugs & patches to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/driver/xf86-video-nv
+
+        http://cgit.freedesktop.org/xorg/driver/xf86-video-nv
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage

commit 302ffbefb880afb7e297c4a41ed3c106b7623fdb
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 16:31:55 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page

diff --git a/man/nv.man b/man/nv.man
index 2d559e6..e37782d 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -191,7 +191,7 @@ Default:
 .\" ******************** end G80 section ********************
 .
 .SH "SEE ALSO"
-__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xrandr(__appmansuffix__)
+__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), xrandr(__appmansuffix__)
 .SH AUTHORS
 Authors include: David McKay, Jarno Paananen, Chas Inman, Dave Schmenk, 
 Mark Vojkovich, Aaron Plattner

commit 6c6511f4bd933410778e93429bd37e2f24b78618
Author: Chris Ball <cjb@laptop.org>
Date:   Mon Nov 3 20:08:32 2008 -0500

    Build fix, s/pNv->/pRiva->/.
    
    Fixes 52c034f5a41195f2b3193ec8c18b3f4ed7a763a3.

diff --git a/src/riva_setup.c b/src/riva_setup.c
index b616798..64726f7 100644
--- a/src/riva_setup.c
+++ b/src/riva_setup.c
@@ -168,9 +168,9 @@ RivaProbeDDC (ScrnInfoPtr pScrn)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Probing for EDID...\n");
 
 #ifdef EDID_COMPLETE_RAWDATA
-    MonInfo = xf86DoEEDID(pScrn->scrnIndex, pNv->I2C, TRUE);
+    MonInfo = xf86DoEEDID(pScrn->scrnIndex, pRiva->I2C, TRUE);
 #else
-    MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pNv->I2C);
+    MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pRiva->I2C);
 #endif
     if (MonInfo) {
        xf86DrvMsg(pScrn->scrnIndex, X_INFO,

commit 52c034f5a41195f2b3193ec8c18b3f4ed7a763a3
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Nov 3 15:01:58 2008 -0500

    Do E-EDID if built against a server that supports it.

diff --git a/src/g80_output.c b/src/g80_output.c
index e906fbb..420a73e 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -307,7 +307,11 @@ ProbeDDC(I2CBusPtr i2c)
             "Probing for EDID on I2C bus %i...\n", bus);
     pNv->reg[addr/4] = 7;
     /* Should probably use xf86OutputGetEDID here */
+#ifdef EDID_COMPLETE_RAWDATA
+    monInfo = xf86DoEEDID(pScrn->scrnIndex, i2c, TRUE);
+#else
     monInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, i2c);
+#endif
     pNv->reg[addr/4] = 3;
 
     if(monInfo) {
diff --git a/src/nv_setup.c b/src/nv_setup.c
index bea0050..132a96b 100644
--- a/src/nv_setup.c
+++ b/src/nv_setup.c
@@ -229,7 +229,12 @@ NVProbeDDC (ScrnInfoPtr pScrn, int bus)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, 
                "Probing for EDID on I2C bus %s...\n", bus ? "B" : "A");
 
-    if ((MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pNv->I2C))) {
+#ifdef EDID_COMPLETE_RAWDATA
+    MonInfo = xf86DoEEDID(pScrn->scrnIndex, pNv->I2C, TRUE);
+#else
+    MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pNv->I2C);
+#endif
+    if (MonInfo) {
        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
                   "DDC detected a %s:\n", MonInfo->features.input_type ?
                   "DFP" : "CRT");
diff --git a/src/riva_setup.c b/src/riva_setup.c
index b7352b6..b616798 100644
--- a/src/riva_setup.c
+++ b/src/riva_setup.c
@@ -167,7 +167,12 @@ RivaProbeDDC (ScrnInfoPtr pScrn)
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Probing for EDID...\n");
 
-    if ((MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pRiva->I2C))) {
+#ifdef EDID_COMPLETE_RAWDATA
+    MonInfo = xf86DoEEDID(pScrn->scrnIndex, pNv->I2C, TRUE);
+#else
+    MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pNv->I2C);
+#endif
+    if (MonInfo) {
        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                   "  ... found one\n");
        xf86PrintEDID( MonInfo );

commit b5f33108fea77280c9acd219954f20401f760faf
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Oct 27 17:54:36 2008 -0400

    Adjust the nv34 panel tweak for Toshiba Tecra M2.

diff --git a/src/nv_dac.c b/src/nv_dac.c
index b1049cc..a256d0a 100644
--- a/src/nv_dac.c
+++ b/src/nv_dac.c
@@ -42,8 +42,21 @@ NVDACPanelTweaks(NVPtr pNv, NVRegPtr state)
           we can do is experiment and apply hacks. */
 
        if(((pNv->Chipset & 0xffff) == 0x0328) && (state->bpp == 32)) {
-          /* At least one NV34 laptop needs this workaround. */
-          tweak = -1;
+#if XSERVER_LIBPCIACCESS
+          if (((pNv->PciInfo->subvendor_id & 0xffff) == 0x1179) &&
+              ((pNv->PciInfo->subdevice_id & 0xffff) == 0x0020))
+#else
+          if (((pNv->PciInfo->subsysVendor & 0xffff) == 0x1179) &&
+              ((pNv->PciInfo->subsysCard & 0xffff) == 0x0020))
+#endif
+          {
+
+             /* Toshiba Tecra M2 */
+             tweak = 1;
+          } else {
+             /* At least one NV34 laptop needs this workaround. */
+             tweak = -1;
+          }
        }
 
        if((pNv->Chipset & 0xfff0) == 0x0310) {

commit e387bf31aae78d4447b4af555a8d09f79f72e6e7
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Fri Oct 17 20:45:18 2008 -0700

    Only match PCI display devices in our display driver.
    
    Apparently the server needs the driver to tell it that no, we really don't want
    screen sections on our NIC, USB hubs, bridge devices, etc.
    
    Stop whining about PROBE_DETECT in G80 PreInit and just bail out instead.
    
    Bug #18099: Xorg -configure tries to create a screen for every nvidia device.

diff --git a/src/g80_driver.c b/src/g80_driver.c
index 50d55a0..ad8a424 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -206,11 +206,8 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
     CARD32 tmp;
     memType BAR1sizeKB;
 
-    if(flags & PROBE_DETECT) {
-        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                "G80 PROBE_DETECT unimplemented\n");
-        return FALSE;
-    }
+    if(flags & PROBE_DETECT)
+        return TRUE;
 
     /* Check the number of entities, and fail if it isn't one. */
     if(pScrn->numEntities != 1)
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 831e90b..faf73a9 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -77,11 +77,22 @@ static Bool	NVModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
 static Bool	NVSetModeVBE(ScrnInfoPtr pScrn, DisplayModePtr pMode);
 
 #if XSERVER_LIBPCIACCESS
-/* For now, just match any NVIDIA PCI device and sort through them in the probe
- * routine */
+/* For now, just match any NVIDIA display device and sort through them in the
+ * probe routine */
+
+/*
+ * libpciaccess's masks are shifted by 8 bits compared to the ones in xf86Pci.h.
+ */
+#define LIBPCIACCESS_CLASS_SHIFT (PCI_CLASS_SHIFT - 8)
+#define LIBPCIACCESS_CLASS_MASK (PCI_CLASS_MASK >> 8)
+
 static const struct pci_id_match NVPciIdMatchList[] = {
-    { PCI_VENDOR_NVIDIA, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0 },
-    { PCI_VENDOR_NVIDIA_SGS, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
+    { PCI_VENDOR_NVIDIA, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
+      PCI_CLASS_DISPLAY << LIBPCIACCESS_CLASS_SHIFT, LIBPCIACCESS_CLASS_MASK, 0 },
+
+    { PCI_VENDOR_NVIDIA_SGS, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
+      PCI_CLASS_DISPLAY << LIBPCIACCESS_CLASS_SHIFT, LIBPCIACCESS_CLASS_MASK, 0 },
+
     { 0, 0, 0 }
 };
 #endif

commit 27e2a98531e8b190a73d126508400283e0fb02df
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Thu Aug 28 11:19:04 2008 -0700

    Bump to 2.1.12.

diff --git a/configure.ac b/configure.ac
index 5ca7478..c87b553 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nv],
-        2.1.11,
+        2.1.12,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nv)
 

commit 75bcdc7ab1f3a4b715aad96e9739bedf4bc33321
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Thu Aug 28 11:18:29 2008 -0700

    G80: Fix a CPUToScreenColorExpandFill bug introduced by commit 2e0416c.

diff --git a/src/g80_xaa.c b/src/g80_xaa.c
index 0a3c1b3..ce21899 100644
--- a/src/g80_xaa.c
+++ b/src/g80_xaa.c
@@ -275,7 +275,7 @@ G80SetupForScanlineCPUToScreenColorExpandFill(
     planemask |= mask;
 
     G80DmaStart(pNv, 0x2ac, 1);
-    G80DmaNext (pNv, 4);
+    G80DmaNext (pNv, 1);
     G80SetRopSolid(pNv, rop, planemask);
     G80DmaStart(pNv, 0x800, 1);
     G80DmaNext (pNv, 1);

commit c3aa93fa478d78f8d57c5dbfc871eec84f7f7bd2
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Aug 26 22:27:46 2008 -0700

    Bump to 2.1.11.

diff --git a/configure.ac b/configure.ac
index 6514aed..5ca7478 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-nv],
-        2.1.10,
+        2.1.11,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-nv)
 

commit 36af14dfdb1feb4d5d47b1542803f1d292585fdf
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Aug 26 13:47:04 2008 -0700

    One more missing GPU name.

diff --git a/src/nv_driver.c b/src/nv_driver.c
index df199bc..831e90b 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -113,7 +113,7 @@ _X_EXPORT DriverRec NV = {
 #endif
 };
 
-/* Known cards as of 2008/08/25 */
+/* Known cards as of 2008/08/26 */
 
 static SymTabRec NVKnownChipsets[] =
 {
@@ -412,6 +412,7 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0628, "GeForce 9800M GTS" },
   { 0x10DE062A, "GeForce 9700M GTS" },
   { 0x10DE062C, "GeForce 9800M GTS" },
+  { 0x10DE0640, "GeForce 9500 GT" },
   { 0x10DE0647, "GeForce 9600M GT" },
   { 0x10DE0648, "GeForce 9600M GS" },
   { 0x10DE0649, "GeForce 9600M GT" },

commit 02001d2298dc61dcd904bc149a64147b2dadba9f
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon Aug 25 10:31:01 2008 -0700

    More chips names.

diff --git a/src/nv_driver.c b/src/nv_driver.c
index b6c7209..df199bc 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -113,7 +113,7 @@ _X_EXPORT DriverRec NV = {
 #endif
 };
 
-/* Known cards as of 2008/06/16 */
+/* Known cards as of 2008/08/25 */
 
 static SymTabRec NVKnownChipsets[] =
 {
@@ -363,6 +363,7 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0400, "GeForce 8600 GTS" },
   { 0x10DE0401, "GeForce 8600 GT" },
   { 0x10DE0402, "GeForce 8600 GT" },
+  { 0x10DE0403, "GeForce 8600 GS" },
   { 0x10DE0404, "GeForce 8400 GS" },
   { 0x10DE0405, "GeForce 9500M GS" },
   { 0x10DE0407, "GeForce 8600M GT" },
@@ -386,6 +387,7 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0429, "Quadro NVS 140M" },
   { 0x10DE042A, "Quadro NVS 130M" },
   { 0x10DE042B, "Quadro NVS 135M" },
+  { 0x10DE042C, "GeForce 9400 GT" },
   { 0x10DE042D, "Quadro FX 360M" },
   { 0x10DE042E, "GeForce 9300M G" },
   { 0x10DE042F, "Quadro NVS 290" },
@@ -401,17 +403,26 @@ static SymTabRec NVKnownChipsets[] =
   { 0x10DE0610, "GeForce 9600 GSO" },
   { 0x10DE0611, "GeForce 8800 GT" },
   { 0x10DE0612, "GeForce 9800 GTX" },
+  { 0x10DE0613, "GeForce 9800 GTK+" },
+  { 0x10DE0614, "GeForce 9800 GT" },
   { 0x10DE061A, "Quadro FX 3700" },
   { 0x10DE061C, "Quadro FX 3600M" },
   { 0x10DE0622, "GeForce 9600 GT" },
+  { 0x10DE0623, "GeForce 9600 GS" },
+  { 0x10DE0628, "GeForce 9800M GTS" },
+  { 0x10DE062A, "GeForce 9700M GTS" },
+  { 0x10DE062C, "GeForce 9800M GTS" },
   { 0x10DE0647, "GeForce 9600M GT" },
   { 0x10DE0648, "GeForce 9600M GS" },
   { 0x10DE0649, "GeForce 9600M GT" },
   { 0x10DE064B, "GeForce 9500M G" },
+  { 0x10DE06E1, "GeForce 9300 GS" },
   { 0x10DE06E4, "GeForce 8400 GS" },
   { 0x10DE06E5, "GeForce 9300M GS" },
   { 0x10DE06E8, "GeForce 9200M GS" },
   { 0x10DE06E9, "GeForce 9300M GS" },
+  { 0x10DE06EA, "Quadro NVS 150M" },
+  { 0x10DE06EB, "Quadro NVS 160M" },
 
   {-1, NULL}
 };

commit 7884f5918715a8df35cd0d7601cb50c7c5b56e70
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Sun Aug 24 00:23:54 2008 -0700

    Bug #15309: Set the pixel clock even if the hardware doesn't think it needs it.
    
    Fixes a problem where switching from DVI to VGA hangs.

diff --git a/src/g80_display.c b/src/g80_display.c
index 8b97b8a..cf4631d 100644
--- a/src/g80_display.c
+++ b/src/g80_display.c
@@ -191,15 +191,14 @@ G80DispCommand(ScrnInfoPtr pScrn, CARD32 addr, CARD32 data)
         if(super) {
             if(super == 2) {
                 xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-                const CARD32 r = pNv->reg[0x00610030/4];
                 int i;
 
                 for(i = 0; i < xf86_config->num_crtc; i++)
                 {
                     xf86CrtcPtr crtc = xf86_config->crtc[i];
-                    G80CrtcPrivPtr pPriv = crtc->driver_private;
+                    const int headOff = 0x800 * G80CrtcGetHead(crtc);
 
-                    if(r & (0x200 << pPriv->head))
+                    if((pNv->reg[(0x00614200+headOff)/4] & 0xc0) == 0x80)
                         G80CrtcSetPClk(crtc);
                 }
             }

commit ff32eb25f8edde7343da3d4782f0f59896515ebd
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Sat Aug 23 10:41:00 2008 -0700

    Fix warnings.

diff --git a/src/g80_output.c b/src/g80_output.c
index 140f3c8..e906fbb 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -451,7 +451,6 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
         pPriv->scale = G80_SCALE_ASPECT;
 
         if(pNv->lvds.i2cPort != -1) {
-            I2CBusPtr i2c;
             char i2cName[16];
 
             snprintf(i2cName, sizeof(i2cName), "I2C%i (LVDS)", pNv->lvds.i2cPort);
diff --git a/src/g80_xaa.c b/src/g80_xaa.c
index bcacbb4..0a3c1b3 100644
--- a/src/g80_xaa.c
+++ b/src/g80_xaa.c
@@ -95,7 +95,7 @@ G80SetRopSolid(G80Ptr pNv, CARD32 rop, CARD32 planemask)
     }
 }
 
-void inline
+inline void
 G80SetClip(G80Ptr pNv, int x, int y, int w, int h)
 {
     G80DmaStart(pNv, 0x280, 4);

commit c2128e5a8682e407b37f88c67a1709309247fc5d
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Sat Aug 23 10:36:37 2008 -0700

    G80: Log the i2c port number for LVDS, when there is one.

diff --git a/src/g80_output.c b/src/g80_output.c
index 4c8448f..140f3c8 100644
--- a/src/g80_output.c
+++ b/src/g80_output.c
@@ -191,8 +191,12 @@ static Bool G80ReadPortMapping(int scrnIndex, G80Ptr pNv)
     }
 
     xf86DrvMsg(scrnIndex, X_PROBED, "Connector map:\n");
-    if(pNv->lvds.present)
-        xf86DrvMsg(scrnIndex, X_PROBED, "  [N/A] -> SOR%i (LVDS)\n", pNv->lvds.or);
+    if(pNv->lvds.present) {
+        if (pNv->lvds.i2cPort != -1)
+            xf86DrvMsg(scrnIndex, X_PROBED, "  Bus %i -> SOR%i (LVDS)\n", pNv->lvds.i2cPort, pNv->lvds.or);
+        else
+            xf86DrvMsg(scrnIndex, X_PROBED, "  [N/A] -> SOR%i (LVDS)\n", pNv->lvds.or);
+    }
     for(i = 0; i < G80_NUM_I2C_PORTS; i++) {
         if(pNv->i2cMap[i].dac != -1)
             xf86DrvMsg(scrnIndex, X_PROBED, "  Bus %i -> DAC%i\n", i, pNv->i2cMap[i].dac);

commit f485c553c23c67fd060fdea82f57128fd4a1749e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri May 9 15:23:49 2008 -0700

    Print error message when pci_device_map_range fails

diff --git a/src/nv_setup.c b/src/nv_setup.c
index b057da1..bea0050 100644
--- a/src/nv_setup.c
+++ b/src/nv_setup.c
@@ -341,7 +341,10 @@ NVCommonSetup(ScrnInfoPtr pScrn)
     int FlatPanel = -1;   /* really means the CRTC is slaved */
     Bool Television = FALSE;
     void *tmp;
-    
+#if XSERVER_LIBPCIACCESS
+    int err;
+#endif
+
     /*
      * Override VGA I/O routines.
      */
@@ -371,8 +374,12 @@ NVCommonSetup(ScrnInfoPtr pScrn)
     pVga->MMIOOffset = 0;
 
 #if XSERVER_LIBPCIACCESS
-    pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000,
-                         PCI_DEV_MAP_FLAG_WRITABLE, &tmp);
+    err = pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000,
+			       PCI_DEV_MAP_FLAG_WRITABLE, &tmp);
+    if (err != 0) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		   "pci_device_map_range failed: %s\n", strerror(err));
+    }
 #else
     tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO | VIDMEM_READSIDEEFFECT,
                         pNv->PciTag, pNv->IOAddress, 0x01000000);

commit 319ee20c9bd4f764297cf252723a23bb6a95051a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri May 9 15:23:14 2008 -0700

    Fix pciaccess READ_LONG to work with Sun compilers
    
    Sun compilers don't allow nesting {} inside () apparently

diff --git a/src/nv_hw.c b/src/nv_hw.c
index ecac28f..83eeab2 100644
--- a/src/nv_hw.c
+++ b/src/nv_hw.c
@@ -653,6 +653,15 @@ static void nv30UpdateArbitrationSettings (
     *lwm = graphics_lwm >> 3;
 }
 
+#if XSERVER_LIBPCIACCESS
+static inline uint32_t
+pciaccessReadLong(struct pci_device *const dev, pciaddr_t offset) {
+    uint32_t tmp;
+    pci_device_cfg_read_u32(dev, &tmp, offset);
+    return tmp;
+}
+#endif
+
 static void nForceUpdateArbitrationSettings (
     unsigned      VClk,
     unsigned      pixelDepth,


Reply to: