dma-buf: add more reservation object locking wrappers

Complete the abstraction of the ww_mutex inside the reservation object.

This allows us to add more handling and debugging to the reservation
object in the future.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/320761/
This commit is contained in:
Christian König
2019-07-31 09:41:50 +02:00
parent 05103ea9a3
commit 0dbd555a01
16 changed files with 100 additions and 40 deletions

View File

@@ -745,10 +745,10 @@ static inline int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo,
WARN_ON(!kref_read(&bo->kref));
if (interruptible)
ret = ww_mutex_lock_slow_interruptible(&bo->resv->lock,
ticket);
ret = reservation_object_lock_slow_interruptible(bo->resv,
ticket);
else
ww_mutex_lock_slow(&bo->resv->lock, ticket);
reservation_object_lock_slow(bo->resv, ticket);
if (likely(ret == 0))
ttm_bo_del_sub_from_lru(bo);