• Home
  • Raw
  • Download

Lines Matching refs:obj

78 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)  argument
79 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base) argument
82 void dma_resv_reset_shared_max(struct dma_resv *obj);
84 static inline void dma_resv_reset_shared_max(struct dma_resv *obj) {} in dma_resv_reset_shared_max() argument
102 static inline int dma_resv_lock(struct dma_resv *obj, in dma_resv_lock() argument
105 return ww_mutex_lock(&obj->lock, ctx); in dma_resv_lock()
123 static inline int dma_resv_lock_interruptible(struct dma_resv *obj, in dma_resv_lock_interruptible() argument
126 return ww_mutex_lock_interruptible(&obj->lock, ctx); in dma_resv_lock_interruptible()
138 static inline void dma_resv_lock_slow(struct dma_resv *obj, in dma_resv_lock_slow() argument
141 ww_mutex_lock_slow(&obj->lock, ctx); in dma_resv_lock_slow()
154 static inline int dma_resv_lock_slow_interruptible(struct dma_resv *obj, in dma_resv_lock_slow_interruptible() argument
157 return ww_mutex_lock_slow_interruptible(&obj->lock, ctx); in dma_resv_lock_slow_interruptible()
174 static inline bool __must_check dma_resv_trylock(struct dma_resv *obj) in dma_resv_trylock() argument
176 return ww_mutex_trylock(&obj->lock); in dma_resv_trylock()
185 static inline bool dma_resv_is_locked(struct dma_resv *obj) in dma_resv_is_locked() argument
187 return ww_mutex_is_locked(&obj->lock); in dma_resv_is_locked()
197 static inline struct ww_acquire_ctx *dma_resv_locking_ctx(struct dma_resv *obj) in dma_resv_locking_ctx() argument
199 return READ_ONCE(obj->lock.ctx); in dma_resv_locking_ctx()
208 static inline void dma_resv_unlock(struct dma_resv *obj) in dma_resv_unlock() argument
210 dma_resv_reset_shared_max(obj); in dma_resv_unlock()
211 ww_mutex_unlock(&obj->lock); in dma_resv_unlock()
226 dma_resv_excl_fence(struct dma_resv *obj) in dma_resv_excl_fence() argument
228 return rcu_dereference_check(obj->fence_excl, dma_resv_held(obj)); in dma_resv_excl_fence()
243 dma_resv_get_excl_unlocked(struct dma_resv *obj) in dma_resv_get_excl_unlocked() argument
247 if (!rcu_access_pointer(obj->fence_excl)) in dma_resv_get_excl_unlocked()
251 fence = dma_fence_get_rcu_safe(&obj->fence_excl); in dma_resv_get_excl_unlocked()
265 static inline struct dma_resv_list *dma_resv_shared_list(struct dma_resv *obj) in dma_resv_shared_list() argument
267 return rcu_dereference_check(obj->fence, dma_resv_held(obj)); in dma_resv_shared_list()
270 void dma_resv_init(struct dma_resv *obj);
271 void dma_resv_fini(struct dma_resv *obj);
272 int dma_resv_reserve_shared(struct dma_resv *obj, unsigned int num_fences);
273 void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence);
274 void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence);
275 int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **pfence_excl,
278 long dma_resv_wait_timeout(struct dma_resv *obj, bool wait_all, bool intr,
280 bool dma_resv_test_signaled(struct dma_resv *obj, bool test_all);