Subject: Importing XFree86-current nv(4) driver
To: None <tech-x11@netbsd.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-x11
Date: 12/24/2005 17:08:41
------=_Part_11814_29482488.1135440521864
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi all,

since I bougth a nVidia GeForce 6600GT, my XFree86 installation has
been extremely unstable.  With the drivers in 4.5.0, it freezes after few
minutes of usage.

However, I copied (a few days ago) XFree86 current nv code over our
xsrc, rebuilt the driver successfully and X has been rock solid since
then.

I've attached a diff that shows all the changes.  As you can see, they
basically add special cases for the newest chipsets, so it doesn't seem
they'll cause problems.

Can I commit this to xsrc?  How do I have to do it?  I mean, is a regular
commit stating where the new code comes from enough?

I'd prefer it if this was explicitly approved by one of the xsrc maintainer=
s
(tron@, mrg@ or rtr@, according to doc/RESPONSIBLE).

Thank you!

--
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/
The NetBSD Project - http://www.NetBSD.org/

------=_Part_11814_29482488.1135440521864
Content-Type: text/x-patch; name=patch.diff; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch.diff"

Index: nv_dac.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v
retrieving revision 1.7
diff -u -r1.7 nv_dac.c
--- nv_dac.c	18 Mar 2005 14:55:14 -0000	1.7
+++ nv_dac.c	24 Dec 2005 16:00:55 -0000
@@ -37,7 +37,7 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.44 2004/12/09 00:21:04 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v 1.45 2005/07/09 00:53:00 mvojkovi Exp $ */
 
 #include "nv_include.h"
 
@@ -312,7 +312,7 @@
 
     /* can't read this reliably on NV11 */
     if((pNv->Chipset & 0x0ff0) == 0x0110) 
-       nvReg->crtcOwner = ((pNv->Chipset & 0x0fff) == 0x0112) ? 3 : 0;
+       nvReg->crtcOwner = pNv->CRTCnumber;
 }
 
 #define DEPTH_SHIFT(val, w) ((val << (8 - w)) | (val >> ((w << 1) - 8)))
Index: nv_driver.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v
retrieving revision 1.6
diff -u -r1.6 nv_driver.c
--- nv_driver.c	18 Mar 2005 14:55:14 -0000	1.6
+++ nv_driver.c	24 Dec 2005 16:00:56 -0000
@@ -24,7 +24,7 @@
 /* Hacked together from mga driver and 3.3.4 NVIDIA driver by Jarno Paananen
    <jpaana@s2.org> */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.132 2005/02/18 02:55:09 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.138 2005/09/28 17:43:27 mvojkovi Exp $ */
 
 #include "nv_include.h"
 
@@ -82,6 +82,8 @@
         0
 };
 
