diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-03-01 22:57:40 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-03-04 09:38:17 -0800 |
commit | 5018fd3097d77a5f31af4cb27e39daa37557b64e (patch) | |
tree | ca1cc619fa9eab2fbd612283a95fdd3255654cb5 /src/xvmc/intel_batchbuffer.c | |
parent | cb06aa32d433f54affe87da2cf964f0308d3c258 (diff) |
libIntelXvMC: kill ums leftovers
On i965 class hw, kernel_exec_fencing was 1 always, anyway. And on
i945, this patch kills a memory leak (dunno how, but it does).
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src/xvmc/intel_batchbuffer.c')
-rw-r--r-- | src/xvmc/intel_batchbuffer.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/xvmc/intel_batchbuffer.c b/src/xvmc/intel_batchbuffer.c index 1807d2cd..fcd2866c 100644 --- a/src/xvmc/intel_batchbuffer.c +++ b/src/xvmc/intel_batchbuffer.c @@ -73,10 +73,7 @@ Bool intelInitBatchBuffer(void) return False; } - if (xvmc_driver->kernel_exec_fencing) - drm_intel_gem_bo_map_gtt(xvmc_driver->batch.buf); - else - drm_intel_bo_map(xvmc_driver->batch.buf, 1); + drm_intel_gem_bo_map_gtt(xvmc_driver->batch.buf); xvmc_driver->batch.init_ptr = xvmc_driver->batch.buf->virtual; xvmc_driver->batch.size = BATCH_SIZE; @@ -87,10 +84,7 @@ Bool intelInitBatchBuffer(void) void intelFiniBatchBuffer(void) { - if (xvmc_driver->kernel_exec_fencing) - drm_intel_gem_bo_unmap_gtt(xvmc_driver->batch.buf); - else - drm_intel_bo_unmap(xvmc_driver->batch.buf); + drm_intel_gem_bo_unmap_gtt(xvmc_driver->batch.buf); drm_intel_bo_unreference(xvmc_driver->batch.buf); } @@ -99,10 +93,7 @@ void intelFlushBatch(Bool refill) { i965_end_batch(); - if (xvmc_driver->kernel_exec_fencing) - drm_intel_gem_bo_unmap_gtt(xvmc_driver->batch.buf); - else - drm_intel_bo_unmap(xvmc_driver->batch.buf); + drm_intel_gem_bo_unmap_gtt(xvmc_driver->batch.buf); drm_intel_bo_exec(xvmc_driver->batch.buf, xvmc_driver->batch.ptr - xvmc_driver->batch.init_ptr, @@ -118,10 +109,7 @@ void intelFlushBatch(Bool refill) fprintf(stderr, "unable to alloc batch buffer\n"); } - if (xvmc_driver->kernel_exec_fencing) - drm_intel_gem_bo_map_gtt(xvmc_driver->batch.buf); - else - drm_intel_bo_map(xvmc_driver->batch.buf, 1); + drm_intel_gem_bo_map_gtt(xvmc_driver->batch.buf); xvmc_driver->batch.init_ptr = xvmc_driver->batch.buf->virtual; xvmc_driver->batch.size = BATCH_SIZE; |