From 3acc2648b5ec54ff299341d46033f8534fb6ee4b Mon Sep 17 00:00:00 2001 From: Peter Clifton Date: Fri, 2 Nov 2007 00:24:45 +0000 Subject: [PATCH] Fix crash in XV overlay video after a mode switch --- src/i830_video.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/i830_video.c b/src/i830_video.c index 255444b..338bc08 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; } -- 1.5.2.5