+/* Known cards as of 2005/09/21  */
+
 static SymTabRec NVKnownChipsets[] =
 {
   { 0x12D20018, "RIVA 128" },
@@ -200,7 +202,7 @@
 #else
   { 0x10DE0329, "0x0329" },
 #endif
-  { 0x10DE032A, "Quadro NVS 280 PCI" },
+  { 0x10DE032A, "Quadro NVS 55/280 PCI" },
   { 0x10DE032B, "Quadro FX 500/600 PCI" },
   { 0x10DE032C, "GeForce FX Go53xx Series" },
   { 0x10DE032D, "GeForce FX Go5100" },
@@ -232,44 +234,47 @@
   { 0x10DE0042, "GeForce 6800 LE" },
   { 0x10DE0043, "0x0043" },
   { 0x10DE0045, "GeForce 6800 GT" },
+  { 0x10DE0046, "GeForce 6800 GT" },
+  { 0x10DE0048, "GeForce 6800 XT" },
   { 0x10DE0049, "0x0049" },
   { 0x10DE004E, "Quadro FX 4000" },
 
   { 0x10DE00C0, "0x00C0" },
   { 0x10DE00C1, "GeForce 6800" },
   { 0x10DE00C2, "GeForce 6800 LE" },
+  { 0x10DE00C3, "GeForce 6800 XT" },
   { 0x10DE00C8, "GeForce Go 6800" },
   { 0x10DE00C9, "GeForce Go 6800 Ultra" },
   { 0x10DE00CC, "Quadro FX Go1400" },
-  { 0x10DE00CD, "0x00CD" },
+  { 0x10DE00CD, "Quadro FX 3450/4000 SDI" },
   { 0x10DE00CE, "Quadro FX 1400" },
 
   { 0x10DE0140, "GeForce 6600 GT" },
   { 0x10DE0141, "GeForce 6600" },
-  { 0x10DE0142, "0x0142" },
+  { 0x10DE0142, "GeForce 6600 LE" },
   { 0x10DE0143, "0x0143" },
   { 0x10DE0144, "GeForce Go 6600" },
   { 0x10DE0145, "GeForce 6610 XL" },
   { 0x10DE0146, "GeForce Go 6600 TE/6200 TE" },
-  { 0x10DE0147, "0x0147" },
+  { 0x10DE0147, "GeForce 6700 XL" },
   { 0x10DE0148, "GeForce Go 6600" },
-  { 0x10DE0149, "0x0149" },
+  { 0x10DE0149, "GeForce Go 6600 GT" },
   { 0x10DE014B, "0x014B" },
   { 0x10DE014C, "0x014C" },
   { 0x10DE014D, "0x014D" },
   { 0x10DE014E, "Quadro FX 540" },
   { 0x10DE014F, "GeForce 6200" },
 
-  { 0x10DE0160, "0x0160" },
+  { 0x10DE0160, "GeForce 6500" },
   { 0x10DE0161, "GeForce 6200 TurboCache(TM)" },
-  { 0x10DE0162, "0x0162" },
-  { 0x10DE0163, "0x0163" },
+  { 0x10DE0162, "GeForce 6200SE TurboCache(TM)" },
+  { 0x10DE0163, "GeForce 6200 LE" },
   { 0x10DE0164, "GeForce Go 6200" },
-  { 0x10DE0165, "0x0163" },
-  { 0x10DE0166, "GeForce Go 6250" },
+  { 0x10DE0165, "Quadro NVS 285" },
+  { 0x10DE0166, "GeForce Go 6400" },
   { 0x10DE0167, "GeForce Go 6200" },
-  { 0x10DE0168, "GeForce Go 6250" },
-  { 0x10DE0169, "0x0169" },
+  { 0x10DE0168, "GeForce Go 6400" },
+  { 0x10DE0169, "GeForce 6250" },
   { 0x10DE016B, "0x016B" },
   { 0x10DE016C, "0x016C" },
   { 0x10DE016D, "0x016D" },
@@ -281,10 +286,21 @@
   { 0x10DE0215, "GeForce 6800 GT" },
 
   { 0x10DE0220, "0x0220" },
-  { 0x10DE0221, "0x0221" },
+  { 0x10DE0221, "GeForce 6200" },
   { 0x10DE0222, "0x0222" },
   { 0x10DE0228, "0x0228" },
 
+  { 0x10DE0090, "0x0090" },
+  { 0x10DE0091, "GeForce 7800 GTX" },
+  { 0x10DE0092, "GeForce 7800 GT" },
+  { 0x10DE0093, "0x0093" },
+  { 0x10DE0094, "0x0094" },
+  { 0x10DE0098, "GeForce Go 7800" },
+  { 0x10DE0099, "GeForce Go 7800 GTX" },
+  { 0x10DE009C, "0x009C" },
+  { 0x10DE009D, "Quadro FX 4500" },
+  { 0x10DE009E, "0x009E" },
+
   {-1, NULL}
 };
 
@@ -682,6 +698,8 @@
                case 0x0210:
                case 0x0220:
                case 0x0230:
+               case 0x0290:
+               case 0x0390:
                    NVChipsets[numUsed].token = pciid;
                    NVChipsets[numUsed].name = "Unknown NVIDIA chip";
                    NVPciChipsets[numUsed].numChipset = pciid;
