summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c8
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gm20b/mm_gm20b.c1
4 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 1157390a..ba7c7e97 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -334,6 +334,7 @@ struct gpu_ops {
334 void *inst_ptr, int size); 334 void *inst_ptr, int size);
335 u32 (*get_big_page_sizes)(void); 335 u32 (*get_big_page_sizes)(void);
336 u32 (*get_physical_addr_bits)(struct gk20a *g); 336 u32 (*get_physical_addr_bits)(struct gk20a *g);
337 int (*init_mm_setup_hw)(struct gk20a *g);
337 int (*init_bar2_vm)(struct gk20a *g); 338 int (*init_bar2_vm)(struct gk20a *g);
338 int (*init_bar2_mm_hw_setup)(struct gk20a *g); 339 int (*init_bar2_mm_hw_setup)(struct gk20a *g);
339 const struct gk20a_mmu_level * 340 const struct gk20a_mmu_level *
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 79bfb687..4b39df42 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -391,7 +391,7 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
391} 391}
392 392
393/* make sure gk20a_init_mm_support is called before */ 393/* make sure gk20a_init_mm_support is called before */
394static int gk20a_init_mm_setup_hw(struct gk20a *g) 394int gk20a_init_mm_setup_hw(struct gk20a *g)
395{ 395{
396 struct mm_gk20a *mm = &g->mm; 396 struct mm_gk20a *mm = &g->mm;
397 struct inst_desc *inst_block = &mm->bar1.inst_block; 397 struct inst_desc *inst_block = &mm->bar1.inst_block;
@@ -435,9 +435,8 @@ int gk20a_init_mm_support(struct gk20a *g)
435 if (err) 435 if (err)
436 return err; 436 return err;
437 437
438 err = gk20a_init_mm_setup_hw(g); 438 if (g->ops.mm.init_mm_setup_hw)
439 if (err) 439 err = g->ops.mm.init_mm_setup_hw(g);
440 return err;
441 440
442 return err; 441 return err;
443} 442}
@@ -3116,5 +3115,6 @@ void gk20a_init_mm(struct gpu_ops *gops)
3116 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits; 3115 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
3117 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels; 3116 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels;
3118 gops->mm.init_pdb = gk20a_mm_init_pdb; 3117 gops->mm.init_pdb = gk20a_mm_init_pdb;
3118 gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
3119} 3119}
3120 3120
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 8f0f736b..b8778024 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -319,6 +319,7 @@ struct channel_gk20a;
319 319
320int gk20a_init_mm_support(struct gk20a *g); 320int gk20a_init_mm_support(struct gk20a *g);
321int gk20a_init_mm_setup_sw(struct gk20a *g); 321int gk20a_init_mm_setup_sw(struct gk20a *g);
322int gk20a_init_mm_setup_hw(struct gk20a *g);
322 323
323int gk20a_mm_fb_flush(struct gk20a *g); 324int gk20a_mm_fb_flush(struct gk20a *g);
324void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate); 325void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate);
diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
index f85a1718..6b9c6da8 100644
--- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
@@ -126,4 +126,5 @@ void gm20b_init_mm(struct gpu_ops *gops)
126 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits; 126 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
127 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels; 127 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels;
128 gops->mm.init_pdb = gk20a_mm_init_pdb; 128 gops->mm.init_pdb = gk20a_mm_init_pdb;
129 gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
129} 130}