Home
last modified time | relevance | path

Searched refs:resv (Results 1 – 25 of 106) sorted by relevance

12345

/openbsd/src/sys/dev/pci/drm/ttm/
Dttm_bo.c76 dma_resv_assert_held(bo->base.resv); in ttm_bo_move_to_lru_tail()
100 dma_resv_assert_held(bo->base.resv); in ttm_bo_set_bulk_move()
148 ret = dma_resv_reserve_fences(bo->base.resv, 1); in ttm_bo_handle_move_mem()
190 if (bo->base.resv == &bo->base._resv) in ttm_bo_individualize_resv()
195 r = dma_resv_copy_fences(&bo->base._resv, bo->base.resv); in ttm_bo_individualize_resv()
206 bo->base.resv = &bo->base._resv; in ttm_bo_individualize_resv()
215 struct dma_resv *resv = &bo->base._resv; in ttm_bo_flush_all_fences() local
219 dma_resv_iter_begin(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP); in ttm_bo_flush_all_fences()
237 dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, false, in ttm_bo_delayed_delete()
239 dma_resv_lock(bo->base.resv, NULL); in ttm_bo_delayed_delete()
[all …]
Dttm_bo_vm.c51 if (dma_resv_test_signaled(bo->base.resv, DMA_RESV_USAGE_KERNEL)) in ttm_bo_vm_fault_idle()
65 (void)dma_resv_wait_timeout(bo->base.resv, in ttm_bo_vm_fault_idle()
68 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_fault_idle()
76 err = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_KERNEL, true, in ttm_bo_vm_fault_idle()
127 if (unlikely(!dma_resv_trylock(bo->base.resv))) { in ttm_bo_vm_reserve()
137 if (!dma_resv_lock_interruptible(bo->base.resv, in ttm_bo_vm_reserve()
139 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_reserve()
146 if (dma_resv_lock_interruptible(bo->base.resv, NULL)) in ttm_bo_vm_reserve()
156 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_reserve()
346 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_fault()
[all …]
Dttm_execbuf_util.c38 dma_resv_unlock(bo->base.resv); in ttm_eu_backoff_reservation_reverse()
54 dma_resv_unlock(bo->base.resv); in ttm_eu_backoff_reservation()
102 ret = dma_resv_reserve_fences(bo->base.resv, in ttm_eu_reserve_buffers()
119 ret = dma_resv_reserve_fences(bo->base.resv, in ttm_eu_reserve_buffers()
153 dma_resv_add_fence(bo->base.resv, fence, entry->num_shared ? in ttm_eu_fence_buffer_objects()
156 dma_resv_unlock(bo->base.resv); in ttm_eu_fence_buffer_objects()
Dttm_bo_util.c252 fbo->base.base.resv = &fbo->base.base._resv; in ttm_buffer_object_transfer()
488 dma_resv_assert_held(bo->base.resv); in ttm_bo_vmap()
564 dma_resv_assert_held(bo->base.resv); in ttm_bo_vunmap()
586 ret = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, in ttm_bo_wait_free_node()
686 dma_resv_add_fence(bo->base.resv, fence, DMA_RESV_USAGE_KERNEL); in ttm_bo_move_accel_cleanup()
745 if (dma_resv_test_signaled(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP)) { in ttm_bo_pipeline_gutting()
779 ret = dma_resv_copy_fences(&ghost->base._resv, bo->base.resv); in ttm_bo_pipeline_gutting()
782 dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP, in ttm_bo_pipeline_gutting()
804 if (dma_resv_trylock(bo->base.resv)) { in ttm_lru_walk_trylock()
809 if (bo->base.resv == ctx->resv && ctx->allow_res_evict) { in ttm_lru_walk_trylock()
[all …]
/openbsd/src/sys/dev/pci/drm/amd/amdgpu/
Damdgpu_dma_buf.c299 struct dma_resv *resv = dma_buf->resv; in amdgpu_dma_buf_create_obj() local
306 dma_resv_lock(resv, NULL); in amdgpu_dma_buf_create_obj()
319 ttm_bo_type_sg, resv, &gobj, 0); in amdgpu_dma_buf_create_obj()
327 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj()
331 dma_resv_unlock(resv); in amdgpu_dma_buf_create_obj()
347 struct ww_acquire_ctx *ticket = dma_resv_locking_ctx(obj->resv); in amdgpu_dma_buf_move_notify()
370 struct dma_resv *resv = vm->root.bo->tbo.base.resv; in amdgpu_dma_buf_move_notify() local
377 r = dma_resv_lock(resv, ticket); in amdgpu_dma_buf_move_notify()
386 if (!dma_resv_trylock(resv)) in amdgpu_dma_buf_move_notify()
391 r = dma_resv_reserve_fences(resv, 2); in amdgpu_dma_buf_move_notify()
[all …]
Damdgpu_object.c258 bp.resv = NULL; in amdgpu_bo_create_reserved()
537 .resv = bp->resv in amdgpu_bo_create()
608 bp->resv, bp->destroy); in amdgpu_bo_create()
623 r = amdgpu_ttm_clear_buffer(bo, bo->tbo.base.resv, &fence); in amdgpu_bo_create()
627 dma_resv_add_fence(bo->tbo.base.resv, fence, in amdgpu_bo_create()
631 if (!bp->resv) in amdgpu_bo_create()
644 if (!bp->resv) in amdgpu_bo_create()
645 dma_resv_unlock(bo->tbo.base.resv); in amdgpu_bo_create()
729 r = dma_resv_wait_timeout(bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL, in amdgpu_bo_kmap()
1063 dma_resv_assert_held(bo->tbo.base.resv); in amdgpu_bo_get_tiling_flags()
[all …]
Damdgpu_sync.c240 struct dma_resv *resv, enum amdgpu_sync_mode mode, in amdgpu_sync_resv() argument
247 if (resv == NULL) in amdgpu_sync_resv()
251 dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP, f) { in amdgpu_sync_resv()
275 int amdgpu_sync_kfd(struct amdgpu_sync *sync, struct dma_resv *resv) in amdgpu_sync_kfd() argument
281 dma_resv_iter_begin(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP); in amdgpu_sync_kfd()
Damdgpu_ttm.h165 struct dma_resv *resv,
172 struct dma_resv *resv,
175 struct dma_resv *resv,
179 struct dma_resv *resv,
Damdgpu_sync.h52 struct dma_resv *resv, enum amdgpu_sync_mode mode,
54 int amdgpu_sync_kfd(struct amdgpu_sync *sync, struct dma_resv *resv);
Damdgpu_vm.c399 dma_resv_assert_held(vm->root.bo->tbo.base.resv); in amdgpu_vm_bo_base_init()
569 if (dma_resv_locking_ctx(bo->tbo.base.resv) != ticket) { in amdgpu_vm_validate()
984 dma_resv_add_fence(vm->root.bo->tbo.base.resv, *fence, in amdgpu_vm_tlb_flush()
1160 !dma_resv_trylock(bo->tbo.base.resv)) in amdgpu_vm_bo_get_memory()
1165 dma_resv_unlock(bo->tbo.base.resv); in amdgpu_vm_bo_get_memory()
1229 r = amdgpu_sync_resv(adev, &sync, vm->root.bo->tbo.base.resv, in amdgpu_vm_bo_update()
1234 r = amdgpu_sync_kfd(&sync, bo->tbo.base.resv); in amdgpu_vm_bo_update()
1259 r = amdgpu_sync_resv(adev, &sync, bo->tbo.base.resv, in amdgpu_vm_bo_update()
1463 struct dma_resv *resv = vm->root.bo->tbo.base.resv; in amdgpu_vm_prt_fini() local
1467 dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP, fence) { in amdgpu_vm_prt_fini()
[all …]
/openbsd/src/sys/dev/pci/drm/
Ddrm_exec.c60 dma_resv_unlock(obj->resv); in drm_exec_unlock_all()
181 ret = dma_resv_lock_slow_interruptible(obj->resv, in drm_exec_lock_contended()
186 dma_resv_lock_slow(obj->resv, &exec->ticket); in drm_exec_lock_contended()
197 dma_resv_unlock(obj->resv); in drm_exec_lock_contended()
230 ret = dma_resv_lock_interruptible(obj->resv, &exec->ticket); in drm_exec_lock_obj()
232 ret = dma_resv_lock(obj->resv, &exec->ticket); in drm_exec_lock_obj()
254 dma_resv_unlock(obj->resv); in drm_exec_lock_obj()
274 dma_resv_unlock(obj->resv); in drm_exec_unlock_obj()
306 ret = dma_resv_reserve_fences(obj->resv, num_fences); in drm_exec_prepare_obj()
Ddrm_gem.c347 if (!obj->resv) in drm_gem_private_object_init()
348 obj->resv = &obj->_resv; in drm_gem_private_object_init()
971 ret = dma_resv_wait_timeout(obj->resv, dma_resv_usage_rw(wait_all), in drm_gem_dma_resv_wait()
1487 dma_resv_lock(obj->resv, NULL); in drm_gem_pin()
1489 dma_resv_unlock(obj->resv); in drm_gem_pin()
1496 dma_resv_lock(obj->resv, NULL); in drm_gem_unpin()
1498 dma_resv_unlock(obj->resv); in drm_gem_unpin()
1505 dma_resv_assert_held(obj->resv); in drm_gem_vmap()
1522 dma_resv_assert_held(obj->resv); in drm_gem_vunmap()
1537 dma_resv_lock(obj->resv, NULL); in drm_gem_lock()
[all …]
/openbsd/src/sys/dev/pci/drm/radeon/
Dradeon_prime.c50 struct dma_resv *resv = attach->dmabuf->resv; in radeon_gem_prime_import_sg_table() local
55 dma_resv_lock(resv, NULL); in radeon_gem_prime_import_sg_table()
57 RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); in radeon_gem_prime_import_sg_table()
58 dma_resv_unlock(resv); in radeon_gem_prime_import_sg_table()
Dradeon_benchmark.c38 struct dma_resv *resv) in radeon_benchmark_do_move() argument
51 resv); in radeon_benchmark_do_move()
56 resv); in radeon_benchmark_do_move()
125 dobj->tbo.base.resv); in radeon_benchmark_move()
136 dobj->tbo.base.resv); in radeon_benchmark_move()
Dradeon_object.c131 struct dma_resv *resv, in radeon_bo_create() argument
205 &bo->placement, page_align, !kernel, sg, resv, in radeon_bo_create()
223 r = dma_resv_wait_timeout(bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL, in radeon_bo_kmap()
565 dma_resv_assert_held(bo->tbo.base.resv); in radeon_bo_get_surface_reg()
690 dma_resv_assert_held(bo->tbo.base.resv); in radeon_bo_get_tiling_flags()
702 dma_resv_assert_held(bo->tbo.base.resv); in radeon_bo_check_tiling()
804 struct dma_resv *resv = bo->tbo.base.resv; in radeon_bo_fence() local
807 r = dma_resv_reserve_fences(resv, 1); in radeon_bo_fence()
814 dma_resv_add_fence(resv, &fence->base, shared ? in radeon_bo_fence()
Drv770_dma.c45 struct dma_resv *resv) in rv770_copy_dma() argument
66 radeon_sync_resv(rdev, &sync, resv, false); in rv770_copy_dma()
/openbsd/src/sys/dev/pci/drm/i915/gem/
Di915_gem_wait.c36 i915_gem_object_boost(struct dma_resv *resv, unsigned int flags) in i915_gem_object_boost() argument
57 dma_resv_iter_begin(&cursor, resv, in i915_gem_object_boost()
67 i915_gem_object_wait_reservation(struct dma_resv *resv, in i915_gem_object_wait_reservation() argument
75 i915_gem_object_boost(resv, flags); in i915_gem_object_wait_reservation()
77 dma_resv_iter_begin(&cursor, resv, in i915_gem_object_wait_reservation()
155 dma_resv_iter_begin(&cursor, obj->base.resv, in i915_gem_object_wait_priority()
177 timeout = i915_gem_object_wait_reservation(obj->base.resv, in i915_gem_object_wait()
Di915_gem_clflush.c112 dma_resv_reserve_fences(obj->base.resv, 1) == 0) in i915_gem_clflush_object()
116 obj->base.resv, true, in i915_gem_clflush_object()
119 dma_resv_add_fence(obj->base.resv, &clflush->base.dma, in i915_gem_clflush_object()
Di915_gem_ttm_move.c645 ret = i915_deps_add_resv(&deps, bo->base.resv, ctx); in i915_ttm_move()
729 ret = dma_resv_reserve_fences(src_bo->base.resv, 1); in i915_gem_obj_copy_ttm()
733 ret = dma_resv_reserve_fences(dst_bo->base.resv, 1); in i915_gem_obj_copy_ttm()
737 ret = i915_deps_add_resv(&deps, dst_bo->base.resv, &ctx); in i915_gem_obj_copy_ttm()
741 ret = i915_deps_add_resv(&deps, src_bo->base.resv, &ctx); in i915_gem_obj_copy_ttm()
755 dma_resv_add_fence(dst_bo->base.resv, copy_fence, DMA_RESV_USAGE_WRITE); in i915_gem_obj_copy_ttm()
756 dma_resv_add_fence(src_bo->base.resv, copy_fence, DMA_RESV_USAGE_READ); in i915_gem_obj_copy_ttm()
Di915_gem_dmabuf.c234 exp_info.resv = obj->base.resv; in i915_gem_prime_export()
337 obj->base.resv = dma_buf->resv; in i915_gem_prime_import()
Di915_gem_object.h146 #define assert_object_held(obj) dma_resv_assert_held((obj)->base.resv)
169 ret = dma_resv_lock_interruptible(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
171 ret = dma_resv_lock(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
205 return dma_resv_trylock(obj->base.resv); in i915_gem_object_trylock()
207 return ww_mutex_trylock(&obj->base.resv->lock, &ww->ctx); in i915_gem_object_trylock()
215 dma_resv_unlock(obj->base.resv); in i915_gem_object_unlock()
/openbsd/src/sys/dev/pci/drm/include/drm/ttm/
Dttm_bo.h191 struct dma_resv *resv; member
292 success = dma_resv_trylock(bo->base.resv); in ttm_bo_reserve()
297 ret = dma_resv_lock_interruptible(bo->base.resv, ticket); in ttm_bo_reserve()
299 ret = dma_resv_lock(bo->base.resv, ticket); in ttm_bo_reserve()
320 int ret = dma_resv_lock_slow_interruptible(bo->base.resv, in ttm_bo_reserve_slowpath()
326 dma_resv_lock_slow(bo->base.resv, ticket); in ttm_bo_reserve_slowpath()
371 dma_resv_unlock(bo->base.resv); in ttm_bo_unreserve()
405 struct sg_table *sg, struct dma_resv *resv,
410 struct sg_table *sg, struct dma_resv *resv,
/openbsd/src/sys/dev/pci/drm/include/linux/
Ddma-buf.h36 struct dma_resv *resv; member
63 struct dma_resv *resv; member
/openbsd/src/sys/dev/pci/drm/i915/
Di915_deps.c222 int i915_deps_add_resv(struct i915_deps *deps, struct dma_resv *resv, in i915_deps_add_resv() argument
228 dma_resv_assert_held(resv); in i915_deps_add_resv()
229 dma_resv_for_each_fence(&iter, resv, dma_resv_usage_rw(true), fence) { in i915_deps_add_resv()
Di915_gem_ww.c51 ret = dma_resv_lock_slow_interruptible(ww->contended->base.resv, &ww->ctx); in i915_gem_ww_ctx_backoff()
53 dma_resv_lock_slow(ww->contended->base.resv, &ww->ctx); in i915_gem_ww_ctx_backoff()

12345