[PATCH 4/7] drm/ttm: user reservation object wrappers

Michel Dänzer michel at daenzer.net
Thu Nov 9 16:50:10 UTC 2017


On 09/11/17 09:59 AM, Christian König wrote:
> Consistently use the reservation object wrappers instead of accessing
> the ww_mutex directly.
> 
> Additional to that use the reservation object wrappers directly instead of
> calling __ttm_bo_reserve with fixed parameters.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>

[...]

> @@ -1823,7 +1823,9 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo)
>  		return -ERESTARTSYS;
>  	if (!ww_mutex_is_locked(&bo->resv->lock))
>  		goto out_unlock;
> -	ret = __ttm_bo_reserve(bo, true, false, NULL);
> +	ret = reservation_object_lock_interruptible(bo->resv, NULL);
> +	if (ret = -EINTR)
> +		ret = -ERESTARTSYS;

Typo in the test, must be

    if (ret == -EINTR)


This bug caused the Xorg process to hang for me when trying to run
glxgears, requiring a hard reboot. Did you accidentally send an untested
version of this patch?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the dri-devel mailing list