summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@dulcimer.keithp.com>2007-05-23 18:59:10 -0700
committerKeith Packard <keithp@dulcimer.keithp.com>2007-05-23 20:47:52 -0700
commit08753f9b79f3f09879a18b552d90d88dbf52d4be (patch)
treedb9e42b95eb0c47d1af771ab25185222a1c682b3
parentaa187186dc4f2d770a642060fe54f547ea8952b3 (diff)
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.
-rw-r--r--src/i830_video.c5
1 files changed, 4 insertions, 1 deletions
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