Subject: xsrc/12314: Geforce2 driver
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kurek@uni-duisburg.de>
List: netbsd-bugs
Date: 03/02/2001 07:26:59
>Number:         12314
>Category:       xsrc
>Synopsis:       Geforce2 driver
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    xsrc-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 02 07:27:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Markus Kurek
>Release:        
>Organization:
>Environment:
>Description:
this patch adds Geforce2 support to the nvidia driver 
this driver was added to the xf-3_3 branch on xfree86.org

I don't have a Geforce2 but this server works fine with my TNT1 and TNT2 cards

# X -showconfig
XFree86 Version 3.3.6 / X Window System
(protocol Version 11, revision 0, vendor release 6300)
Release Date: December 20 1999
	If the server is older than 6-12 months, or if your card is newer
	than the above date, look for a newer version before reporting
	problems.  (see http://www.XFree86.Org/FAQ)
Operating System: NetBSD/i386 1.5 [ELF] The NetBSD Foundation, Inc.
Configured drivers:
  SVGA: server for SVGA graphics adaptors (Patchlevel 1):
      NV1, STG2000, RIVA 128, RIVA TNT, RIVA TNT2, RIVA ULTRA TNT2,
      RIVA VANTA, RIVA ULTRA VANTA, RIVA INTEGRATED, GeForce 256,
      GeForce DDR, Quadro, GeForce2 GTS, GeForce2 GTS (rev1),
      GeForce2 Ultra, Quadro 2 Pro, GeForce2 MX, GeForce2 MX DDR,
      Quadro 2 MXR, ET4000, ET4000W32, ET4000W32i, ET4000W32i_rev_b,


>How-To-Repeat:

>Fix:
apply this patch in xsrc/xc/programs/Xserver/hw/xfree86/vga256


*** vga/vgaPCI.h.orig	Sun Oct  8 15:04:50 2000
--- vga/vgaPCI.h	Fri Mar  2 15:59:52 2001
***************
*** 247,252 ****
--- 247,259 ----
  #define PCI_CHIP_GEFORCE256     0x0100
  #define PCI_CHIP_GEFORCEDDR     0x0101
  #define PCI_CHIP_QUADRO         0x0103
+ #define PCI_CHIP_GEFORCE2MX     0x0110
+ #define PCI_CHIP_GEFORCE2MXDDR  0x0111
+ #define PCI_CHIP_QUADRO2MXR     0x0113
+ #define PCI_CHIP_GEFORCE2GTS    0x0150
+ #define PCI_CHIP_GEFORCE2GTS_1  0x0151
+ #define PCI_CHIP_GEFORCE2ULTRA  0x0152
+ #define PCI_CHIP_QUADRO2PRO     0x0153
  
  /* NVIDIA & SGS */
  #define PCI_CHIP_RIVA128        0x0018
*** drivers/nv/nv_driver.c.orig	Mon Jan 10 23:03:52 2000
--- drivers/nv/nv_driver.c	Fri Mar  2 15:56:53 2001
***************
*** 21,27 ****
   * SOFTWARE.
   */
  
! /* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/nv_driver.c,v 3.5.2.12 1999/11/26 15:24:13 hohndel Exp $ */
  
  #include <math.h>
  #include <stdlib.h>
--- 21,27 ----
   * SOFTWARE.
   */
  
! /* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/nv_driver.c,v 3.5.2.13 2000/11/01 01:52:46 dawes Exp $ */
  
  #include <math.h>
  #include <stdlib.h>
***************
*** 145,151 ****
    { "RIVA INTEGRATED",NV4,PCI_VENDOR_NVIDIA,PCI_CHIP_ITNT2},
    { "GeForce 256",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE256},
    { "GeForce DDR",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCEDDR},
!   { "Quadro",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_QUADRO}
  };
  
  
--- 145,158 ----
    { "RIVA INTEGRATED",NV4,PCI_VENDOR_NVIDIA,PCI_CHIP_ITNT2},
    { "GeForce 256",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE256},
    { "GeForce DDR",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCEDDR},
!   { "Quadro",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_QUADRO},
!   { "GeForce2 GTS",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE2GTS},
!   { "GeForce2 GTS (rev1)",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE2GTS_1},
!   { "GeForce2 Ultra",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE2ULTRA},
!   { "Quadro 2 Pro",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_QUADRO2PRO},
!   { "GeForce2 MX",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE2MX},
!   { "GeForce2 MX DDR",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_GEFORCE2MXDDR},
!   { "Quadro 2 MXR",NV10,PCI_VENDOR_NVIDIA,PCI_CHIP_QUADRO2MXR}
  };
  
  
