[PATCH] drm/ttm: fix shared slot reservation during BO creation

StDenis, Tom Tom.StDenis at amd.com
Wed Dec 5 11:06:29 UTC 2018


Fixes the regression I noticed.

Tested-by: Tom St Denis <tom.stdenis at amd.com>


On 2018-12-05 3:38 a.m., Christian König wrote:
> Make sure we reserve at least one slot for pipelined BO moves
> during BO creation.
> 
> Fixes: 5786b66c9e3b drm/ttm: drop the extra reservation for pipelined BO
> moves
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_bo.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 7db66e4088e2..ffd68b039d23 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1264,6 +1264,9 @@ int ttm_bo_init_reserved(struct ttm_bo_device *bdev,
>   		WARN_ON(!locked);
>   	}
>   
> +	if (likely(!ret))
> +		ret = reservation_object_reserve_shared(bo->resv, 1);
> +
>   	if (likely(!ret))
>   		ret = ttm_bo_validate(bo, placement, ctx);
>   
> 



More information about the dri-devel mailing list