diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-10-22 10:39:42 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:05 -0400 |
commit | eb74267b833be530568625f5a1dcb248f0fcda1f (patch) | |
tree | dec072281c68a051cf69f3eccf27f23bb3e14a7d /drivers/gpu/nvgpu/gk20a | |
parent | 97e6847cb1f52fc59701dcc4d9e53caf3faacb64 (diff) |
gpu: nvgpu: free all vm's when removing support
Remove both bar1 and pmu.
Bug 1476801
Change-Id: I0c194db06b576083ddaab3726b8575ebce473d84
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/592114
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 12 |
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 | ||
268 | static void gk20a_remove_mm_support(struct mm_gk20a *mm) | 268 | static 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 | ||
284 | static 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 | |||
286 | int gk20a_init_mm_setup_sw(struct gk20a *g) | 290 | int gk20a_init_mm_setup_sw(struct gk20a *g) |
287 | { | 291 | { |
288 | struct mm_gk20a *mm = &g->mm; | 292 | struct mm_gk20a *mm = &g->mm; |