diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2006-11-30 17:36:29 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2006-11-30 17:36:29 -0800 |
commit | 558ef7e26e361529a05360610abc3cbcdb04fd67 (patch) | |
tree | ac766251b5851362c046929d882285b52f741da3 | |
parent | 08bb966abbca11c4581d666af3249e4922156e03 (diff) |
Save and restore DAC0 register 608 when probing for connected CRTs.
Adapted from a patch by Egbert Eich for Novell bug #220197.
-rw-r--r-- | src/nv_setup.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nv_setup.c b/src/nv_setup.c index c7a0e86..4009fde 100644 --- a/src/nv_setup.c +++ b/src/nv_setup.c @@ -174,14 +174,17 @@ NVIsConnected (ScrnInfoPtr pScrn, int output) { NVPtr pNv = NVPTR(pScrn); volatile U032 *PRAMDAC = pNv->PRAMDAC0; - CARD32 reg52C, reg608; + CARD32 reg52C, reg608, dac0_reg608; Bool present; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Probing for analog device on output %s...\n", output ? "B" : "A"); - if(output) PRAMDAC += 0x800; + if(output) { + dac0_reg608 = PRAMDAC[0x0608/4]; + PRAMDAC += 0x800; + } reg52C = PRAMDAC[0x052C/4]; reg608 = PRAMDAC[0x0608/4]; @@ -204,7 +207,8 @@ NVIsConnected (ScrnInfoPtr pScrn, int output) else xf86DrvMsg(pScrn->scrnIndex, X_PROBED, " ...can't find one\n"); - pNv->PRAMDAC0[0x0608/4] &= 0x0000EFFF; + if(output) + pNv->PRAMDAC0[0x0608/4] = dac0_reg608; PRAMDAC[0x052C/4] = reg52C; PRAMDAC[0x0608/4] = reg608; |