diff options
author | Deron Johnson <deron.johnson@sun.com> | 2005-01-06 04:14:02 +0000 |
---|---|---|
committer | Deron Johnson <deron.johnson@sun.com> | 2005-01-06 04:14:02 +0000 |
commit | 57730378a5fd0993c94326fb80de07faf624f15d (patch) | |
tree | 91ab46128ce82e27c7d23c348acfc0f4f84d0ab5 /src/nv_setup.c | |
parent | bbafc6d2fcb21671de3cfb4ff973409405162e7a (diff) |
Integrate updates from Xorg 6.8.2 RC2.lg3d-dev-0-6-1
VS: ----------------------------------------------------------------------
Diffstat (limited to 'src/nv_setup.c')
-rw-r--r-- | src/nv_setup.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/nv_setup.c b/src/nv_setup.c index 3d58efa..95bb42f 100644 --- a/src/nv_setup.c +++ b/src/nv_setup.c @@ -37,7 +37,7 @@ |* *| \***************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.38 2003/09/08 20:00:27 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c,v 1.44 2004/12/09 00:21:05 mvojkovi Exp $ */ #include "nv_include.h" @@ -292,10 +292,10 @@ static void nv10GetConfig (NVPtr pNv) } #endif - if((pNv->Chipset && 0xffff) == 0x01a0) { + if(implementation == 0x01a0) { int amt = pciReadLong(pciTag(0, 0, 1), 0x7C); pNv->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024; - } else if((pNv->Chipset & 0xffff) == 0x01f0) { + } else if(implementation == 0x01f0) { int amt = pciReadLong(pciTag(0, 0, 1), 0x84); pNv->RamAmountKBytes = (((amt >> 4) & 127) + 1) * 1024; } else { @@ -304,10 +304,7 @@ static void nv10GetConfig (NVPtr pNv) pNv->CrystalFreqKHz = (pNv->PEXTDEV[0x0000/4] & (1 << 6)) ? 14318 : 13500; - if((implementation == 0x0170) || - (implementation == 0x0180) || - (implementation == 0x01F0) || - (implementation >= 0x0250)) + if(pNv->twoHeads && (implementation != 0x0110)) { if(pNv->PEXTDEV[0x0000/4] & (1 << 22)) pNv->CrystalFreqKHz = 27000; @@ -381,15 +378,22 @@ NVCommonSetup(ScrnInfoPtr pScrn) pNv->PDIO0 = (U008*)pNv->REGS + 0x00681000; pNv->PVIO = (U008*)pNv->REGS + 0x000C0000; - pNv->twoHeads = (implementation >= 0x0110) && + pNv->twoHeads = (pNv->Architecture >= NV_ARCH_10) && + (implementation != 0x0100) && (implementation != 0x0150) && (implementation != 0x01A0) && (implementation != 0x0200); - pNv->fpScaler = (pNv->twoHeads && (implementation != 0x0110)); + pNv->fpScaler = (pNv->FpScale && pNv->twoHeads && (implementation!=0x0110)); pNv->twoStagePLL = (implementation == 0x0310) || - (implementation == 0x0340); + (implementation == 0x0340) || + (pNv->Architecture >= NV_ARCH_40); + + pNv->WaitVSyncPossible = (pNv->Architecture >= NV_ARCH_10) && + (implementation != 0x0100); + + pNv->BlendingPossible = ((pNv->Chipset & 0xffff) != 0x0020); /* look for known laptop chips */ switch(pNv->Chipset & 0xffff) { @@ -403,6 +407,7 @@ NVCommonSetup(ScrnInfoPtr pScrn) case 0x017D: case 0x0186: case 0x0187: + case 0x018D: case 0x0286: case 0x028C: case 0x0316: @@ -424,6 +429,13 @@ NVCommonSetup(ScrnInfoPtr pScrn) case 0x0349: case 0x034B: case 0x034C: + case 0x0160: + case 0x0166: + case 0x00C8: + case 0x00CC: + case 0x0144: + case 0x0146: + case 0x0148: mobile = TRUE; break; default: @@ -658,6 +670,7 @@ NVCommonSetup(ScrnInfoPtr pScrn) if(pNv->FlatPanel && !pNv->Television) { pNv->fpWidth = pNv->PRAMDAC[0x0820/4] + 1; pNv->fpHeight = pNv->PRAMDAC[0x0800/4] + 1; + pNv->fpSyncs = pNv->PRAMDAC[0x0848/4] & 0x30000033; xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Panel size is %i x %i\n", pNv->fpWidth, pNv->fpHeight); } @@ -665,7 +678,7 @@ NVCommonSetup(ScrnInfoPtr pScrn) if(monitorA) xf86SetDDCproperties(pScrn, monitorA); - if(!pNv->FlatPanel || (pScrn->depth != 24)) + if(!pNv->FlatPanel || (pScrn->depth != 24) || !pNv->twoHeads) pNv->FPDither = FALSE; } |