summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 0e3bcdbe..3e9a388b 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -3343,13 +3343,16 @@ int gk20a_comptag_allocator_init(struct gk20a_comptag_allocator *allocator,
3343 3343
3344void gk20a_comptag_allocator_destroy(struct gk20a_comptag_allocator *allocator) 3344void gk20a_comptag_allocator_destroy(struct gk20a_comptag_allocator *allocator)
3345{ 3345{
3346 struct gr_gk20a *gr = container_of(allocator,
3347 struct gr_gk20a, comp_tags);
3348
3346 /* 3349 /*
3347 * called only when exiting the driver (gk20a_remove, or unwinding the 3350 * called only when exiting the driver (gk20a_remove, or unwinding the
3348 * init stage); no users should be active, so taking the mutex is 3351 * init stage); no users should be active, so taking the mutex is
3349 * unnecessary here. 3352 * unnecessary here.
3350 */ 3353 */
3351 allocator->size = 0; 3354 allocator->size = 0;
3352 vfree(allocator->bitmap); 3355 nvgpu_vfree(gr->g, allocator->bitmap);
3353} 3356}
3354 3357
3355static void gk20a_remove_gr_support(struct gr_gk20a *gr) 3358static void gk20a_remove_gr_support(struct gr_gk20a *gr)
@@ -3419,7 +3422,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr)
3419 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l); 3422 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l);
3420 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l); 3423 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l);
3421 3424
3422 vfree(gr->ctx_vars.local_golden_image); 3425 nvgpu_vfree(g, gr->ctx_vars.local_golden_image);
3423 gr->ctx_vars.local_golden_image = NULL; 3426 gr->ctx_vars.local_golden_image = NULL;
3424 3427
3425 if (gr->ctx_vars.hwpm_ctxsw_buffer_offset_map) 3428 if (gr->ctx_vars.hwpm_ctxsw_buffer_offset_map)