Index: programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c =================================================================== RCS file: /work/eich/freedesktop/cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 17 Sep 2004 03:04:52 -0000 1.6 +++ programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c 12 Oct 2004 19:13:44 -0000 1.7 @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.5 2004/08/16 09:13:14 ajax Exp $ */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c,v 1.6 2004/09/17 03:04:52 ajax Exp $ */ /* $XConsortium: nv_driver.c /main/3 1996/10/28 05:13:37 kaleb $ */ /* * Copyright 1996-1997 David J. McKay @@ -1488,17 +1488,21 @@ NVPtr pNv = NVPTR(pScrn); NVRegPtr nvReg = &pNv->SavedReg; + NVLockUnlock(pNv, 0); if(pNv->twoHeads) { - VGA_WR08(pNv->PCIO, 0x03D4, 0x44); - VGA_WR08(pNv->PCIO, 0x03D5, nvReg->crtcOwner); - NVLockUnlock(pNv, 0); + VGA_WR08(pNv->PCIO, 0x03D4, 0x44); + VGA_WR08(pNv->PCIO, 0x03D5, pNv->CRTCnumber * 0x3); + NVLockUnlock(pNv, 0); } - NVLockUnlock(pNv, 0); - /* Only restore text mode fonts/text for the primary card */ vgaHWProtect(pScrn, TRUE); NVDACRestore(pScrn, vgaReg, nvReg, pNv->Primary); + if(pNv->twoHeads) { + VGA_WR08(pNv->PCIO, 0x03D4, 0x44); + VGA_WR08(pNv->PCIO, 0x03D5, nvReg->crtcOwner); + } + vgaHWProtect(pScrn, FALSE); } @@ -1533,6 +1537,8 @@ if (!pScrn->vtSema) return; + vgaHWDPMSSet(pScrn, PowerManagementMode, flags); + switch (PowerManagementMode) { case DPMSModeStandby: /* HSync: Off, VSync: On */ case DPMSModeSuspend: /* HSync: On, VSync: Off */ @@ -1544,7 +1550,6 @@ default: break; } - vgaHWDPMSSet(pScrn, PowerManagementMode, flags); } @@ -1829,6 +1834,13 @@ NVRegPtr nvReg = &pNv->SavedReg; vgaHWPtr pVga = VGAHWPTR(pScrn); vgaRegPtr vgaReg = &pVga->SavedReg; + + NVLockUnlock(pNv, 0); + if(pNv->twoHeads) { + VGA_WR08(pNv->PCIO, 0x03D4, 0x44); + VGA_WR08(pNv->PCIO, 0x03D5, pNv->CRTCnumber * 0x3); + NVLockUnlock(pNv, 0); + } NVDACSave(pScrn, vgaReg, nvReg, pNv->Primary); } Index: programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c =================================================================== RCS file: /work/eich/freedesktop/cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c 23 Apr 2004 19:42:10 -0000 1.2 +++ programs/Xserver/hw/xfree86/drivers/nv/nv_dac.c 12 Oct 2004 19:13:44 -0000 1.3 @@ -274,8 +274,6 @@ saveFonts = FALSE; #endif - NVLockUnlock(pNv, 0); - vgaHWSave(pScrn, vgaReg, VGA_SR_CMAP | VGA_SR_MODE | (saveFonts? VGA_SR_FONTS : 0)); NVUnloadStateExt(pNv, nvReg);