summaryrefslogtreecommitdiff
path: root/src/xvmc
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-03-02 21:53:26 +0100
committerCarl Worth <cworth@cworth.org>2010-03-04 09:38:38 -0800
commitd5a20c81ab76129a1e0bcefecd9c4a10b5040af4 (patch)
treebecb327e638592313b652b5afa5ad2260965d7e5 /src/xvmc
parente6eb257ad32b393fb67c506943d8ece98b9a8061 (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>
Diffstat (limited to 'src/xvmc')
-rw-r--r--src/xvmc/i915_xvmc.c17
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. */