diff options
Diffstat (limited to 'src/xvmc')
-rw-r--r-- | src/xvmc/i915_xvmc.c | 27 | ||||
-rw-r--r-- | src/xvmc/i965_xvmc.c | 15 | ||||
-rw-r--r-- | src/xvmc/intel_xvmc.c | 11 | ||||
-rw-r--r-- | src/xvmc/intel_xvmc.h | 7 | ||||
-rw-r--r-- | src/xvmc/xvmc_vld.c | 14 |
5 files changed, 3 insertions, 71 deletions
diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c index 2b96cf47..fdf8cb57 100644 --- a/src/xvmc/i915_xvmc.c +++ b/src/xvmc/i915_xvmc.c @@ -1297,32 +1297,6 @@ static int i915_xvmc_mc_render_surface(Display * display, XvMCContext * context, return 0; } -static int i915_xvmc_mc_put_surface(Display * display, XvMCSurface * surface, - Drawable draw, short srcx, short srcy, - unsigned short srcw, unsigned short srch, - short destx, short desty, - unsigned short destw, unsigned short desth, - int flags, uint32_t *gem_handle) -{ - i915XvMCContext *pI915XvMC; - i915XvMCSurface *pI915Surface; - i915XvMCSubpicture *pI915SubPic; - - if (!(pI915Surface = surface->privData)) - return XvMCBadSurface; - - if (!(pI915XvMC = pI915Surface->privContext)) - return XvMCBadSurface; - - PPTHREAD_MUTEX_LOCK(); - - drm_intel_bo_flink(pI915Surface->comm.bo, gem_handle); - - PPTHREAD_MUTEX_UNLOCK(); - - return 0; -} - static int i915_xvmc_mc_get_surface_status(Display * display, XvMCSurface * surface, int *stat) { @@ -1352,6 +1326,5 @@ struct _intel_xvmc_driver i915_xvmc_mc_driver = { .create_surface = i915_xvmc_mc_create_surface, .destroy_surface = i915_xvmc_mc_destroy_surface, .render_surface = i915_xvmc_mc_render_surface, - .put_surface = i915_xvmc_mc_put_surface, .get_surface_status = i915_xvmc_mc_get_surface_status, }; diff --git a/src/xvmc/i965_xvmc.c b/src/xvmc/i965_xvmc.c index 32cb6c32..96aef2df 100644 --- a/src/xvmc/i965_xvmc.c +++ b/src/xvmc/i965_xvmc.c @@ -877,20 +877,6 @@ static Status render_surface(Display * display, return Success; } -static Status put_surface(Display * display, XvMCSurface * surface, - Drawable draw, short srcx, short srcy, - unsigned short srcw, unsigned short srch, - short destx, short desty, - unsigned short destw, unsigned short desth, - int flags, uint32_t *gem_handle) -{ - struct intel_xvmc_surface *private_surface = surface->privData; - - drm_intel_bo_flink(private_surface->bo, gem_handle); - - return Success; -} - static Status get_surface_status(Display * display, XvMCSurface * surface, int *stats) { @@ -922,6 +908,5 @@ struct _intel_xvmc_driver i965_xvmc_mc_driver = { .create_surface = create_surface, .destroy_surface = destroy_surface, .render_surface = render_surface, - .put_surface = put_surface, .get_surface_status = get_surface_status, }; diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c index 664e91a5..0279d5e8 100644 --- a/src/xvmc/intel_xvmc.c +++ b/src/xvmc/intel_xvmc.c @@ -719,14 +719,9 @@ _X_EXPORT Status XvMCPutSurface(Display * display, XvMCSurface * surface, intel_surf->gc = XCreateGC(display, draw, 0, NULL); } intel_surf->last_draw = draw; - ret = (xvmc_driver->put_surface) (display, surface, draw, srcx, srcy, - srcw, srch, destx, desty, destw, - desth, flags, - &intel_surf->gem_handle); - if (ret) { - XVMC_ERR("put surface fail\n"); - return ret; - } + + drm_intel_bo_flink(intel_surf->bo, &intel_surf->gem_handle); + ret = XvPutImage(display, context->port, draw, intel_surf->gc, intel_surf->image, srcx, srcy, srcw, srch, destx, desty, destw, desth); diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h index 8628082a..29073138 100644 --- a/src/xvmc/intel_xvmc.h +++ b/src/xvmc/intel_xvmc.h @@ -186,13 +186,6 @@ typedef struct _intel_xvmc_driver { XvMCMacroBlockArray * macroblock_array, XvMCBlockArray * blocks); - Status(*put_surface) (Display * display, XvMCSurface * surface, - Drawable draw, short srcx, short srcy, - unsigned short srcw, unsigned short srch, - short destx, short desty, - unsigned short destw, unsigned short desth, - int flags, uint32_t *gem_handle); - Status(*get_surface_status) (Display * display, XvMCSurface * surface, int *stat); diff --git a/src/xvmc/xvmc_vld.c b/src/xvmc/xvmc_vld.c index d122e89d..ee216c22 100644 --- a/src/xvmc/xvmc_vld.c +++ b/src/xvmc/xvmc_vld.c @@ -1046,19 +1046,6 @@ static Status put_slice2(Display * display, XvMCContext * context, return Success; } -static Status put_surface(Display * display, XvMCSurface * surface, - Drawable draw, short srcx, short srcy, - unsigned short srcw, unsigned short srch, - short destx, short desty, - unsigned short destw, unsigned short desth, - int flags, uint32_t *gem_handle) -{ - struct intel_xvmc_surface *private_surface = surface->privData; - - drm_intel_bo_flink(private_surface->bo, gem_handle); - return Success; -} - static Status render_surface(Display * display, XvMCContext * context, unsigned int picture_structure, @@ -1269,7 +1256,6 @@ struct _intel_xvmc_driver xvmc_vld_driver = { .get_surface_status = get_surface_status, .begin_surface = begin_surface, .render_surface = render_surface, - .put_surface = put_surface, .put_slice = put_slice, .put_slice2 = put_slice2 }; |