diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-11-01 03:56:19 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 13:32:21 +1000 |
commit | a48296ab9dbe8b384ba58db5e8553ba35b774bb2 (patch) | |
tree | cefaac1e735b45291f5612070d017540d0ddee37 /drivers/gpu/drm/nouveau | |
parent | 425b34f7df63a2eacf24b721a6f450126e691b6a (diff) |
drm/nouveau: swap loop order in move_notify() hook
The conditional is the same for every mapping.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 22d4b90de432..50b400edcb88 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1219,11 +1219,13 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, bool evict, if (bo->destroy != nouveau_bo_del_ttm) return; - list_for_each_entry(vma, &nvbo->vma_list, head) { - if (mem && new_reg->mem_type != TTM_PL_SYSTEM && - mem->page_shift == nvbo->page) { + if (mem && new_reg->mem_type != TTM_PL_SYSTEM && + mem->page_shift == nvbo->page) { + list_for_each_entry(vma, &nvbo->vma_list, head) { nvkm_vm_map(vma, mem); - } else { + } + } else { + list_for_each_entry(vma, &nvbo->vma_list, head) { WARN_ON(ttm_bo_wait(bo, false, false)); nvkm_vm_unmap(vma); } |