summaryrefslogtreecommitdiff
path: root/src/radeon_crtc.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@cube.(none)>2008-04-29 21:01:41 -0400
committerAlex Deucher <alex@cube.(none)>2008-04-29 21:01:41 -0400
commit445b71021843665ba32f37b2ce5c9d2857c07cc7 (patch)
tree40c09b9e054694369daecbec3d53a31b4da37d74 /src/radeon_crtc.c
parent070cce5255a5c311f9d8b85ec54bd56655014933 (diff)
RADEON: assorted fixes
- free rotate pixmaps on VT switch - save crtc/output status so we only turn on crtcs/outputs if they are off - show/hide cursors when changing modes
Diffstat (limited to 'src/radeon_crtc.c')
-rw-r--r--src/radeon_crtc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index e2d31eba..6a9a76d0 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -67,6 +67,9 @@ radeon_crtc_dpms(xf86CrtcPtr crtc, int mode)
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
xf86CrtcPtr crtc0 = pRADEONEnt->pCrtc[0];
+ if ((mode == DPMSModeOn) && radeon_crtc->enabled)
+ return;
+
if (IS_AVIVO_VARIANT) {
atombios_crtc_dpms(crtc, mode);
} else {
@@ -86,6 +89,11 @@ radeon_crtc_dpms(xf86CrtcPtr crtc, int mode)
legacy_crtc_dpms(crtc0, mode);
}
}
+
+ if (mode == DPMSModeOn)
+ radeon_crtc->enabled = TRUE;
+ else
+ radeon_crtc->enabled = FALSE;
}
static Bool
@@ -98,6 +106,10 @@ radeon_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode,
static void
radeon_crtc_mode_prepare(xf86CrtcPtr crtc)
{
+ RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
+
+ if (radeon_crtc->enabled)
+ crtc->funcs->hide_cursor(crtc);
radeon_crtc_dpms(crtc, DPMSModeOff);
}
@@ -235,6 +247,10 @@ radeon_crtc_mode_commit(xf86CrtcPtr crtc)
}
radeon_crtc_dpms(crtc, DPMSModeOn);
+
+ if (crtc->scrn->pScreen != NULL)
+ xf86_reload_cursors(crtc->scrn->pScreen);
+
}
void