summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_mem.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-10-31 20:56:19 +0300
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 06:32:31 +0300
commit3a314f747ba5b4cca22a36603768c176d1761afd (patch)
tree0b17f24fd1a0c58a1f2fe11d0462844b5ec7a3f9 /drivers/gpu/drm/nouveau/nouveau_mem.c
parent2cabefcbd097e27def6d29d52d5d2cf8797c11e4 (diff)
downloadlinux-3a314f747ba5b4cca22a36603768c176d1761afd.tar.xz
drm/nouveau: remove explicit unmaps
If the VMA is being deleted, we don't need to explicity unmap first anymore. The MMU code will automatically merge the operations into a single page tree walk. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_mem.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 70fbe5e72b55..17c6efb0ebec 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -36,14 +36,8 @@ nouveau_mem_map(struct nouveau_mem *mem,
void
nouveau_mem_fini(struct nouveau_mem *mem)
{
- if (mem->vma[1].node) {
- nvkm_vm_unmap(&mem->vma[1]);
- nvkm_vm_put(&mem->vma[1]);
- }
- if (mem->vma[0].node) {
- nvkm_vm_unmap(&mem->vma[0]);
- nvkm_vm_put(&mem->vma[0]);
- }
+ nvkm_vm_put(&mem->vma[1]);
+ nvkm_vm_put(&mem->vma[0]);
}
int