diff options
author | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-09 16:12:21 +0200 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-09 16:12:21 +0200 |
commit | 4d992386e2ab9d8c50f0484445564325dfb42930 (patch) | |
tree | 8a75367c2f7737b1ef7715a6fe6d3b3a06548fc0 /src/radeon_driver.c | |
parent | 2618cf2aa8ed76411b943eb90c95869814c2f151 (diff) |
enable all outputs on each crtc on mode restore
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index d05d9f70..e16c1831 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -4619,6 +4619,22 @@ void RADEONChangeSurfaces(ScrnInfoPtr pScrn) RADEONSaveSurfaces(pScrn, &info->ModeReg); } +static void +RADEONEnableOuputs(ScrnInfoPtr pScrn, int crtc_num) +{ + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); + int i; + xf86OutputPtr output; + + for (i = 0; i < RADEON_MAX_CONNECTOR; i++) { + if (pRADEONEnt->PortInfo[i]->crtc_num == crtc_num) { + output = pRADEONEnt->pOutput[i]; + RADEONEnableDisplay(pScrn, output, TRUE); + } + } + +} + /* Write out state to define a new video mode */ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) { @@ -4664,10 +4680,7 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) RADEONRestoreCrtc2Registers(pScrn, restore); RADEONRestorePLL2Registers(pScrn, restore); RADEONRestoreFPRegisters(pScrn, restore); - output = RADEONGetCrtcConnector(pScrn, 2); - if (output) { - RADEONEnableDisplay(pScrn, output, TRUE); - } + RADEONEnableOuputs(pScrn, 2); } else { RADEONRestoreMemMapRegisters(pScrn, restore); RADEONRestoreCommonRegisters(pScrn, restore); @@ -4679,15 +4692,9 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) RADEONRestoreCrtcRegisters(pScrn, restore); RADEONRestorePLLRegisters(pScrn, restore); RADEONRestoreFPRegisters(pScrn, restore); - output = RADEONGetCrtcConnector(pScrn, 1); - if (output) { - RADEONEnableDisplay(pScrn, output, TRUE); - } + RADEONEnableOuputs(pScrn, 1); if (pCRTC2->binding == 1) { - output = RADEONGetCrtcConnector(pScrn, 2); - if (output) { - RADEONEnableDisplay(pScrn, output, TRUE); - } + RADEONEnableOuputs(pScrn, 2); } } } else { @@ -4701,15 +4708,11 @@ void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) RADEONRestoreCrtcRegisters(pScrn, restore); RADEONRestorePLLRegisters(pScrn, restore); RADEONRestoreFPRegisters(pScrn, restore); - output = RADEONGetCrtcConnector(pScrn, 1); - if (output) { - RADEONEnableDisplay(pScrn, output, TRUE); - } + + RADEONEnableOuputs(pScrn, 1); + if ((pCRTC2->binding == 1) || pRADEONEnt->HasSecondary) { - output = RADEONGetCrtcConnector(pScrn, 2); - if (output) { - RADEONEnableDisplay(pScrn, output, TRUE); - } + RADEONEnableOuputs(pScrn, 2); } } |