diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2021-02-26 22:43:04 -0500 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-04-08 12:21:16 +0200 |
commit | e92b0ff603435c200256524dd234618d91bbd8e1 (patch) | |
tree | 8961eef93b10792aea9f6f6326be3fec617140e2 /drivers | |
parent | fd921693fe989afe82600d97b37f54c942a6db6c (diff) | |
download | linux-stable-e92b0ff603435c200256524dd234618d91bbd8e1.tar.gz linux-stable-e92b0ff603435c200256524dd234618d91bbd8e1.tar.bz2 linux-stable-e92b0ff603435c200256524dd234618d91bbd8e1.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 6ab7b66ce36d..cfd0b9292397 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -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); |