summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2009-02-25 16:48:22 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2009-02-25 16:48:22 +0800
commita625a07022ea7f6757b288fcc2ffb9e27c7f8341 (patch)
treef9d07a3fbb2d842374034eb269f0588f7afc4828 /src/i830_video.c
parentf6d8ae69b0f97e696c142f06c8038f336ed024f9 (diff)
XvMC: fix broken xvmc on 965
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c35
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