@@ -918,7 +936,7 @@
 {
     vbeInfoPtr pVbe;
 
-    if (xf86LoadSubModule(pScrn, "vbe")) {
+    if (xf86LoadVBEModule(pScrn)) {
         pVbe = VBEInit(NULL,index);
         ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
 	vbeFree(pVbe);
@@ -1372,6 +1390,8 @@
     case 0x0210:
     case 0x0220:
     case 0x0230:
+    case 0x0290:
+    case 0x0390:
          pNv->Architecture =  NV_ARCH_40;
          break;
     default:
@@ -1408,9 +1428,13 @@
 	}
     }
 
-    pNv->FbUsableSize = pNv->FbMapSize - (128 * 1024);
+    if(pNv->Architecture >= NV_ARCH_40)
+       pNv->FbUsableSize = pNv->FbMapSize - (560 * 1024);
+    else
+       pNv->FbUsableSize = pNv->FbMapSize - (128 * 1024);
     pNv->ScratchBufferSize = (pNv->Architecture < NV_ARCH_10) ? 8192 : 16384;
     pNv->ScratchBufferStart = pNv->FbUsableSize - pNv->ScratchBufferSize;
+    pNv->CursorStart = pNv->FbUsableSize + (32 * 1024);
 
     /*
      * Setup the ClockRanges, which describe what clock ranges are available,
@@ -1702,8 +1726,6 @@
 
 static void NVBacklightEnable(NVPtr pNv,  Bool on)
 {
-    CARD32 fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC;
-
     /* This is done differently on each laptop.  Here we
        define the ones we know for sure. */
 
@@ -1722,14 +1744,24 @@
       }
       pNv->PMC[0x10F0/4] = tmp_pmc;
       pNv->PCRTC0[0x081C/4] = tmp_pcrt;
-    }
+    } 
 #endif
     
-    /* cut the TMDS output */
-    if(on) fpcontrol |= pNv->fpSyncs;
-    else fpcontrol |= 0x20000022;
+    if(pNv->LVDS) {
+       if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != 0x0110)) {
+           pNv->PMC[0x130C/4] = on ? 3 : 7; 
+       }
+    } else {
+       CARD32 fpcontrol;
+
+       fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC;
 
-    pNv->PRAMDAC[0x0848/4] = fpcontrol;
+       /* cut the TMDS output */
+       if(on) fpcontrol |= pNv->fpSyncs;
+       else fpcontrol |= 0x20000022;
+
+       pNv->PRAMDAC[0x0848/4] = fpcontrol;
+    }
 }
 
 static void
@@ -1853,7 +1885,7 @@
      * function.  If not, the visuals will need to be setup before calling
      * a fb ScreenInit() function and fixed up after.
      *
-     * For most PC hardware at depths >= 8, the defaults that cfb uses
+     * For most PC hardware at depths >= 8, the defaults that fb uses
      * are not appropriate.  In this driver, we fixup the visuals after.
      */
 
Index: nv_hw.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 nv_hw.c
--- nv_hw.c	18 Mar 2005 13:11:57 -0000	1.1.1.2
+++ nv_hw.c	24 Dec 2005 16:00:57 -0000
@@ -36,7 +36,7 @@
 |*     those rights set forth herein.                                        *|
 |*                                                                           *|
  \***************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.15 2005/02/03 23:16:50 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c,v 1.18 2005/09/28 17:43:27 mvojkovi Exp $ */
 
 #include "nv_local.h"
 #include "compiler.h"
