diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-12-12 17:52:45 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-12-12 18:00:28 +1000 |
commit | 9d32177f4da380e8581a4226736b4cf67ddf0121 (patch) | |
tree | 52cd0f0bb6f7e6e76f7dec7f1c28c240d8837ebc /drm | |
parent | 32ae7e7f00a2d7a334674f2daa0ecec474b49ba4 (diff) | |
download | nouveau-9d32177f4da380e8581a4226736b4cf67ddf0121.tar.gz |
ttm: wait for bo fence to signal before unmapping vmas
TTM was changed a while back to allow for pipelining of buffer moves, and
part of this was the removal of waiting for a BO to idle before calling
move(), placing the responsibility on the driver to do this if required.
That's all well and good, except, we make use of move_notify() to handle
mapping/unmapping from the GPU VMM as move() isn't called on all paths.
This commit adds a wait before unmapping from a VMM in move_notify(), to
prevent GPU page faults where a buffer is still being accessed.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drm')
-rw-r--r-- | drm/nouveau/nouveau_bo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drm/nouveau/nouveau_bo.c b/drm/nouveau/nouveau_bo.c index e0c000768..dd07ca140 100644 --- a/drm/nouveau/nouveau_bo.c +++ b/drm/nouveau/nouveau_bo.c @@ -1209,6 +1209,7 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) nvbo->page_shift != vma->vm->mmu->lpg_shift)) { nvkm_vm_map(vma, new_mem->mm_node); } else { + WARN_ON(ttm_bo_wait(bo, false, false)); nvkm_vm_unmap(vma); } } |