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.
This commit is contained in:
Keith Packard 2007-05-23 18:59:10 -07:00
parent aa187186dc
commit 08753f9b79
1 changed files with 4 additions and 1 deletions

View File

@ -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