diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-12-20 13:08:07 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-12-20 13:08:07 +0800 |
commit | a811ca30659e8c477027ea9c91fb9fc516fdabc7 (patch) | |
tree | e922a356db1323b90fca5d85e0527862df74e207 /src/xvmc/i915_xvmc.c | |
parent | 5f961f28310a1cd19967df2034b0452bf4446394 (diff) |
xvmc: handle surface create/destory in generic code
Diffstat (limited to 'src/xvmc/i915_xvmc.c')
-rw-r--r-- | src/xvmc/i915_xvmc.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c index bc219d42..44ccdc11 100644 --- a/src/xvmc/i915_xvmc.c +++ b/src/xvmc/i915_xvmc.c @@ -1728,17 +1728,13 @@ static int i915_xvmc_mc_destroy_context(Display *display, XvMCContext *context) } static Status i915_xvmc_mc_create_surface(Display *display, - XvMCContext *context, XvMCSurface *surface) + XvMCContext *context, XvMCSurface *surface, int priv_count, + CARD32 *priv_data) { Status ret; i915XvMCContext *pI915XvMC; i915XvMCSurface *pI915Surface; I915XvMCCreateSurfaceRec *tmpComm = NULL; - int priv_count; - uint *priv_data; - - if (!display || !context) - return BadValue; if (!(pI915XvMC = context->privData)) return (error_base + XvMCBadContext); @@ -1764,19 +1760,6 @@ static Status i915_xvmc_mc_create_surface(Display *display, pI915Surface->privContext = pI915XvMC; pI915Surface->privSubPic = NULL; pI915Surface->srf.map = NULL; - XLockDisplay(display); - - if ((ret = _xvmc_create_surface(display, context, surface, - &priv_count, &priv_data))) { - XUnlockDisplay(display); - XVMC_ERR("Unable to create XvMCSurface."); - free(pI915Surface); - surface->privData = NULL; - PPTHREAD_MUTEX_UNLOCK(); - return ret; - } - - XUnlockDisplay(display); if (priv_count != (sizeof(I915XvMCCreateSurfaceRec) >> 2)) { XVMC_ERR("_xvmc_create_surface() returned incorrect data size!"); @@ -1836,10 +1819,6 @@ static int i915_xvmc_mc_destroy_surface(Display *display, XvMCSurface *surface) if (pI915Surface->srf.map) drmUnmap(pI915Surface->srf.map, pI915Surface->srf.size); - XLockDisplay(display); - _xvmc_destroy_surface(display, surface); - XUnlockDisplay(display); - free(pI915Surface); surface->privData = NULL; pI915XvMC->ref--; |