[Libva] [libva-intel-driver PATCH] Fix misused dri_bo_reference()

Xiang, Haihao haihao.xiang at intel.com
Sun Dec 14 20:30:44 PST 2014


The object returned from dri_bo_alloc() has been referenced.

This commit fixes https://bugs.freedesktop.org/show_bug.cgi?id=86913

Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/gen75_vpp_gpe.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/gen75_vpp_gpe.c b/src/gen75_vpp_gpe.c
index d5cfc9d..0b7b3d1 100644
--- a/src/gen75_vpp_gpe.c
+++ b/src/gen75_vpp_gpe.c
@@ -301,14 +301,12 @@ gen75_gpe_process_init(VADriverContextP ctx,
                       "vpp batch buffer",
                        batch_buf_size, 0x1000);
     vpp_gpe_ctx->vpp_batchbuffer.bo = bo;
-    dri_bo_reference(vpp_gpe_ctx->vpp_batchbuffer.bo);
 
     dri_bo_unreference(vpp_gpe_ctx->vpp_kernel_return.bo);
     bo = dri_bo_alloc(i965->intel.bufmgr,
                       "vpp kernel return buffer",
                        kernel_return_size, 0x1000);
     vpp_gpe_ctx->vpp_kernel_return.bo = bo;
-    dri_bo_reference(vpp_gpe_ctx->vpp_kernel_return.bo); 
 
     vpp_gpe_ctx->gpe_context_init(ctx, &vpp_gpe_ctx->gpe_ctx);
 
@@ -545,14 +543,12 @@ gen8_gpe_process_init(VADriverContextP ctx,
                       "vpp batch buffer",
                        batch_buf_size, 0x1000);
     vpp_gpe_ctx->vpp_batchbuffer.bo = bo;
-    dri_bo_reference(vpp_gpe_ctx->vpp_batchbuffer.bo);
 
     dri_bo_unreference(vpp_gpe_ctx->vpp_kernel_return.bo);
     bo = dri_bo_alloc(i965->intel.bufmgr,
                       "vpp kernel return buffer",
                        kernel_return_size, 0x1000);
     vpp_gpe_ctx->vpp_kernel_return.bo = bo;
-    dri_bo_reference(vpp_gpe_ctx->vpp_kernel_return.bo);
 
     vpp_gpe_ctx->gpe_context_init(ctx, &vpp_gpe_ctx->gpe_ctx);
 
-- 
1.9.1



More information about the Libva mailing list