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>
This commit is contained in:
parent
2cabefcbd0
commit
3a314f747b
|
@ -1414,7 +1414,6 @@ nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg)
|
||||||
if (!mem->bar_vma.node)
|
if (!mem->bar_vma.node)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nvkm_vm_unmap(&mem->bar_vma);
|
|
||||||
nvkm_vm_put(&mem->bar_vma);
|
nvkm_vm_put(&mem->bar_vma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,8 @@ nouveau_mem_map(struct nouveau_mem *mem,
|
||||||
void
|
void
|
||||||
nouveau_mem_fini(struct nouveau_mem *mem)
|
nouveau_mem_fini(struct nouveau_mem *mem)
|
||||||
{
|
{
|
||||||
if (mem->vma[1].node) {
|
nvkm_vm_put(&mem->vma[1]);
|
||||||
nvkm_vm_unmap(&mem->vma[1]);
|
nvkm_vm_put(&mem->vma[0]);
|
||||||
nvkm_vm_put(&mem->vma[1]);
|
|
||||||
}
|
|
||||||
if (mem->vma[0].node) {
|
|
||||||
nvkm_vm_unmap(&mem->vma[0]);
|
|
||||||
nvkm_vm_put(&mem->vma[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -61,10 +61,8 @@ nouveau_vma_del(struct nouveau_vma **pvma)
|
||||||
{
|
{
|
||||||
struct nouveau_vma *vma = *pvma;
|
struct nouveau_vma *vma = *pvma;
|
||||||
if (vma && --vma->refs <= 0) {
|
if (vma && --vma->refs <= 0) {
|
||||||
if (likely(vma->addr != ~0ULL)) {
|
if (likely(vma->addr != ~0ULL))
|
||||||
nouveau_vma_unmap(vma);
|
|
||||||
nvkm_vm_put(&vma->_vma);
|
nvkm_vm_put(&vma->_vma);
|
||||||
}
|
|
||||||
list_del(&vma->head);
|
list_del(&vma->head);
|
||||||
*pvma = NULL;
|
*pvma = NULL;
|
||||||
kfree(*pvma);
|
kfree(*pvma);
|
||||||
|
|
Loading…
Reference in New Issue