summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-10-12 19:13:44 +0000
committerEgbert Eich <eich@suse.de>2004-10-12 19:13:44 +0000
commitfcd6d7b57edb4e396189a0a2683bcf08974f3b59 (patch)
tree33b43ee1bef24113ca1d1336669d8ae468b835bf
parent65e13fc61141b36a74c7a0e696d274574641ba20 (diff)
downloadxorg-driver-xf86-video-nouveau-fcd6d7b57edb4e396189a0a2683bcf08974f3b59.tar.gz
Set fbdev mode as the default mode on PPC (Olaf Hering).
Added support for IBM space saver keyboard (Stefan Dirsch). Added support for Cherry CyMotion Master XPress (Marcus Schaefer). Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and RestoreBIOSMemSize() to be exactly opposite to the Save procedure in EnterVT() (Matthias Hopf, Alan Hourihane). Fix text mode restauration by removing the assumption that the register which determines which head is programmed is set. to the active head by the BIOS (Mark Vojkovich). When I wrote the resource code 5 years ago I made some assumptions which turned out to be false: I've assumed that the bus number of the PCI hostbridge would be the PCI bus the bridge links to. This is not correct. Fixing this assumption is not easy. However I hope that the attached patch will make the system work regardless as it 'ignores' host bridges from which the target bus is not known. This should not matter at all as we really don't care about host bridges (unless we have bridge specific code which retrieves information about the bridge). Fixed server crash on reset when a structure allocated in PreInit() was freed on CloseScreen(). Fixed ring buffer lock ups that happened because the structure that contained ringbuffer data was not zeroed after allocation. Fixed numerous warnings due to signed unsigned comparisons. programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: (NVBacklightEnable): Changed the order in which the sequencer registers and the backlight control registers are written. The sequencer control register need to be written first otherwise DPMS screen blanking produces vertical bars on a mobile device. lib/Xau/Imakefile: Build libXau static library PIC so it can be linked into toolkits that would like to wrap its functionality.
-rw-r--r--src/nv_dac.c5
-rw-r--r--src/nv_driver.c26
2 files changed, 22 insertions, 9 deletions
diff --git a/src/nv_dac.c b/src/nv_dac.c
index c1e093e..9b9b9e8 100644
--- a/src/nv_dac.c
+++ b/src/nv_dac.c
@@ -236,6 +236,9 @@ NVDACInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
} else
nvReg->cursorConfig |= 0x02000000;
+ nvReg->timingH = 0;
+ nvReg->timingV = 0;
+
return (TRUE);
}
@@ -271,8 +274,6 @@ NVDACSave(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, NVRegPtr nvReg,
saveFonts = FALSE;
#endif
- NVLockUnlock(pNv, 0);
-
vgaHWSave(pScrn, vgaReg, VGA_SR_CMAP | VGA_SR_MODE |
(saveFonts? VGA_SR_FONTS : 0));
NVUnloadStateExt(pNv, nvReg);
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 70c2687..3ca1786 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -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 @@ NVRestore(ScrnInfoPtr pScrn)
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 @@ NVDPMSSetLCD(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
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 @@ NVDPMSSetLCD(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
default:
break;
}
- vgaHWDPMSSet(pScrn, PowerManagementMode, flags);
}
@@ -1830,6 +1835,13 @@ NVSave(ScrnInfoPtr pScrn)
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);
}