@@ -915,6 +915,7 @@
     RIVA_HW_STATE *state
 )
 {
+    CARD32 tmp;
     int i;
 
     pNv->PMC[0x0140/4] = 0x00000000;
@@ -928,16 +929,28 @@
 
     if(pNv->Architecture == NV_ARCH_04) {
         pNv->PFB[0x0200/4] = state->config;
-    } else if ((pNv->Chipset & 0xfff0) == 0x0090) {
-        for(i = 0; i < 15; i++) {
-           pNv->PFB[(0x0600 + (i * 0x10))/4] = 0;
-           pNv->PFB[(0x0604 + (i * 0x10))/4] = pNv->FbMapSize - 1;
-        }
-    } else {
+    } else 
+    if((pNv->Architecture < NV_ARCH_40) ||
+       ((pNv->Chipset & 0xfff0) == 0x0040))
+    {
         for(i = 0; i < 8; i++) {
            pNv->PFB[(0x0240 + (i * 0x10))/4] = 0;
            pNv->PFB[(0x0244 + (i * 0x10))/4] = pNv->FbMapSize - 1;
         }
+    } else {
+        int regions = 12;
+
+        if(((pNv->Chipset & 0xfff0) == 0x0090) ||
+           ((pNv->Chipset & 0xfff0) == 0x01D0) ||
+           ((pNv->Chipset & 0xfff0) == 0x0290))
+        {
+           regions = 15;
+        }
+ 
+       for(i = 0; i < regions; i++) {
+          pNv->PFB[(0x0600 + (i * 0x10))/4] = 0;
+          pNv->PFB[(0x0604 + (i * 0x10))/4] = pNv->FbMapSize - 1;
+       }
     }
 
     if(pNv->Architecture >= NV_ARCH_40) {
@@ -1156,6 +1169,10 @@
               pNv->PGRAPH[0x0090/4] = 0x00008000;
               pNv->PGRAPH[0x0610/4] = 0x00be3c5f;
 
+              tmp = pNv->REGS[0x1540/4] & 0xff;
+              for(i = 0; tmp && !(tmp & 1); tmp >>= 1, i++);
+              pNv->PGRAPH[0x5000/4] = i;
+    
               if((pNv->Chipset & 0xfff0) == 0x0040) {
                  pNv->PGRAPH[0x09b0/4] = 0x83280fff;
                  pNv->PGRAPH[0x09b4/4] = 0x000000a0;
@@ -1172,6 +1189,7 @@
                  pNv->PFB[0x033C/4] &= 0xffff7fff;
                  break;
               case 0x00C0:
+              case 0x0120:
                  pNv->PGRAPH[0x0828/4] = 0x007596ff;
                  pNv->PGRAPH[0x082C/4] = 0x00000108;
                  break;
@@ -1196,6 +1214,7 @@
                  pNv->PRAMDAC[0x0608/4] |= 0x00100000;
                  break;
               case 0x0090:
+              case 0x0290:
                  pNv->PRAMDAC[0x0608/4] |= 0x00100000;
                  pNv->PGRAPH[0x0828/4] = 0x07830610;
                  pNv->PGRAPH[0x082C/4] = 0x0000016A;
@@ -1243,12 +1262,32 @@
               }
            }
 
-           if((pNv->Chipset & 0xfff0) == 0x0090) {
-              for(i = 0; i < 60; i++)
-                pNv->PGRAPH[(0x0D00/4) + i] = pNv->PFB[(0x0600/4) + i];
-           } else {
-              for(i = 0; i < 32; i++)
+           if((pNv->Architecture < NV_ARCH_40) ||
+              ((pNv->Chipset & 0xfff0) == 0x0040)) 
+           {
+              for(i = 0; i < 32; i++) {
                 pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0240/4) + i];
+                pNv->PGRAPH[(0x6900/4) + i] = pNv->PFB[(0x0240/4) + i];
+              }
+           } else {
+              if(((pNv->Chipset & 0xfff0) == 0x0090) ||
+                 ((pNv->Chipset & 0xfff0) == 0x01D0) ||
+                 ((pNv->Chipset & 0xfff0) == 0x0290))
+              {
+                 for(i = 0; i < 60; i++) {
+                   pNv->PGRAPH[(0x0D00/4) + i] = pNv->PFB[(0x0600/4) + i];
+                   pNv->PGRAPH[(0x6900/4) + i] = pNv->PFB[(0x0600/4) + i];
+                 }
+              } else {
+                 for(i = 0; i < 48; i++) {
+                   pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0600/4) + i];
+                   if(((pNv->Chipset & 0xfff0) != 0x0160) &&
+                      ((pNv->Chipset & 0xfff0) != 0x0220))
+                   {
+                      pNv->PGRAPH[(0x6900/4) + i] = pNv->PFB[(0x0600/4) + i];
+                   }
+                 }
+              }
            }
 
            if(pNv->Architecture >= NV_ARCH_40) {
@@ -1263,7 +1302,10 @@
                  pNv->PGRAPH[0x0864/4] = pNv->FbMapSize - 1;
                  pNv->PGRAPH[0x0868/4] = pNv->FbMapSize - 1;
               } else {
-                 if((pNv->Chipset & 0xfff0) == 0x0090) {
+                 if(((pNv->Chipset & 0xfff0) == 0x0090) ||
+                    ((pNv->Chipset & 0xfff0) == 0x01D0) ||
+                    ((pNv->Chipset & 0xfff0) == 0x0290)) 
+                 {
                     pNv->PGRAPH[0x0DF0/4] = pNv->PFB[0x0200/4];
                     pNv->PGRAPH[0x0DF4/4] = pNv->PFB[0x0204/4];
                  } else {
Index: nv_include.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 nv_include.h
--- nv_include.h	19 Jan 2002 15:10:07 -0000	1.1.1.4
+++ nv_include.h	24 Dec 2005 16:00:57 -0000
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.11 2001/12/07 00:09:56 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.12 2005/10/14 15:16:42 tsi Exp $ */
 
 #ifndef __NV_INCLUDE_H__
 #define __NV_INCLUDE_H__
@@ -43,7 +43,7 @@
 #include "fbdevhw.h"
 
 #include "xf86xv.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
 
 #include "vgaHW.h"
 
Index: nv_setup.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v
retrieving revision 1.6
diff -u -r1.6 nv_setup.c
--- nv_setup.c	18 Mar 2005 14:55:15 -0000	1.6
+++ nv_setup.c	24 Dec 2005 16:00:57 -0000
@@ -37,7 +37,7 @@
 |*                                                                           *|
  \***************************************************************************/
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.44 2004/12/09 00:21:05 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.49 2005/09/28 17:43:27 mvojkovi Exp $ */
 
 #include "nv_include.h"
 
@@ -302,6 +302,9 @@
         pNv->RamAmountKBytes = (pNv->PFB[0x020C/4] & 0xFFF00000) >> 10;
     }
 
+    if(pNv->RamAmountKBytes > 256*1024)
+        pNv->RamAmountKBytes = 256*1024;
+
     pNv->CrystalFreqKHz = (pNv->PEXTDEV[0x0000/4] & (1 << 6)) ? 14318 : 13500;
     
     if(pNv->twoHeads && (implementation != 0x0110))
@@ -310,7 +313,6 @@
            pNv->CrystalFreqKHz = 27000;
     }
 
-    pNv->CursorStart      = (pNv->RamAmountKBytes - 96) * 1024;
     pNv->CURSOR           = NULL;  /* can't set this here */
     pNv->MinVClockFreqKHz = 12000;
     pNv->MaxVClockFreqKHz = pNv->twoStagePLL ? 400000 : 350000;
@@ -408,6 +410,7 @@
     case 0x0186:
     case 0x0187:
     case 0x018D:
+    case 0x0228:
     case 0x0286:
     case 0x028C:
     case 0x0316:
@@ -431,11 +434,17 @@
     case 0x034C:
     case 0x0160:
     case 0x0166:
+    case 0x0169:
+    case 0x016B:
+    case 0x016C:
+    case 0x016D:
     case 0x00C8:
     case 0x00CC:
     case 0x0144:
     case 0x0146:
     case 0x0148:
+    case 0x0098:
+    case 0x0099:
         mobile = TRUE;
         break;
     default:
@@ -680,5 +689,14 @@
 
     if(!pNv->FlatPanel || (pScrn->depth != 24) || !pNv->twoHeads)
         pNv->FPDither = FALSE;
+
+    pNv->LVDS = FALSE;
+    if(pNv->FlatPanel && pNv->twoHeads) {
+        pNv->PRAMDAC0[0x08B0/4] = 0x00010004;
+        if(pNv->PRAMDAC0[0x08B4/4] & 1)
+           pNv->LVDS = TRUE;
+        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Panel is %s\n", 
+                   pNv->LVDS ? "LVDS" : "TMDS");
+    }
 }
 
