From 5d1166744dc6fe502ee692248ba4c20f8714b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81ris=20Narti=C5=A1s?= Date: Sat, 24 Feb 2018 12:36:00 +0000 Subject: [PATCH] mmu: ALIGN_DOWN tail not addr Corrects copy/pasta error from 7110c89bb8852ff8b0f88ce05b332b3fe22bd11e Fixes screen corruption and X lock-ups observed on NV98. --- drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drm/nouveau/nvkm/subdev/mmu/vmm.c index e35d3e17c..c6e3d0dd1 100644 --- a/drm/nouveau/nvkm/subdev/mmu/vmm.c +++ b/drm/nouveau/nvkm/subdev/mmu/vmm.c @@ -1354,7 +1354,7 @@ nvkm_vmm_get_locked(struct nvkm_vmm *vmm, bool getref, bool mapref, bool sparse, tail = this->addr + this->size; if (vmm->func->page_block && next && next->page != p) - tail = ALIGN_DOWN(addr, vmm->func->page_block); + tail = ALIGN_DOWN(tail, vmm->func->page_block); if (addr <= tail && tail - addr >= size) { rb_erase(&this->tree, &vmm->free);