diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-02 21:53:26 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-16 19:59:18 +0100 |
commit | 75bb23a3da2601f368331d35388bc6c3ed19e62d (patch) | |
tree | 58f1ae52cecdb975de4796474171dcec3d06550c /src/xvmc | |
parent | 258483ff74e069cfb8a068c6675b60fd81fef77d (diff) |
i915 XvMC: kill pinned surface buffer in the ddx code
Like with the per context stuff, also drop the now artificial limit
on surfaces. Again, with that gone, a lot of code can be deleted.
Reviewed-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/xvmc')
-rw-r--r-- | src/xvmc/i915_xvmc.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c index 3ae612a5..190b7369 100644 --- a/src/xvmc/i915_xvmc.c +++ b/src/xvmc/i915_xvmc.c @@ -975,24 +975,12 @@ static Status i915_xvmc_mc_create_surface(Display * display, { i915XvMCContext *pI915XvMC; i915XvMCSurface *pI915Surface; - I915XvMCCreateSurfaceRec *tmpComm = NULL; if (!(pI915XvMC = context->privData)) return XvMCBadContext; XVMC_DBG("%s\n", __FUNCTION__); - if (priv_count != (sizeof(I915XvMCCreateSurfaceRec) >> 2)) { - XVMC_ERR - ("_xvmc_create_surface() returned incorrect data size!"); - XVMC_INFO("\tExpected %d, got %d", - (int)(sizeof(I915XvMCCreateSurfaceRec) >> 2), - priv_count); - _xvmc_destroy_surface(display, surface); - XFree(priv_data); - return BadAlloc; - } - PPTHREAD_MUTEX_LOCK(); surface->privData = (i915XvMCSurface *) malloc(sizeof(i915XvMCSurface)); @@ -1009,11 +997,10 @@ static Status i915_xvmc_mc_create_surface(Display * display, pI915Surface->privContext = pI915XvMC; pI915Surface->privSubPic = NULL; - tmpComm = (I915XvMCCreateSurfaceRec *) priv_data; - pI915Surface->bo = drm_intel_bo_alloc(xvmc_driver->bufmgr, "surface", - tmpComm->srf.size, + SIZE_YUV420(context->width, + context->height), GTT_PAGE_SIZE); /* X may still use this buffer when XVMC is already done with it. */ |