Lines Matching refs:resv
45 #include <linux/dma-resv.h>
76 dma_resv_assert_held(bo->base.resv);
100 dma_resv_assert_held(bo->base.resv);
148 ret = dma_resv_reserve_fences(bo->base.resv, 1);
190 if (bo->base.resv == &bo->base._resv)
195 r = dma_resv_copy_fences(&bo->base._resv, bo->base.resv);
203 * the resv object while holding the lru_lock.
206 bo->base.resv = &bo->base._resv;
215 struct dma_resv *resv = &bo->base._resv;
219 dma_resv_iter_begin(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP);
245 struct dma_resv *resv = &bo->base._resv;
248 if (dma_resv_test_signaled(resv, DMA_RESV_USAGE_BOOKKEEP))
257 dma_resv_unlock(bo->base.resv);
260 lret = dma_resv_wait_timeout(resv, DMA_RESV_USAGE_BOOKKEEP,
270 if (unlock_resv && !dma_resv_trylock(bo->base.resv)) {
287 dma_resv_unlock(bo->base.resv);
296 dma_resv_unlock(bo->base.resv);
311 dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, false,
313 dma_resv_lock(bo->base.resv, NULL);
315 dma_resv_unlock(bo->base.resv);
335 dma_resv_wait_timeout(bo->base.resv,
346 if (!dma_resv_test_signaled(bo->base.resv,
349 !dma_resv_trylock(bo->base.resv)) {
378 dma_resv_unlock(bo->base.resv);
434 dma_resv_assert_held(bo->base.resv);
493 dma_resv_assert_held(bo->base.resv);
507 * a. if share same reservation object with ctx->resv, have assumption
528 if (bo->base.resv == ctx->resv) {
529 dma_resv_assert_held(bo->base.resv);
536 ret = dma_resv_trylock(bo->base.resv);
546 dma_resv_unlock(bo->base.resv);
573 r = dma_resv_lock_interruptible(busy_bo->base.resv,
576 r = dma_resv_lock(busy_bo->base.resv, ticket);
584 dma_resv_unlock(busy_bo->base.resv);
608 dma_resv_locking_ctx(res->bo->base.resv))
618 dma_resv_unlock(res->bo->base.resv);
659 dma_resv_assert_held(bo->base.resv);
677 dma_resv_assert_held(bo->base.resv);
715 dma_resv_add_fence(bo->base.resv, fence, DMA_RESV_USAGE_KERNEL);
717 ret = dma_resv_reserve_fences(bo->base.resv, 1);
737 ticket = dma_resv_locking_ctx(bo->base.resv);
780 ret = dma_resv_reserve_fences(bo->base.resv, 1);
846 dma_resv_assert_held(bo->base.resv);
896 dma_resv_assert_held(bo->base.resv);
938 * @resv: Pointer to a dma_resv, or NULL to let ttm allocate one.
949 * Furthermore, if resv == NULL, the buffer's reservation lock will be held,
964 struct sg_table *sg, struct dma_resv *resv,
977 if (resv)
978 bo->base.resv = resv;
980 bo->base.resv = &bo->base._resv;
997 if (!resv)
998 WARN_ON(!dma_resv_trylock(bo->base.resv));
1000 dma_resv_assert_held(resv);
1009 if (!resv)
1010 dma_resv_unlock(bo->base.resv);
1033 * @resv: Pointer to a dma_resv, or NULL to let ttm allocate one.
1057 struct sg_table *sg, struct dma_resv *resv,
1064 sg, resv, destroy);
1068 if (!resv)
1108 if (dma_resv_test_signaled(bo->base.resv,
1115 ret = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP,
1148 dma_resv_unlock(bo->base.resv);
1207 dma_resv_unlock(bo->base.resv);