summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2008-03-24 13:24:12 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-03-24 13:24:12 +0800
commit5fcc002f77ebb66c1dc0f901a377ccf9bbc1d0bd (patch)
tree3735d29e376f29cc24ae72879e6f0ea888913982 /src/i830_video.c
parent645980596450ed21c3b8927410a6bfe38a0c55d1 (diff)
Fix crash triggered by dpms low power mode with hardware overlay running
When overlay switch crtc, it ignores current crtc dpms mode which might lead to hang.
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 0d0a9a03..59396349 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -385,11 +385,13 @@ 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))
+ /* overlay can't be used on pipe with double wide, and pipe must be enabled. */
+ if ((!IS_I965G(pI830) && (INREG(pipeconf_reg) & PIPEACONF_DOUBLE_WIDE))
+ || (intel_crtc->dpms_mode == DPMSModeOff))
pPriv->overlayOK = FALSE;
else
pPriv->overlayOK = TRUE;
-
+
if (!pPriv->overlayOK)
return;
@@ -1829,10 +1831,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)