Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37848200
en ru br
Репозитории ALT
4.0: 7.3.0-alt1
3.0: 6.8.2-alt18
+updates:6.8.2-alt24
www.altlinux.org/Changes

Группа :: Система/X11
Пакет: xorg-x11

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xorg-x11-6.8.2-cvs-nv.patch
Скачать


diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c	2004-12-16 04:42:35 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c	2005-07-10 11:03:24 +0400
@@ -92,7 +92,9 @@
     vgaRegPtr   pVga;
 
     /*
-     * This will initialize all of the generic VGA registers.
+     * Initialize all of the generic VGA registers.  Don't bother with
+     * VGA_FIX_SYNC_PULSES, given the relevant CRTC settings are overridden
+     * below.  Ditto for the KGA workaround.
      */
     if (!vgaHWInit(pScrn, mode))
         return(FALSE);
@@ -310,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)))
diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c	2004-12-16 04:42:35 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c	2005-07-10 11:03:24 +0400
@@ -209,42 +227,77 @@
   { 0x10DE034C, "Quadro FX Go1000" },
   { 0x10DE034E, "Quadro FX 1100" },
   { 0x10DE034F, "0x034F" },
+
   { 0x10DE0040, "GeForce 6800 Ultra" },
   { 0x10DE0041, "GeForce 6800" },
   { 0x10DE0042, "GeForce 6800 LE" },
   { 0x10DE0043, "0x0043" },
   { 0x10DE0045, "GeForce 6800 GT" },
+  { 0x10DE0046, "GeForce 6800 GT" },
   { 0x10DE0049, "0x0049" },
   { 0x10DE004E, "Quadro FX 4000" },
-  { 0x10DE004D, "Quadro FX 4400" },
+
   { 0x10DE00C0, "0x00C0" },
-  { 0x10DE00C1, "0x00C1" },
+  { 0x10DE00C1, "GeForce 6800" },
   { 0x10DE00C2, "GeForce 6800 LE" },
-  { 0x10DE00C8, "0x00C8" },
-  { 0x10DE00C9, "0x00C9" },
-  { 0x10DE00CC, "0x00CC" },
-  { 0x10DE00CE, "0x00CE" },
+  { 0x10DE00C8, "GeForce Go 6800" },
+  { 0x10DE00C9, "GeForce Go 6800 Ultra" },
+  { 0x10DE00CC, "Quadro FX Go1400" },
+  { 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" },
-  { 0x10DE0166, "0x0166" },
+  { 0x10DE0161, "GeForce 6200 TurboCache(TM)" },
+  { 0x10DE0162, "GeForce 6200SE TurboCache(TM)" },
+  { 0x10DE0163, "0x0163" },
+  { 0x10DE0164, "GeForce Go 6200" },
+  { 0x10DE0165, "Quadro NVS 285" },
+  { 0x10DE0166, "GeForce Go 6400" },
+  { 0x10DE0167, "GeForce Go 6200" },
+  { 0x10DE0168, "GeForce Go 6400" },
+  { 0x10DE0169, "0x0169" },
+  { 0x10DE016B, "0x016B" },
+  { 0x10DE016C, "0x016C" },
+  { 0x10DE016D, "0x016D" },
+  { 0x10DE016E, "0x016E" },
+
   { 0x10DE0210, "0x0210" },
-  { 0x10DE0211, "0x0211" },
-  { 0x10DE021D, "0x021D" },
-  { 0x10DE021E, "0x021E" },
+  { 0x10DE0211, "GeForce 6800" },
+  { 0x10DE0212, "GeForce 6800 LE" },
+  { 0x10DE0215, "GeForce 6800 GT" },
+
+  { 0x10DE0220, "0x0220" },
+  { 0x10DE0221, "GeForce 6200" },
+  { 0x10DE0222, "0x0222" },
+  { 0x10DE0228, "0x0228" },
+
+  { 0x10DE0090, "0x0090" },
+  { 0x10DE0091, "GeForce 7800 GTX" },
+  { 0x10DE0092, "0x0092" },
+  { 0x10DE0093, "0x0093" },
+  { 0x10DE0094, "0x0094" },
+  { 0x10DE0098, "0x0098" },
+  { 0x10DE0099, "GeForce Go 7800 GTX" },
+  { 0x10DE009C, "0x009C" },
+  { 0x10DE009D, "Quadro FX 4500" },
+  { 0x10DE009E, "0x009E" },
+  
   {-1, NULL}
 };
 
