diff --git a/src/i830_video.c b/src/i830_video.c index 5325bbd..fddeef4 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -478,11 +478,21 @@ i830_overlay_off(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); I830OverlayRegPtr overlay = I830OVERLAYREG(pI830); + I830PortPrivPtr pPriv = pI830->adaptor->pPortPrivates[0].ptr; + Bool deactivate = 0; if (!*pI830->overlayOn) return; /* + * On I830, if pipe A is off when the overlayis enabled, it will fail to + * turn on and blank the entire screen or lock up the ring. Light up pipe + * A in this case to provide a clock for the overlay hardware + */ + if (pPriv->current_crtc && i830_crtc_pipe (pPriv->current_crtc) != 0) + deactivate = i830_pipe_a_require_activate (pScrn); + + /* * Wait for overlay to go idle. This has to be * separated from the turning off state by a WaitSync * to ensure the overlay will not read OCMD early and @@ -519,6 +529,13 @@ i830_overlay_off(ScrnInfoPtr pScrn) } *pI830->overlayOn = FALSE; OVERLAY_DEBUG("overlay_off\n"); + + /* + * If we turned pipe A on up above, turn it + * back off + */ + if (deactivate) + i830_pipe_a_require_deactivate (pScrn); } void