drm/ttm: Ignore signaled move fences

Move fences that have already signaled should not prevent memory
allocations with no_wait_gpu.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210227034524.21763-1-Felix.Kuehling@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Felix Kuehling 2021-02-26 22:43:04 -05:00 committed by Christian König
parent fd921693fe
commit e92b0ff603

View File

@ -705,8 +705,9 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
return 0;
if (no_wait_gpu) {
ret = dma_fence_is_signaled(fence) ? 0 : -EBUSY;
dma_fence_put(fence);
return -EBUSY;
return ret;
}
dma_resv_add_shared_fence(bo->base.resv, fence);