summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 8f2d4079..a390e36b 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -265,12 +265,10 @@ static int gk20a_init_mm_reset_enable_hw(struct gk20a *g)
265 return 0; 265 return 0;
266} 266}
267 267
268static void gk20a_remove_mm_support(struct mm_gk20a *mm) 268static void gk20a_remove_vm(struct vm_gk20a *vm, struct inst_desc *inst_block)
269{ 269{
270 struct gk20a *g = mm->g; 270 struct gk20a *g = vm->mm->g;
271 struct device *d = dev_from_gk20a(g); 271 struct device *d = dev_from_gk20a(g);
272 struct vm_gk20a *vm = &mm->bar1.vm;
273 struct inst_desc *inst_block = &mm->bar1.inst_block;
274 272
275 gk20a_dbg_fn(""); 273 gk20a_dbg_fn("");
276 274
@@ -283,6 +281,12 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm)
283 gk20a_vm_remove_support_nofree(vm); 281 gk20a_vm_remove_support_nofree(vm);
284} 282}
285 283
284static void gk20a_remove_mm_support(struct mm_gk20a *mm)
285{
286 gk20a_remove_vm(&mm->bar1.vm, &mm->bar1.inst_block);
287 gk20a_remove_vm(&mm->pmu.vm, &mm->pmu.inst_block);
288}
289
286int gk20a_init_mm_setup_sw(struct gk20a *g) 290int gk20a_init_mm_setup_sw(struct gk20a *g)
287{ 291{
288 struct mm_gk20a *mm = &g->mm; 292 struct mm_gk20a *mm = &g->mm;