diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-10-31 20:56:19 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 06:32:24 +0300 |
commit | 5e075fdeb166098a3dc493026534c7631e845782 (patch) | |
tree | 20a4734fc436dad566f263160e3925a637131395 /drivers/gpu/drm/nouveau/nvkm/subdev/bar | |
parent | 6359c982243ee8e4da4ca93cf30ac746a925ea1b (diff) | |
download | linux-5e075fdeb166098a3dc493026534c7631e845782.tar.xz |
drm/nouveau/mmu: automatically handle "un-bootstrapping" of vmm
Removes the need to expose internals outside of MMU, and GP100 is both
different, and a lot harder to deal with.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bar')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c index 9f7b4e7532b7..8b588d1c776b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c @@ -168,10 +168,7 @@ gf100_bar_dtor(struct nvkm_bar *base) nvkm_gpuobj_del(&bar->bar[1].pgd); nvkm_memory_unref(&bar->bar[1].mem); - if (bar->bar[0].vm) { - nvkm_memory_unref(&bar->bar[0].vm->pgt[0].mem[0]); - nvkm_vm_ref(NULL, &bar->bar[0].vm, bar->bar[0].pgd); - } + nvkm_vm_ref(NULL, &bar->bar[0].vm, bar->bar[0].pgd); nvkm_gpuobj_del(&bar->bar[0].pgd); nvkm_memory_unref(&bar->bar[0].mem); return bar; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c index 1aa6b5390d79..b40c131af20e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c @@ -200,10 +200,7 @@ nv50_bar_dtor(struct nvkm_bar *base) nvkm_gpuobj_del(&bar->bar1); nvkm_vm_ref(NULL, &bar->bar1_vm, bar->pgd); nvkm_gpuobj_del(&bar->bar2); - if (bar->bar2_vm) { - nvkm_memory_unref(&bar->bar2_vm->pgt[0].mem[0]); - nvkm_vm_ref(NULL, &bar->bar2_vm, bar->pgd); - } + nvkm_vm_ref(NULL, &bar->bar2_vm, bar->pgd); nvkm_gpuobj_del(&bar->pgd); nvkm_gpuobj_del(&bar->pad); nvkm_gpuobj_del(&bar->mem); |