Index: nv_type.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v
retrieving revision 1.5
diff -u -r1.5 nv_type.h
--- nv_type.h	18 Mar 2005 14:55:15 -0000	1.5
+++ nv_type.h	24 Dec 2005 16:00:57 -0000
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.50 2004/12/09 00:21:05 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.51 2005/04/16 23:57:26 mvojkovi Exp $ */
 
 #ifndef __NV_STRUCT_H__
 #define __NV_STRUCT_H__
@@ -161,6 +161,7 @@
     CARD32              fpSyncs;
     Bool                usePanelTweak;
     int                 PanelTweak;
+    Bool                LVDS;
 
     CARD32              dmaPut;
     CARD32              dmaCurrent;
Index: nv_video.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 nv_video.c
--- nv_video.c	18 Mar 2005 13:11:58 -0000	1.1.1.5
+++ nv_video.c	24 Dec 2005 16:00:59 -0000
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.24 2004/03/29 16:25:18 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_video.c,v 1.25 2005/10/14 15:16:43 tsi Exp $ */
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
@@ -11,7 +11,7 @@
 #include "regionstr.h"
 
 #include "xf86xv.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
 #include "xaa.h"
 #include "dixstruct.h"
 #include "fourcc.h"
Index: riva_driver.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/riva_driver.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 riva_driver.c
--- riva_driver.c	18 Mar 2005 13:11:58 -0000	1.1.1.2
+++ riva_driver.c	24 Dec 2005 16:00:59 -0000
@@ -23,7 +23,7 @@
 /* Hacked together from mga driver and 3.3.4 NVIDIA driver by Jarno Paananen
    <jpaana@s2.org> */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_driver.c,v 1.7 2004/11/26 11:48:48 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_driver.c,v 1.8 2005/08/28 20:04:50 tsi Exp $ */
 
 #include "riva_include.h"
 
