[PATCH 1/1] drm/ttm: Ignore signaled move fences

Christian König ckoenig.leichtzumerken at gmail.com
Mon Mar 1 15:09:55 UTC 2021


Am 27.02.21 um 04:45 schrieb Felix Kuehling:
> Move fences that have already signaled should not prevent memory
> allocations with no_wait_gpu.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 3a10bebb75d6..de1ec838cf8b 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -730,8 +730,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);



More information about the dri-devel mailing list