For textured video, disable double buffering and sync before uploading new video

data.  Allows more videos to play simultaneously.
This commit is contained in:
Eric Anholt 2006-05-16 08:40:53 -07:00
parent 29a8e88ed0
commit db3683907d
1 changed files with 15 additions and 1 deletions

View File

@ -864,7 +864,7 @@ I830SetupImageVideoTextured(ScreenPtr pScreen)
pPriv->videoStatus = 0;
pPriv->linear = NULL;
pPriv->currentBuf = 0;
pPriv->doubleBuffer = 1;
pPriv->doubleBuffer = 0;
/* gotta uninit this someplace, XXX: shouldn't be necessary for textured */
REGION_NULL(pScreen, &pPriv->clip);
@ -2570,6 +2570,9 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
ADVANCE_LP_RING();
}
if (pI830->AccelInfoRec)
pI830->AccelInfoRec->NeedToSync = TRUE;
}
static FBLinearPtr
@ -2805,6 +2808,17 @@ I830PutImage(ScrnInfoPtr pScrn,
left = (x1 >> 16) & ~1;
npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left;
if (pPriv->textured) {
/* For textured video, we don't double buffer, and instead just wait for
* acceleration to finish before writing the new video data into
* framebuffer.
*/
if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) {
(*pI830->AccelInfoRec->Sync)(pScrn);
pI830->AccelInfoRec->NeedToSync = FALSE;
}
}
switch (id) {
case FOURCC_YV12:
case FOURCC_I420: