From 08753f9b79f3f09879a18b552d90d88dbf52d4be Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 23 May 2007 18:59:10 -0700 Subject: [PATCH] Use FLIP_CONTINUE with ~OVERLAY_ENABLE to turn overlay off. This makes the overlay work on i830 with the modesetting driver. I don't know why the pre-modesetting driver worked without this, but it did. A more 'correct' fix would be welcome, but this does seem to do the trick. --- src/i830_video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i830_video.c b/src/i830_video.c index 145d25a1..852c00f0 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -401,10 +401,13 @@ i830_overlay_off(ScrnInfoPtr pScrn) I830Ptr pI830 = I830PTR(pScrn); if (*pI830->overlayOn) { int spin = 1000000; + I830OverlayRegPtr overlay = + (I830OverlayRegPtr) (pI830->FbBase + pI830->overlay_regs->offset); + overlay->OCMD &= ~OVERLAY_ENABLE; BEGIN_LP_RING(6); OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE); OUT_RING(MI_NOOP); - OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_FLIP_OFF); + OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_FLIP_CONTINUE); if (IS_I965G(pI830)) OUT_RING(pI830->overlay_regs->offset | OFC_UPDATE); else