*** drivers/nv/riva_tbl.h.orig	Mon Jan 10 23:03:52 2000
--- drivers/nv/riva_tbl.h	Fri Mar  2 15:56:53 2001
***************
*** 36,42 ****
  |*     those rights set forth herein.                                        *|
  |*                                                                           *|
   \***************************************************************************/
! /* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_tbl.h,v 1.1.2.5 2000/01/08 03:25:40 robin Exp $ */
  /*
   * RIVA Fixed Functionality Init Tables.
   */
--- 36,45 ----
  |*     those rights set forth herein.                                        *|
  |*                                                                           *|
   \***************************************************************************/
! /* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/nv/riva_tbl.h,v 1.1.2.6 2000/11/01 01:52:46 dawes Exp $ */
! 
! #define NV_NEW
! 
  /*
   * RIVA Fixed Functionality Init Tables.
   */
***************
*** 61,66 ****
--- 64,72 ----
      {0x00001800, 0x80000010},
      {0x00002000, 0x80000011},
      {0x00002800, 0x80000012},
+ #ifdef NV_NEW
+     {0x00003000, 0x80000016},
+ #endif
      {0x00003800, 0x80000013}
  };
  static unsigned nv3TablePFIFO[][2] =
***************
*** 166,171 ****
--- 172,181 ----
      {0x00000249, 0x00CC0346},
      {0x0000024C, 0x80000013},
      {0x0000024D, 0x00D70347},
+ #ifdef NV_NEW
+     {0x00000258, 0x80000016},
+     {0x00000259, 0x00CA034C},
+ #endif
      {0x00000D05, 0x00000000},
      {0x00000D06, 0x00000000},
      {0x00000D07, 0x00000000},
***************
*** 202,208 ****
      {0x00000D2C, 0x10830200},
      {0x00000D2D, 0x00000000},
      {0x00000D2E, 0x00000000},
