mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
44a1208fec
commit
ece3d958b3
@@ -2786,6 +2786,14 @@ void gr_gk20a_free_gr_ctx(struct gk20a *g,
|
||||
if (!gr_ctx || !gr_ctx->mem.gpu_va)
|
||||
return;
|
||||
|
||||
if (g->ops.gr.dump_ctxsw_stats &&
|
||||
g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close)
|
||||
g->ops.gr.dump_ctxsw_stats(g, vm, gr_ctx);
|
||||
|
||||
nvgpu_dma_unmap_free(vm, &gr_ctx->pagepool_ctxsw_buffer);
|
||||
nvgpu_dma_unmap_free(vm, &gr_ctx->betacb_ctxsw_buffer);
|
||||
nvgpu_dma_unmap_free(vm, &gr_ctx->spill_ctxsw_buffer);
|
||||
nvgpu_dma_unmap_free(vm, &gr_ctx->preempt_ctxsw_buffer);
|
||||
nvgpu_gmmu_unmap(vm, &gr_ctx->mem, gr_ctx->mem.gpu_va);
|
||||
nvgpu_dma_free(g, &gr_ctx->mem);
|
||||
nvgpu_kfree(g, gr_ctx);
|
||||
|
||||
Reference in New Issue
Block a user