diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2009-07-24 10:39:05 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2009-07-24 10:39:05 +0800 |
commit | 7dc95b4f1dfecbeb7e9f4a0c35fda32d020be8fe (patch) | |
tree | 559b862598c63d066dcc12ef728f514b53c33743 /src/i915_hwmc.c | |
parent | 12c5aeca7a3db92d3522d00f5daf338d522e2176 (diff) |
XvMC: pin XvMC buffers under KMS.
Under KMS, the buffer allocated by i830_allocate_memory
isn't pinned anymore. However currently 915 XvMC needs
static offsets.
Fixes bug #22872
Diffstat (limited to 'src/i915_hwmc.c')
-rw-r--r-- | src/i915_hwmc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c index 0723c801..6712caac 100644 --- a/src/i915_hwmc.c +++ b/src/i915_hwmc.c @@ -368,32 +368,32 @@ static Bool i915_allocate_xvmc_buffers(ScrnInfoPtr pScrn, I915XvMCContextPriv *c static void i915_free_xvmc_buffers(ScrnInfoPtr pScrn, I915XvMCContextPriv *ctxpriv) { if (ctxpriv->mcStaticIndirectState) { - i830_free_memory(pScrn, ctxpriv->mcStaticIndirectState); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcStaticIndirectState); ctxpriv->mcStaticIndirectState = NULL; } if (ctxpriv->mcSamplerState) { - i830_free_memory(pScrn, ctxpriv->mcSamplerState); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcSamplerState); ctxpriv->mcSamplerState = NULL; } if (ctxpriv->mcMapState) { - i830_free_memory(pScrn, ctxpriv->mcMapState); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcMapState); ctxpriv->mcMapState = NULL; } if (ctxpriv->mcPixelShaderProgram) { - i830_free_memory(pScrn, ctxpriv->mcPixelShaderProgram); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcPixelShaderProgram); ctxpriv->mcPixelShaderProgram = NULL; } if (ctxpriv->mcPixelShaderConstants) { - i830_free_memory(pScrn, ctxpriv->mcPixelShaderConstants); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcPixelShaderConstants); ctxpriv->mcPixelShaderConstants = NULL; } if (ctxpriv->mcCorrdata) { - i830_free_memory(pScrn, ctxpriv->mcCorrdata); + i830_free_xvmc_buffer(pScrn, ctxpriv->mcCorrdata); ctxpriv->mcCorrdata = NULL; } @@ -606,7 +606,7 @@ static int i915_xvmc_create_surface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf, (drmAddress)&sfpriv->surface_handle) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] drmAddMap(surface_handle) failed!\n"); - i830_free_memory(pScrn, sfpriv->surface); + i830_free_xvmc_buffer(pScrn, sfpriv->surface); xfree(sfpriv); xfree(*priv); *priv = NULL; @@ -694,7 +694,7 @@ static int i915_xvmc_create_subpict(ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp, (drmAddress)&sfpriv->surface_handle) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] drmAddMap(surface_handle) failed!\n"); - i830_free_memory(pScrn, sfpriv->surface); + i830_free_xvmc_buffer(pScrn, sfpriv->surface); xfree(sfpriv); xfree(*priv); *priv = NULL; @@ -744,7 +744,7 @@ static void i915_xvmc_destroy_surface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf) for (i = 0; i < I915_XVMC_MAX_SURFACES; i++) { if (pXvMC->surfaces[i] == pSurf->surface_id) { drmRmMap(pI830->drmSubFD, pXvMC->sfprivs[i]->surface_handle); - i830_free_memory(pScrn, pXvMC->sfprivs[i]->surface); + i830_free_xvmc_buffer(pScrn, pXvMC->sfprivs[i]->surface); xfree(pXvMC->sfprivs[i]); pXvMC->nsurfaces--; pXvMC->sfprivs[i] = 0; @@ -766,7 +766,7 @@ static void i915_xvmc_destroy_subpict (ScrnInfoPtr pScrn, for (i = 0; i < I915_XVMC_MAX_SURFACES; i++) { if (pXvMC->surfaces[i] == pSubp->subpicture_id) { drmRmMap(pI830->drmSubFD, pXvMC->sfprivs[i]->surface_handle); - i830_free_memory(pScrn, pXvMC->sfprivs[i]->surface); + i830_free_xvmc_buffer(pScrn, pXvMC->sfprivs[i]->surface); xfree(pXvMC->sfprivs[i]); pXvMC->nsurfaces--; pXvMC->sfprivs[i] = 0; |