summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLisa Wu <Lisa.Wu@amd.com>2007-08-15 19:17:51 -0400
committerAlex Deucher <alex@botch2.com>2007-08-15 19:17:51 -0400
commit6f011aaabaf18d66ffc255ad76aaf938b2396302 (patch)
tree13644bf0322b3f42c43ae230811af53264487cb5 /src
parentc8dad98abb042c6abbbee18f9ae4db72084bc513 (diff)
RADEON: fix console restore on r3xx and r4xx
When restoring the console we need to: 1) we need to restore DAC registers after all other registers are restored and CRTCs are enabled. 2) we need to enable CRTC2 registers before CRTC1 registers
Diffstat (limited to 'src')
-rw-r--r--src/radeon_driver.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c1f0c3c..09464c1 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5076,7 +5076,7 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore)
RADEONRestoreFPRegisters(pScrn, restore);
RADEONRestoreFP2Registers(pScrn, restore);
RADEONRestoreLVDSRegisters(pScrn, restore);
- RADEONRestoreDACRegisters(pScrn, restore);
+
if (info->InternalTVOut)
RADEONRestoreTVRegisters(pScrn, restore);
@@ -5553,21 +5553,19 @@ void RADEONRestore(ScrnInfoPtr pScrn)
}
#endif
- /*RADEONUnblank(pScrn);*/
- /* R4xx hangs when unblanking, but seems to restore fine without it.
- * This will probably cause problems with non-VGA consoles.
- */
- if (!info->IsAtomBios) {
- /* need to make sure we don't enable a crtc by accident or we may get a hang */
- if (info->crtc_on) {
- crtc = xf86_config->crtc[0];
- crtc->funcs->dpms(crtc, DPMSModeOn);
- }
- if (info->crtc2_on) {
- crtc = xf86_config->crtc[1];
- crtc->funcs->dpms(crtc, DPMSModeOn);
- }
+ /* need to make sure we don't enable a crtc by accident or we may get a hang */
+ if (info->crtc2_on) {
+ crtc = xf86_config->crtc[1];
+ crtc->funcs->dpms(crtc, DPMSModeOn);
+ }
+ if (info->crtc_on) {
+ crtc = xf86_config->crtc[0];
+ crtc->funcs->dpms(crtc, DPMSModeOn);
}
+ /* to restore console mode, DAC registers should be set after every other registers are set,
+ * otherwise,we may get blank screen
+ */
+ RADEONRestoreDACRegisters(pScrn, restore);
#if 0
RADEONWaitForVerticalSync(pScrn);