@@ -640,6 +693,8 @@
                case 0x01D0:
                case 0x0090:
                case 0x0210:
+               case 0x0220:
+               case 0x0230:
                    NVChipsets[numUsed].token = pciid;
                    NVChipsets[numUsed].name = "Unknown NVIDIA chip";
                    NVPciChipsets[numUsed].numChipset = pciid;
@@ -1328,6 +1383,8 @@
     case 0x01D0:
     case 0x0090:
     case 0x0210:
+    case 0x0220:
+    case 0x0230:
          pNv->Architecture =  NV_ARCH_40;
          break;
     default:
@@ -1661,8 +1718,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. */
 
@@ -1684,11 +1739,21 @@
     }
 #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;
 
-    pNv->PRAMDAC[0x0848/4] = fpcontrol;
+       fpcontrol = pNv->PRAMDAC[0x0848/4] & 0xCfffffCC;
+
+       /* cut the TMDS output */
+       if(on) fpcontrol |= pNv->fpSyncs;
+       else fpcontrol |= 0x20000022;
+
+       pNv->PRAMDAC[0x0848/4] = fpcontrol;
+    }
 }
 
 static void
diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c	2004-12-16 04:42:35 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_hw.c	2005-02-18 16:52:01 +0300
@@ -928,23 +928,16 @@
 
     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 {
-        pNv->PFB[0x0240/4] = 0;
-        pNv->PFB[0x0244/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x0250/4] = 0;
-        pNv->PFB[0x0254/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x0260/4] = 0;
-        pNv->PFB[0x0264/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x0270/4] = 0;
-        pNv->PFB[0x0274/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x0280/4] = 0;
-        pNv->PFB[0x0284/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x0290/4] = 0;
-        pNv->PFB[0x0294/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x02A0/4] = 0;
-        pNv->PFB[0x02A4/4] = pNv->FbMapSize - 1;
-        pNv->PFB[0x02B0/4] = 0;
-        pNv->PFB[0x02B4/4] = pNv->FbMapSize - 1;
+        for(i = 0; i < 8; i++) {
+           pNv->PFB[(0x0240 + (i * 0x10))/4] = 0;
+           pNv->PFB[(0x0244 + (i * 0x10))/4] = pNv->FbMapSize - 1;
+        }
     }
 
     if(pNv->Architecture >= NV_ARCH_40) {
@@ -1173,6 +1166,7 @@
 
               switch(pNv->Chipset & 0xfff0) {
               case 0x0040:
+              case 0x0210:
                  pNv->PGRAPH[0x09b8/4] = 0x0078e366;
                  pNv->PGRAPH[0x09bc/4] = 0x0000014c;
                  pNv->PFB[0x033C/4] &= 0xffff7fff;
@@ -1182,6 +1176,7 @@
                  pNv->PGRAPH[0x082C/4] = 0x00000108;
                  break;
               case 0x0160:
+              case 0x01D0:
                  pNv->PMC[0x1700/4] = pNv->PFB[0x020C/4];
                  pNv->PMC[0x1704/4] = 0;
                  pNv->PMC[0x1708/4] = 0;
@@ -1194,6 +1189,17 @@
                  pNv->PGRAPH[0x0828/4] = 0x0072cb77;
                  pNv->PGRAPH[0x082C/4] = 0x00000108;
                  break;
+              case 0x0220:
+              case 0x0230:
+                 pNv->PGRAPH[0x0860/4] = 0;
+                 pNv->PGRAPH[0x0864/4] = 0;
+                 pNv->PRAMDAC[0x0608/4] |= 0x00100000;
+                 break;
+              case 0x0090:
+                 pNv->PRAMDAC[0x0608/4] |= 0x00100000;
+                 pNv->PGRAPH[0x0828/4] = 0x07830610;
+                 pNv->PGRAPH[0x082C/4] = 0x0000016A;
+                 break;
               default:
                  break;
               };
@@ -1237,8 +1243,13 @@
               }
            }
 
