Commit e92b0ff6 authored by Felix Kuehling's avatar Felix Kuehling Committed by Christian König
Browse files

drm/ttm: Ignore signaled move fences



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

Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210227034524.21763-1-Felix.Kuehling@amd.com


Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
parent fd921693
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);