hardware/intel/intel-driver
Revision | aa10929df05ba1668cce3960fe03be2c53e9314b (tree) |
---|---|
Time | 2014-12-15 13:53:46 |
Author | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
Fix misused dri_bo_reference()
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@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
@@ -301,14 +301,12 @@ gen75_gpe_process_init(VADriverContextP ctx, | ||
301 | 301 | "vpp batch buffer", |
302 | 302 | batch_buf_size, 0x1000); |
303 | 303 | vpp_gpe_ctx->vpp_batchbuffer.bo = bo; |
304 | - dri_bo_reference(vpp_gpe_ctx->vpp_batchbuffer.bo); | |
305 | 304 | |
306 | 305 | dri_bo_unreference(vpp_gpe_ctx->vpp_kernel_return.bo); |
307 | 306 | bo = dri_bo_alloc(i965->intel.bufmgr, |
308 | 307 | "vpp kernel return buffer", |
309 | 308 | kernel_return_size, 0x1000); |
310 | 309 | vpp_gpe_ctx->vpp_kernel_return.bo = bo; |
311 | - dri_bo_reference(vpp_gpe_ctx->vpp_kernel_return.bo); | |
312 | 310 | |
313 | 311 | vpp_gpe_ctx->gpe_context_init(ctx, &vpp_gpe_ctx->gpe_ctx); |
314 | 312 |
@@ -545,14 +543,12 @@ gen8_gpe_process_init(VADriverContextP ctx, | ||
545 | 543 | "vpp batch buffer", |
546 | 544 | batch_buf_size, 0x1000); |
547 | 545 | vpp_gpe_ctx->vpp_batchbuffer.bo = bo; |
548 | - dri_bo_reference(vpp_gpe_ctx->vpp_batchbuffer.bo); | |
549 | 546 | |
550 | 547 | dri_bo_unreference(vpp_gpe_ctx->vpp_kernel_return.bo); |
551 | 548 | bo = dri_bo_alloc(i965->intel.bufmgr, |
552 | 549 | "vpp kernel return buffer", |
553 | 550 | kernel_return_size, 0x1000); |
554 | 551 | vpp_gpe_ctx->vpp_kernel_return.bo = bo; |
555 | - dri_bo_reference(vpp_gpe_ctx->vpp_kernel_return.bo); | |
556 | 552 | |
557 | 553 | vpp_gpe_ctx->gpe_context_init(ctx, &vpp_gpe_ctx->gpe_ctx); |
558 | 554 |