@@ -439,7 +439,7 @@
 {
     vbeInfoPtr pVbe;
 
-    if (xf86LoadSubModule(pScrn, "vbe")) {
+    if (xf86LoadVBEModule(pScrn)) {
         pVbe = VBEInit(NULL,index);
         ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
 	vbeFree(pVbe);
@@ -1173,7 +1173,7 @@
      * function.  If not, the visuals will need to be setup before calling
      * a fb ScreenInit() function and fixed up after.
      *
-     * For most PC hardware at depths >= 8, the defaults that cfb uses
+     * For most PC hardware at depths >= 8, the defaults that fb uses
      * are not appropriate.  In this driver, we fixup the visuals after.
      */
 
Index: riva_include.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/nv/riva_include.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 riva_include.h
--- riva_include.h	5 Mar 2004 14:28:52 -0000	1.1.1.1
+++ riva_include.h	24 Dec 2005 16:00:59 -0000
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_include.h,v 1.1 2003/07/31 20:24:31 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_include.h,v 1.2 2005/10/14 15:16:43 tsi Exp $ */
 
 #ifndef __RIVA_INCLUDE_H__
 #define __RIVA_INCLUDE_H__
@@ -43,7 +43,7 @@
 #include "fbdevhw.h"
 
 #include "xf86xv.h"
-#include "Xv.h"
+#include <X11/extensions/Xv.h>
 
 #include "vgaHW.h"
 

------=_Part_11814_29482488.1135440521864--