summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r--drivers/gpu/nvgpu/common/mm/mm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c
index db87c4c4..54bc17dd 100644
--- a/drivers/gpu/nvgpu/common/mm/mm.c
+++ b/drivers/gpu/nvgpu/common/mm/mm.c
@@ -163,7 +163,9 @@ static void nvgpu_remove_mm_support(struct mm_gk20a *mm)
163 nvgpu_free_inst_block(g, &mm->pmu.inst_block); 163 nvgpu_free_inst_block(g, &mm->pmu.inst_block);
164 nvgpu_free_inst_block(g, &mm->hwpm.inst_block); 164 nvgpu_free_inst_block(g, &mm->hwpm.inst_block);
165 nvgpu_vm_put(mm->pmu.vm); 165 nvgpu_vm_put(mm->pmu.vm);
166 nvgpu_vm_put(mm->cde.vm); 166
167 if (g->has_cde)
168 nvgpu_vm_put(mm->cde.vm);
167 169
168 nvgpu_semaphore_sea_destroy(g); 170 nvgpu_semaphore_sea_destroy(g);
169 nvgpu_vidmem_destroy(g); 171 nvgpu_vidmem_destroy(g);
@@ -389,9 +391,11 @@ static int nvgpu_init_mm_setup_sw(struct gk20a *g)
389 if (err) 391 if (err)
390 return err; 392 return err;
391 393
392 err = nvgpu_init_cde_vm(mm); 394 if (g->has_cde) {
393 if (err) 395 err = nvgpu_init_cde_vm(mm);
394 return err; 396 if (err)
397 return err;
398 }
395 399
396 err = nvgpu_init_ce_vm(mm); 400 err = nvgpu_init_ce_vm(mm);
397 if (err) 401 if (err)