diff --git a/src/i830_video.c b/src/i830_video.c index 486f670..62b9a5c 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -1005,7 +1005,7 @@ I830SetupImageVideoTextured(ScreenPtr pScreen) pPriv->videoStatus = 0; pPriv->buf = NULL; pPriv->currentBuf = 0; - pPriv->doubleBuffer = 0; + pPriv->doubleBuffer = 1; pPriv->rotation = RR_Rotate_0; @@ -2487,6 +2487,7 @@ I830PutImage(ScrnInfoPtr pScrn, i830_fill_colorkey (pScreen, pPriv->colorKey, clipBoxes); } } else if (IS_I965G(pI830)) { + pPriv->currentBuf = (pPriv->currentBuf + 1)%2; I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height, dstPitch, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pPixmap); diff --git a/src/i965_video.c b/src/i965_video.c index 4c79259..18f01c4 100644 --- a/src/i965_video.c +++ b/src/i965_video.c @@ -217,13 +217,22 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, #if 0 ErrorF ("INST_PM 0x%08x\n", INREG(INST_PM)); #endif + if (pPriv->currentBuf == 0) { + src_surf_base[0] = pPriv->YBuf0offset; + src_surf_base[1] = pPriv->YBuf0offset; + src_surf_base[2] = pPriv->VBuf0offset; + src_surf_base[3] = pPriv->VBuf0offset; + src_surf_base[4] = pPriv->UBuf0offset; + src_surf_base[5] = pPriv->UBuf0offset; + } else { + src_surf_base[0] = pPriv->YBuf1offset; + src_surf_base[1] = pPriv->YBuf1offset; + src_surf_base[2] = pPriv->VBuf1offset; + src_surf_base[3] = pPriv->VBuf1offset; + src_surf_base[4] = pPriv->UBuf1offset; + src_surf_base[5] = pPriv->UBuf1offset; + } - src_surf_base[0] = pPriv->YBuf0offset; - src_surf_base[1] = pPriv->YBuf0offset; - src_surf_base[2] = pPriv->VBuf0offset; - src_surf_base[3] = pPriv->VBuf0offset; - src_surf_base[4] = pPriv->UBuf0offset; - src_surf_base[5] = pPriv->UBuf0offset; #if 0 ErrorF ("base 0 0x%x base 1 0x%x base 2 0x%x\n", src_surf_base[0], src_surf_base[1], src_surf_base[2]);