summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-01-09 13:47:40 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-12 15:42:57 -0500
commitece3d958b306f00dad76ed6f9b83ce136b4769f2 (patch)
tree81d1bdce3311575661e3f30d7dbf957d1d1c330f /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent44a1208fecab46f6e660d0315579c86cb6f32d0a (diff)
gpu: nvgpu: Combine gk20a and gp10b free_gr_ctx
gp10b version of free_gr_ctx was created to keep gp10b source code changes out from the mainline. gp10b was merged back to mainline a while ago, so this separation is no longer needed. Merge the two variants. Change-Id: I954b3b677e98e4248f95641ea22e0def4e583c66 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1635127 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 0f6bebe7..263ae030 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2786,6 +2786,14 @@ void gr_gk20a_free_gr_ctx(struct gk20a *g,
2786 if (!gr_ctx || !gr_ctx->mem.gpu_va) 2786 if (!gr_ctx || !gr_ctx->mem.gpu_va)
2787 return; 2787 return;
2788 2788
2789 if (g->ops.gr.dump_ctxsw_stats &&
2790 g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close)
2791 g->ops.gr.dump_ctxsw_stats(g, vm, gr_ctx);
2792
2793 nvgpu_dma_unmap_free(vm, &gr_ctx->pagepool_ctxsw_buffer);
2794 nvgpu_dma_unmap_free(vm, &gr_ctx->betacb_ctxsw_buffer);
2795 nvgpu_dma_unmap_free(vm, &gr_ctx->spill_ctxsw_buffer);
2796 nvgpu_dma_unmap_free(vm, &gr_ctx->preempt_ctxsw_buffer);
2789 nvgpu_gmmu_unmap(vm, &gr_ctx->mem, gr_ctx->mem.gpu_va); 2797 nvgpu_gmmu_unmap(vm, &gr_ctx->mem, gr_ctx->mem.gpu_va);
2790 nvgpu_dma_free(g, &gr_ctx->mem); 2798 nvgpu_dma_free(g, &gr_ctx->mem);
2791 nvgpu_kfree(g, gr_ctx); 2799 nvgpu_kfree(g, gr_ctx);