diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2004-11-14 18:13:27 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2004-11-14 18:13:27 +0000 |
commit | 2b3cb71eb2cdd71bda3e3e0072fc3df9f111e0a4 (patch) | |
tree | aa18cc2d85832737cedd3a1f08f9e996cb9cfd33 /src/nv_setup.c | |
parent | bbafc6d2fcb21671de3cfb4ff973409405162e7a (diff) |
(Bugzilla #1777) Import Mark Vojkovich's changes to NV driver since last
sync with XFree86, including: Support for new NVIDIA chips. Egbert has
a laptop that needs some DPMS ordering reversed. New chip support and
workaround for Toshiba M30 laptop issue. PCI-Xpress chip support. DPMS
support for DVI. Cursor changes for NV11 so that alpha blended cursors
will work in conjunction with dithering (laptop panels). It previously
did not. HW support for alpha blended stretch blits on NV5 and higher,
though nothing is using them at this point. Add support for VBlank
syncing the Xv Blit adaptor on hardware that supports it (NV11 and
higher). Make console restoration a little more robust. We were making
an assumption that failed on a newer laptop. Workaround for some NV31
DVI artifacts.
Also add nVidia license statement to nv man page to comply with requirement
that it appear in "user documentation"
Diffstat (limited to 'src/nv_setup.c')
-rw-r--r-- | src/nv_setup.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/src/nv_setup.c b/src/nv_setup.c index 3d58efa..cc157f6 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.43 2004/08/26 22:38:47 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 0x0189: case 0x0286: case 0x028C: case 0x0316: @@ -424,6 +429,15 @@ NVCommonSetup(ScrnInfoPtr pScrn) case 0x0349: case 0x034B: case 0x034C: + case 0x0160: + case 0x0166: + case 0x00C8: + case 0x00C9: + case 0x00CC: + case 0x0147: + case 0x0148: + case 0x0149: + case 0x014C: mobile = TRUE; break; default: @@ -658,6 +672,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 +680,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; } |