summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-11-08 16:52:41 -0800
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-11-08 16:52:41 -0800
commit43a59ab26b09fcc24de1ed7bd770bb622f899ceb (patch)
treeb7b3e90c49f0a3afdaf63a5bf66e1b1f03740a9c
parente784e152a8e84b6e447b55a5c7019e7b47e17621 (diff)
Clear current video crtc on DPMS off
When calling the video DPMS off function, make sure we zero out the current crtc so that it will be properly re-set up next time video is turned on. Fix from Peter Clifton with changes by Keith Packard.
-rw-r--r--src/i830_video.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 73ae7719..5325bbdb 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2832,15 +2832,14 @@ i830_crtc_dpms_video(xf86CrtcPtr crtc, Bool on)
if (crtc != pPriv->current_crtc)
return;
- /* Check if it's the crtc the overlay is on */
- if (on) {
- i830_overlay_switch_to_crtc (pScrn, crtc);
- } else {
+ /* Check if it's the crtc the overlay is off */
+ if (!on) {
/* We stop the video when mode switching, so we don't lock up
* the engine. The overlayOK will determine whether we can re-enable
* with the current video on completion of the mode switch.
*/
I830StopVideo(pScrn, pPriv, TRUE);
+ pPriv->current_crtc = NULL;
pPriv->overlayOK = FALSE;
pPriv->oneLineMode = FALSE;
}