From 44dcc5a53fabc68a32f16a1a3a46a2582b5b192b Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 17 Apr 2017 22:16:00 +0100 Subject: gpu: nvgpu: Separate GMMU out of mm_gk20a.c t19x version of same named patch in nvgpu. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I0b176577c0edcdcc587f22a6908045a960f830e2 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1464111 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 5 +++-- drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index b8993052..46626bb7 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -534,8 +535,8 @@ int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size, if (err) return err; - mem->gpu_va = gk20a_gmmu_map(vm, - &mem->priv.sgt, + mem->gpu_va = nvgpu_gmmu_map(vm, + mem, size, NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, gk20a_mem_flag_none, diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c index dcf69adf..6aa58337 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -38,8 +39,7 @@ void gv11b_free_subctx_header(struct channel_gk20a *c) gk20a_dbg_fn(""); if (ctx->mem.gpu_va) { - gk20a_gmmu_unmap(c->vm, ctx->mem.gpu_va, - ctx->mem.size, gk20a_mem_flag_none); + nvgpu_gmmu_unmap(c->vm, &ctx->mem, ctx->mem.gpu_va); nvgpu_dma_free(g, &ctx->mem); } @@ -63,8 +63,8 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) nvgpu_err(g, "failed to allocate sub ctx header"); return ret; } - ctx->mem.gpu_va = gk20a_gmmu_map(c->vm, - &ctx->mem.priv.sgt, + ctx->mem.gpu_va = nvgpu_gmmu_map(c->vm, + &ctx->mem, ctx->mem.size, NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, gk20a_mem_flag_none, true, -- cgit v1.2.2