diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-05-25 13:27:10 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:07 -0400 |
commit | 27694ca572c4d7698b107c6713f0f0604b41c186 (patch) | |
tree | 60dc8a1a8518797fd95f82d1e02892a984911667 /drivers/gpu/nvgpu/gk20a | |
parent | 5c8f1619ce5ab1cf46484c8914fa29bcc208b9a0 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730896
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 5 |
2 files changed, 3 insertions, 4 deletions
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 { | |||
895 | int (*init_mm_setup_hw)(struct gk20a *g); | 895 | int (*init_mm_setup_hw)(struct gk20a *g); |
896 | bool (*is_bar1_supported)(struct gk20a *g); | 896 | bool (*is_bar1_supported)(struct gk20a *g); |
897 | int (*init_bar2_vm)(struct gk20a *g); | 897 | int (*init_bar2_vm)(struct gk20a *g); |
898 | int (*init_bar2_mm_hw_setup)(struct gk20a *g); | ||
899 | void (*remove_bar2_vm)(struct gk20a *g); | 898 | void (*remove_bar2_vm)(struct gk20a *g); |
900 | const struct gk20a_mmu_level * | 899 | const struct gk20a_mmu_level * |
901 | (*get_mmu_levels)(struct gk20a *g, u32 big_page_size); | 900 | (*get_mmu_levels)(struct gk20a *g, u32 big_page_size); |
@@ -1121,6 +1120,7 @@ struct gpu_ops { | |||
1121 | void (*init_hw)(struct gk20a *g); | 1120 | void (*init_hw)(struct gk20a *g); |
1122 | void (*isr)(struct gk20a *g); | 1121 | void (*isr)(struct gk20a *g); |
1123 | int (*bar1_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst); | 1122 | int (*bar1_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst); |
1123 | int (*bar2_bind)(struct gk20a *g, struct nvgpu_mem *bar1_inst); | ||
1124 | u32 (*set_bar0_window)(struct gk20a *g, struct nvgpu_mem *mem, | 1124 | u32 (*set_bar0_window)(struct gk20a *g, struct nvgpu_mem *mem, |
1125 | struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl, | 1125 | struct nvgpu_sgt *sgt, struct nvgpu_sgl *sgl, |
1126 | u32 w); | 1126 | 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 @@ | |||
50 | #include <nvgpu/hw/gk20a/hw_ram_gk20a.h> | 50 | #include <nvgpu/hw/gk20a/hw_ram_gk20a.h> |
51 | #include <nvgpu/hw/gk20a/hw_pram_gk20a.h> | 51 | #include <nvgpu/hw/gk20a/hw_pram_gk20a.h> |
52 | #include <nvgpu/hw/gk20a/hw_mc_gk20a.h> | 52 | #include <nvgpu/hw/gk20a/hw_mc_gk20a.h> |
53 | #include <nvgpu/hw/gk20a/hw_bus_gk20a.h> | ||
54 | #include <nvgpu/hw/gk20a/hw_flush_gk20a.h> | 53 | #include <nvgpu/hw/gk20a/hw_flush_gk20a.h> |
55 | #include <nvgpu/hw/gk20a/hw_ltc_gk20a.h> | 54 | #include <nvgpu/hw/gk20a/hw_ltc_gk20a.h> |
56 | 55 | ||
@@ -103,8 +102,8 @@ int gk20a_init_mm_setup_hw(struct gk20a *g) | |||
103 | if (g->ops.bus.bar1_bind) | 102 | if (g->ops.bus.bar1_bind) |
104 | g->ops.bus.bar1_bind(g, &mm->bar1.inst_block); | 103 | g->ops.bus.bar1_bind(g, &mm->bar1.inst_block); |
105 | 104 | ||
106 | if (g->ops.mm.init_bar2_mm_hw_setup) { | 105 | if (g->ops.bus.bar2_bind) { |
107 | err = g->ops.mm.init_bar2_mm_hw_setup(g); | 106 | err = g->ops.bus.bar2_bind(g, &mm->bar2.inst_block); |
108 | if (err) | 107 | if (err) |
109 | return err; | 108 | return err; |
110 | } | 109 | } |