From 8a5836d887e27a9385d321a8e9f1f3243e881b78 Mon Sep 17 00:00:00 2001 From: Maxim Levitsky Date: Wed, 12 Mar 2008 22:18:59 +0200 Subject: [PATCH] intel: fix crash triggered by dpms low power mode with hardware overlay running --- src/i830_video.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/i830_video.c b/src/i830_video.c index 1867da4..c430031 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -352,7 +352,8 @@ i830_overlay_switch_to_crtc (ScrnInfoPtr pScrn, xf86CrtcPtr crtc) I830CrtcPrivatePtr intel_crtc = crtc->driver_private; int pipeconf_reg = intel_crtc->pipe == 0 ? PIPEACONF : PIPEBCONF; - if (!IS_I965G(pI830) && (INREG(pipeconf_reg) & PIPEACONF_DOUBLE_WIDE)) + if ((!IS_I965G(pI830) && (INREG(pipeconf_reg) & PIPEACONF_DOUBLE_WIDE)) + || intel_crtc->dpms_mode != DPMSModeOn) pPriv->overlayOK = FALSE; else pPriv->overlayOK = TRUE; @@ -1775,10 +1776,11 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc, if (crtc != pPriv->current_crtc) { - pPriv->current_crtc = crtc; i830_overlay_switch_to_crtc (pScrn, crtc); - if (pPriv->overlayOK) + if (pPriv->overlayOK) { + pPriv->current_crtc = crtc; I830ResetVideo (pScrn); + } } if (!pPriv->overlayOK) -- 1.5.3.8