From 1a426c981c4fa2816d969b27163ab2dbc2fa4e89 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 5 Apr 2017 00:08:52 +0100 Subject: gpu: nvgpu: Rename nvgpu DMA APIs gv11b changes to go along with gpu: nvgpu: Rename nvgpu DMA APIs In the main nvgpu repo. JIRA NVGPU-12 Change-Id: I5e28b13448d171e1511ace0842e53700385f8489 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1455213 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker Reviewed-by: Konsta Holtta Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 18 +++++++++--------- drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index a9f0d1e0..f4e31ec0 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c @@ -649,7 +649,7 @@ int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, gk20a_dbg_fn(""); - err = gk20a_gmmu_alloc_sys(vm->mm->g, size, mem); + err = nvgpu_dma_alloc_sys(vm->mm->g, size, mem); if (err) return err; @@ -669,7 +669,7 @@ int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, return 0; fail_free: - gk20a_gmmu_free(vm->mm->g, mem); + nvgpu_dma_free(vm->mm->g, mem); return err; } @@ -764,11 +764,11 @@ static int gr_gv11b_alloc_gr_ctx(struct gk20a *g, return err; fail_free_betacb: - gk20a_gmmu_unmap_free(vm, &(*gr_ctx)->t18x.betacb_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &(*gr_ctx)->t18x.betacb_ctxsw_buffer); fail_free_spill: - gk20a_gmmu_unmap_free(vm, &(*gr_ctx)->t18x.spill_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &(*gr_ctx)->t18x.spill_ctxsw_buffer); fail_free_preempt: - gk20a_gmmu_unmap_free(vm, &(*gr_ctx)->t18x.preempt_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &(*gr_ctx)->t18x.preempt_ctxsw_buffer); fail_free_gk20a_ctx: gr_gk20a_free_gr_ctx(g, vm, *gr_ctx); *gr_ctx = NULL; @@ -824,10 +824,10 @@ static void gr_gv11b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm, if (g->gr.t18x.ctx_vars.dump_ctxsw_stats_on_channel_close) dump_ctx_switch_stats(g, vm, gr_ctx); - gk20a_gmmu_unmap_free(vm, &gr_ctx->t18x.pagepool_ctxsw_buffer); - gk20a_gmmu_unmap_free(vm, &gr_ctx->t18x.betacb_ctxsw_buffer); - gk20a_gmmu_unmap_free(vm, &gr_ctx->t18x.spill_ctxsw_buffer); - gk20a_gmmu_unmap_free(vm, &gr_ctx->t18x.preempt_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &gr_ctx->t18x.pagepool_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &gr_ctx->t18x.betacb_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &gr_ctx->t18x.spill_ctxsw_buffer); + nvgpu_dma_unmap_free(vm, &gr_ctx->t18x.preempt_ctxsw_buffer); gr_gk20a_free_gr_ctx(g, vm, gr_ctx); gk20a_dbg_fn("done"); } diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c index a2b7de1c..8b322296 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c @@ -39,7 +39,7 @@ void gv11b_free_subctx_header(struct channel_gk20a *c) gk20a_gmmu_unmap(c->vm, ctx->mem.gpu_va, ctx->mem.size, gk20a_mem_flag_none); - gk20a_gmmu_free(g, &ctx->mem); + nvgpu_dma_free(g, &ctx->mem); } } @@ -53,7 +53,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) gk20a_dbg_fn(""); if (ctx->mem.gpu_va == 0) { - ret = gk20a_gmmu_alloc_flags_sys(g, + ret = nvgpu_dma_alloc_flags_sys(g, NVGPU_DMA_NO_KERNEL_MAPPING, gr->ctx_vars.golden_image_size, &ctx->mem); @@ -71,7 +71,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) if (!ctx->mem.gpu_va) { gk20a_err(dev_from_gk20a(g), "failed to map ctx header"); - gk20a_gmmu_free(g, &ctx->mem); + nvgpu_dma_free(g, &ctx->mem); return -ENOMEM; } /* Now clear the buffer */ -- cgit v1.2.2