diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-10-15 22:09:14 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-10-15 22:09:14 +0800 |
commit | cc892d1ba1d87d08bdd04f857efc6b8f64620018 (patch) | |
tree | f53e0d0b319af216a187b3d0e9867ca89468c09a /src/i915_hwmc.c | |
parent | b52ce0bd178c268d20334e2be8fad46037e47499 (diff) | |
parent | fd97edb62463e50a1860290d54684a68d5490bdc (diff) |
Merge branch 'xvmc' of git+ssh://zhen@people.freedesktop.org/~zhen/xf86-video-intel into xvmc
Diffstat (limited to 'src/i915_hwmc.c')
-rw-r--r-- | src/i915_hwmc.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c index 7a620767..ed5e7bc0 100644 --- a/src/i915_hwmc.c +++ b/src/i915_hwmc.c @@ -55,6 +55,7 @@ #include "xf86xvpriv.h" #endif +#define _INTEL_XVMC_SERVER_ #include "i830_hwmc.h" #include "i915_hwmc.h" @@ -350,9 +351,13 @@ static void i915_unmap_xvmc_buffers(ScrnInfoPtr pScrn, I915XvMCContextPriv *ctxp static Bool i915_allocate_xvmc_buffers(ScrnInfoPtr pScrn, I915XvMCContextPriv *ctxpriv) { I830Ptr pI830 = I830PTR(pScrn); - int flags = (IS_I915G(pI830) || IS_I915GM(pI830) || IS_I945G(pI830) || IS_I945GM(pI830)) ? - (ALIGN_BOTH_ENDS | NEED_PHYSICAL_ADDR) : ALIGN_BOTH_ENDS; - + /* FIXME xvmc ttm */ + int flags = ALIGN_BOTH_ENDS | NEED_LIFETIME_FIXED; + + if (IS_I915G(pI830) || IS_I915GM(pI830) || + IS_I945G(pI830) || IS_I945GM(pI830)) + flags |= NEED_PHYSICAL_ADDR; + if (!i830_allocate_xvmc_buffer(pScrn, "[XvMC]Static Indirect State", &(ctxpriv->mcStaticIndirectState), 4 * 1024, flags)) { @@ -383,15 +388,16 @@ static Bool i915_allocate_xvmc_buffers(ScrnInfoPtr pScrn, I915XvMCContextPriv *c return FALSE; } + /* XXX xvmc ttm */ if (!i830_allocate_xvmc_buffer(pScrn, "[XvMC]Correction Data Buffer", &(ctxpriv->mcCorrdata), 512 * 1024, - ALIGN_BOTH_ENDS)) { + ALIGN_BOTH_ENDS | NEED_LIFETIME_FIXED)) { return FALSE; } if (!i830_allocate_xvmc_buffer(pScrn, "[XvMC]batch buffer", &(ctxpriv->mcBatchBuffer), 8 * 1024, - ALIGN_BOTH_ENDS)) { + ALIGN_BOTH_ENDS | NEED_LIFETIME_FIXED)) { return FALSE; } @@ -621,9 +627,10 @@ static int I915XvMCCreateSurface(ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, ctx = pSurf->context; bufsize = SIZE_YUV420(ctx->width, ctx->height); + /* FIXME xvmc ttm */ if (!i830_allocate_xvmc_buffer(pScrn, "XvMC surface", &(sfpriv->surface), bufsize, - ALIGN_BOTH_ENDS)) { + ALIGN_BOTH_ENDS | NEED_LIFETIME_FIXED)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[XvMC] I915XvMCCreateSurface: Failed to allocate XvMC surface space!\n"); xfree(sfpriv); @@ -824,7 +831,7 @@ static int I915XvMCPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, if (pI830->XvMCEnabled) { if (FOURCC_XVMC == id) { switch (i915XvMCData->command) { - case I915_XVMC_COMMAND_DISPLAY: + case INTEL_XVMC_COMMAND_DISPLAY: if ((i915XvMCData->srfNo >= I915_XVMC_MAX_SURFACES) || !pXvMC->surfaces[i915XvMCData->srfNo] || !pXvMC->sfprivs[i915XvMCData->srfNo]) { |