-           for(i = 0; i < 32; i++)
-             pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0240/4) + i];
+           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++)
+                pNv->PGRAPH[(0x0900/4) + i] = pNv->PFB[(0x0240/4) + i];
+           }
 
            if(pNv->Architecture >= NV_ARCH_40) {
               if((pNv->Chipset & 0xfff0) == 0x0040) {
@@ -1252,8 +1263,13 @@
                  pNv->PGRAPH[0x0864/4] = pNv->FbMapSize - 1;
                  pNv->PGRAPH[0x0868/4] = pNv->FbMapSize - 1;
               } else {
-                 pNv->PGRAPH[0x09F0/4] = pNv->PFB[0x0200/4];
-                 pNv->PGRAPH[0x09F4/4] = pNv->PFB[0x0204/4];
+                 if((pNv->Chipset & 0xfff0) == 0x0090) {
+                    pNv->PGRAPH[0x0DF0/4] = pNv->PFB[0x0200/4];
+                    pNv->PGRAPH[0x0DF4/4] = pNv->PFB[0x0204/4];
+                 } else {
+                    pNv->PGRAPH[0x09F0/4] = pNv->PFB[0x0200/4];
+                    pNv->PGRAPH[0x09F4/4] = pNv->PFB[0x0204/4];
+                 }
                  pNv->PGRAPH[0x69F0/4] = pNv->PFB[0x0200/4];
                  pNv->PGRAPH[0x69F4/4] = pNv->PFB[0x0204/4];
 
diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man	2004-11-14 21:13:27 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv.man	2005-07-10 11:03:24 +0400
@@ -51,7 +51,13 @@
 NV17, NV18, NV25, NV28
 .TP 22
 .B GeForce FX, QUADRO FX
-NV30, NV31, NV34, NV35, NV36, NV37, NV38, NV40, NV41, NV43, NV44, NV45
+NV30, NV31, NV34, NV35, NV36, NV37, NV38 
+.TP 22
+.B GeForce 6XXX
+NV40, NV41, NV43, NV44, NV45
+.TP 22
+.B GeForce 7XXX
+G70
 .SH CONFIGURATION DETAILS
 Please refer to __xconfigfile__(__filemansuffix__) for general configuration
 details.  This section only covers configuration details specific to this
diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c	2004-12-16 04:42:35 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c	2005-07-10 11:03:24 +0400
@@ -408,6 +408,7 @@
     case 0x0186:
     case 0x0187:
     case 0x018D:
+    case 0x0228:
     case 0x0286:
     case 0x028C:
     case 0x0316:
@@ -431,11 +432,16 @@
     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 0x0099:
         mobile = TRUE;
         break;
     default:
@@ -680,5 +686,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");
+    }
 }
 
diff -Naur xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h
--- xorg-x11-6.8.2/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h	2004-12-16 04:42:35 +0300
+++ xorg-x11-6.8.x.99/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h	2005-04-29 12:15:45 +0400
@@ -161,6 +161,7 @@
     CARD32              fpSyncs;
     Bool                usePanelTweak;
     int                 PanelTweak;
+    Bool                LVDS;
 
     CARD32              dmaPut;
     CARD32              dmaCurrent;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin