diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2009-02-25 16:48:22 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2009-02-25 16:48:22 +0800 |
commit | a625a07022ea7f6757b288fcc2ffb9e27c7f8341 (patch) | |
tree | f9d07a3fbb2d842374034eb269f0588f7afc4828 /src/i830_video.c | |
parent | f6d8ae69b0f97e696c142f06c8038f336ed024f9 (diff) |
XvMC: fix broken xvmc on 965
Diffstat (limited to 'src/i830_video.c')
-rw-r--r-- | src/i830_video.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 76b51898..cdb10723 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2409,18 +2409,31 @@ I830PutImage(ScrnInfoPtr pScrn, pPriv->buf = NULL; } - if (pPriv->buf == NULL) { - pPriv->buf = drm_intel_bo_alloc(pI830->bufmgr, - "xv buffer", alloc_size, 4096); - if (pPriv->buf == NULL) - return BadAlloc; - if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) { - drm_intel_bo_unreference(pPriv->buf); - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to pin xv buffer\n"); - return BadAlloc; - } +#ifdef INTEL_XVMC + if (id == FOURCC_XVMC && + pPriv->rotation == RR_Rotate_0) { + if (pPriv->buf) { + assert(pPriv->textured); + drm_intel_bo_unreference(pPriv->buf); + pPriv->buf = NULL; + } + } else { +#endif + if (pPriv->buf == NULL) { + pPriv->buf = drm_intel_bo_alloc(pI830->bufmgr, + "xv buffer", alloc_size, 4096); + if (pPriv->buf == NULL) + return BadAlloc; + if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) { + drm_intel_bo_unreference(pPriv->buf); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to pin xv buffer\n"); + return BadAlloc; + } + } +#ifdef INTEL_XVMC } +#endif /* fixup pointers */ #ifdef INTEL_XVMC |