summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2008-02-11 15:26:51 -0500
committerAlex Deucher <alex@botch2.(none)>2008-02-11 15:26:51 -0500
commit9ab5d2ec7c583c74f364d7cfbb54bcd2cd8ae2f5 (patch)
treeedf54cd70f47eb96f515829e391be11504da7924
parente33edca75bd9df0aa19a33e74c38a6d02610befd (diff)
RADEON: always restore crtc1 before crtc0 when using both crtcs
In some rare cases restoring crtc0 first will result in a blank screen on crtc1. If you are having issues with a blank screen on crtc1 that used to work on 6.6.3 or before, this should help.
-rw-r--r--src/radeon_crtc.c17
-rw-r--r--src/radeon_output.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index e1e45502..d21612a5 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -68,11 +68,28 @@ static void
radeon_crtc_dpms(xf86CrtcPtr crtc, int mode)
{
RADEONInfoPtr info = RADEONPTR(crtc->scrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(crtc->scrn);
+ RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
+ xf86CrtcPtr crtc0 = pRADEONEnt->pCrtc[0];
if (IS_AVIVO_VARIANT) {
atombios_crtc_dpms(crtc, mode);
} else {
+
+ /* need to restore crtc1 before crtc0 or we may get a blank screen
+ * in some cases
+ */
+ if ((radeon_crtc->crtc_id == 1) && (mode == DPMSModeOn)) {
+ if (crtc0->enabled)
+ crtc0->funcs->dpms(crtc0, DPMSModeOff);
+ }
+
legacy_crtc_dpms(crtc, mode);
+
+ if ((radeon_crtc->crtc_id == 1) && (mode == DPMSModeOn)) {
+ if (crtc0->enabled)
+ crtc0->funcs->dpms(crtc0, mode);
+ }
}
}
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 9d53b6e6..7d73fa8e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -633,6 +633,7 @@ static void
radeon_mode_prepare(xf86OutputPtr output)
{
radeon_bios_output_lock(output, TRUE);
+ radeon_dpms(output, DPMSModeOff);
}
static void