diff options
author | Luc Verhaegen <libv@skynet.be> | 2009-10-26 17:53:53 +0100 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2009-11-04 15:13:03 +0100 |
commit | 7de800a69f64f37eba697d0e8d847aca514f7de2 (patch) | |
tree | a9e8dd0bbfd7aa7ac193912539b94728003fc613 | |
parent | 8f8952c549c7462a3e452bc26691bac529c12393 (diff) |
XvMC: Track flipping Buffer from via_video.c as well.
-rw-r--r-- | src/via_mpeg.c | 13 | ||||
-rw-r--r-- | src/via_mpeg.h | 1 | ||||
-rw-r--r-- | src/via_video.c | 6 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/via_mpeg.c b/src/via_mpeg.c index c1a7ba4..2823b16 100644 --- a/src/via_mpeg.c +++ b/src/via_mpeg.c @@ -502,6 +502,8 @@ ViaMpegBufferFlip(struct ViaMpeg *Mpeg, XID BufferID) if (BufferID == Mpeg->CurrentID) ViaMpegEngineIdle(Mpeg); + Mpeg->FlippingID = BufferID; + return Mpeg->Buffers[i].Mem->Base; } @@ -509,6 +511,17 @@ ViaMpegBufferFlip(struct ViaMpeg *Mpeg, XID BufferID) * */ void +ViaMpegBufferFlipRelease(struct ViaMpeg *Mpeg) +{ + VIAFUNC(Mpeg); + + Mpeg->FlippingID = 0; +} + +/* + * + */ +void ViaMpegInit(ScrnInfoPtr pScrn) { VIAPtr pVia = VIAPTR(pScrn); diff --git a/src/via_mpeg.h b/src/via_mpeg.h index 34fe381..3fe0747 100644 --- a/src/via_mpeg.h +++ b/src/via_mpeg.h @@ -76,6 +76,7 @@ void ViaMpegDestroy(ScrnInfoPtr pScrn); Bool ViaMpegBufferIDVerify(struct ViaMpeg *Mpeg, XID BufferID, int Width, int Height); unsigned long ViaMpegBufferFlip(struct ViaMpeg *Mpeg, XID BufferID); +void ViaMpegBufferFlipRelease(struct ViaMpeg *Mpeg); /* * Mpeg support for XvMC(E). diff --git a/src/via_video.c b/src/via_video.c index d2dff4b..36bc050 100644 --- a/src/via_video.c +++ b/src/via_video.c @@ -2040,6 +2040,9 @@ viaPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, /* make sure engines are idle first */ ViaHQVIdle(Swov); + if (Port->FourCC == FOURCC_MPEG) + ViaMpegBufferFlipRelease(Swov->Mpeg); + if (!ViaAllocateFrontBuffer(pScrn, id, width, height)) { ViaSwovSurfaceDestroy(pScrn); xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s: Front buffer allocation" @@ -2416,6 +2419,9 @@ ViaSwovStop(ScrnInfoPtr pScrn) Swov->HQV->Control &= ~HQV_ENABLE; + /* doesn't matter if we were doing mpeg or not */ + ViaMpegBufferFlipRelease(Swov->Mpeg); + if (Swov->HQVDisablePatch) VGASRMask(pScrn, 0x2E, 0x10, 0x10); |