!     {0x00000D2F, 0x00000000} 
  };
  static unsigned nv3TablePRAMIN_8BPP[][2] =
  {
--- 212,224 ----
      {0x00000D2C, 0x10830200},
      {0x00000D2D, 0x00000000},
      {0x00000D2E, 0x00000000},
!     {0x00000D2F, 0x00000000}
! #ifdef NV_NEW
!     ,
!     {0x00000D31, 0x00000000},
!     {0x00000D32, 0x00000000},
!     {0x00000D33, 0x00000000}
! #endif
  };
  static unsigned nv3TablePRAMIN_8BPP[][2] =
  {
***************
*** 215,220 ****
--- 231,240 ----
      {0x00000D14, 0x10110203},
      {0x00000D18, 0x10110203},
      {0x00000D1C, 0x10419208}
+ #ifdef NV_NEW
+     ,
+     {0x00000D30, 0x10118203}
+ #endif
  };
  static unsigned nv3TablePRAMIN_15BPP[][2] =
  {
***************
*** 227,232 ****
--- 247,256 ----
      {0x00000D14, 0x10110200},
      {0x00000D18, 0x10110200},
      {0x00000D1C, 0x10419208}
+ #ifdef NV_NEW
+     ,
+     {0x00000D30, 0x10118200}
+ #endif
  };
  static unsigned nv3TablePRAMIN_32BPP[][2] =
  {
***************
*** 239,244 ****
--- 263,272 ----
      {0x00000D14, 0x10110201},
      {0x00000D18, 0x10110201},
      {0x00000D1C, 0x10419208}
+ #ifdef NV_NEW
+     ,
+     {0x00000D30, 0x10118201}
+ #endif
  };
  static unsigned nv4TableFIFO[][2] =
  {
***************
*** 362,367 ****
--- 390,399 ----
      {0x00000009, 0x80011149},
      {0x0000000A, 0x80000015},
      {0x0000000B, 0x8001114A},
+ #ifdef NV_NEW
+     {0x0000000C, 0x80000016},
+     {0x0000000D, 0x8001114F},
+ #endif
      {0x00000020, 0x80000000},
      {0x00000021, 0x80011142},
      {0x00000022, 0x80000001},
***************
*** 430,435 ****
--- 462,473 ----
      {0x00000538, 0x0000005B},
      {0x0000053A, 0x11401140},
      {0x0000053B, 0x00000000} 
+ #ifdef NV_NEW
+     ,
+     {0x0000053C, 0x0300A01C},
+     {0x0000053E, 0x11401140},
+     {0x0000053F, 0x00000000}
+ #endif
  };
  static unsigned nv4TablePRAMIN_8BPP[][2] =
  {
***************
*** 444,450 ****
      {0x0000052D, 0x00000302},
      {0x0000052E, 0x00000302},
      {0x00000535, 0x00000000},
!     {0x00000539, 0x00000000} 
  };
  static unsigned nv4TablePRAMIN_15BPP[][2] =
  {
--- 482,492 ----
      {0x0000052D, 0x00000302},
      {0x0000052E, 0x00000302},
      {0x00000535, 0x00000000},
!     {0x00000539, 0x00000000}
! #ifdef NV_NEW
!     ,
!     {0x0000053D, 0x00000302}
! #endif
  };
  static unsigned nv4TablePRAMIN_15BPP[][2] =
  {
***************
*** 460,465 ****
--- 502,511 ----
      {0x0000052E, 0x00000902},
      {0x00000535, 0x00000702},
      {0x00000539, 0x00000702} 
+ #ifdef NV_NEW
+     ,
+     {0x0000053D, 0x00000902}
+ #endif
  };
  static unsigned nv4TablePRAMIN_16BPP[][2] =
  {
***************
*** 475,480 ****
--- 521,530 ----
      {0x0000052E, 0x00000C02},
      {0x00000535, 0x00000702},
      {0x00000539, 0x00000702} 
+ #ifdef NV_NEW
+     ,
+     {0x0000053D, 0x00000C02}
+ #endif
  };
  static unsigned nv4TablePRAMIN_32BPP[][2] =
  {
***************
*** 490,495 ****
--- 540,549 ----
      {0x0000052E, 0x00000E02},
      {0x00000535, 0x00000E02},
      {0x00000539, 0x00000E02} 
+ #ifdef NV_NEW
+     ,
+     {0x0000053D, 0x00000E02}
+ #endif
  };
  static unsigned nv10TableFIFO[][2] =
  {
***************
*** 802,807 ****
--- 856,865 ----
      {0x00000009, 0x80011149},
      {0x0000000A, 0x80000015},
      {0x0000000B, 0x8001114A},
+ #ifdef NV_NEW
+     {0x0000000C, 0x80000016},
+     {0x0000000D, 0x80011150},
+ #endif
      {0x00000020, 0x80000000},
      {0x00000021, 0x80011142},
      {0x00000022, 0x80000001},
***************
*** 875,880 ****
--- 933,944 ----
      {0x0000053C, 0x00000093},
      {0x0000053E, 0x11401140},
      {0x0000053F, 0x00000000} 
+ #ifdef NV_NEW
+     ,
+     {0x00000540, 0x0300A01C},
+     {0x00000542, 0x11401140},
+     {0x00000543, 0x00000000}
+ #endif
  };
  static unsigned nv10TablePRAMIN_8BPP[][2] =
  {
***************
*** 891,896 ****
--- 955,964 ----
      {0x00000535, 0x00000000},
      {0x00000539, 0x00000000},
      {0x0000053D, 0x00000000} 
+ #ifdef NV_NEW
+     ,
+     {0x00000541, 0x00000302}
+ #endif
  };
  static unsigned nv10TablePRAMIN_15BPP[][2] =
  {
***************
*** 907,912 ****
--- 975,984 ----
      {0x00000535, 0x00000902},
      {0x00000539, 0x00000902}, 
      {0x0000053D, 0x00000902} 
+ #ifdef NV_NEW
+     ,
+     {0x00000541, 0x00000902}
+ #endif
  };
  static unsigned nv10TablePRAMIN_16BPP[][2] =
  {
***************
*** 923,928 ****
--- 995,1004 ----
      {0x00000535, 0x00000C02},
      {0x00000539, 0x00000C02},
      {0x0000053D, 0x00000C02} 
+ #ifdef NV_NEW
+     ,
+     {0x00000541, 0x00000C02}
+ #endif
  };
  static unsigned nv10TablePRAMIN_32BPP[][2] =
  {
***************
*** 939,943 ****
--- 1015,1023 ----
      {0x00000535, 0x00000E02},
      {0x00000539, 0x00000E02},
      {0x0000053D, 0x00000E02} 
+ #ifdef NV_NEW
+     ,
+     {0x00000541, 0x00000E02}
+ #endif
  };
  
>Release-Note:
>Audit-Trail:
>Unformatted: