From 27694ca572c4d7698b107c6713f0f0604b41c186 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 25 May 2018 10:27:10 -0700 Subject: gpu: nvgpu: Implement bus HAL for bar2 bind Implement BAR2 bind as a bus HAL and remove the corresponding MM HAL. BAR2 bind HW API is in bus. JIRA NVGPU-588 Change-Id: I3a8391b00f1ba65f9ed28b633f1d52bf7c984230 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1730896 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 +- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 08a1fc10..d8941cdf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -895,7 +895,6 @@ struct gpu_ops { int (*init_mm_setup_hw)(struct gk20a *g); bool (*is_bar1_supported)(struct gk20a *g); int (*init_bar2_vm)(struct gk20a *g); - int (*init_bar2_mm_hw_setup)(struct gk20a *g); void (*remove_bar2_vm)(struct gk20a *g); const struct gk20a_mmu_level * (*get_mmu_levels)(struct gk20a *g, u32 big_page_size); @@ -1121,6 +1120,7 @@ struct gpu_ops { void (*init_hw)(struct gk20a *g); void (*isr)(struct gk20a *g); int (*bar1_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst); + int (*bar2_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst); u32 (*set_bar0_window)(struct gk20a *g, struct nvgpu_mem *mem, struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl, u32 w); diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 9429fe2e..40d9e5b1 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include @@ -103,8 +102,8 @@ int gk20a_init_mm_setup_hw(struct gk20a *g) if (g->ops.bus.bar1_bind) g->ops.bus.bar1_bind(g, &mm->bar1.inst_block); - if (g->ops.mm.init_bar2_mm_hw_setup) { - err = g->ops.mm.init_bar2_mm_hw_setup(g); + if (g->ops.bus.bar2_bind) { + err = g->ops.bus.bar2_bind(g, &mm->bar2.inst_block); if (err) return err; } -- cgit v1.2.2