/linux-6.3-rc2/drivers/dma-buf/ |
A D | dma-fence.c | 160 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in dma_fence_allocate_private_stub() 414 if (!fence) in dma_fence_signal_timestamp() 466 if (!fence) in dma_fence_signal() 515 ret = fence->ops->wait(fence, intr, timeout); in dma_fence_wait_timeout() 540 fence->ops->get_driver_name(fence), in dma_fence_release() 541 fence->ops->get_timeline_name(fence), in dma_fence_release() 542 fence->context, fence->seqno)) { in dma_fence_release() 559 fence->ops->release(fence); in dma_fence_release() 593 if (!fence->ops->enable_signaling(fence)) { in __dma_fence_enable_signaling() 925 fence->ops->get_driver_name(fence), in dma_fence_describe() [all …]
|
A D | sync_file.c | 73 sync_file->fence = dma_fence_get(fence); in sync_file_create() 112 fence = dma_fence_get(sync_file->fence); in sync_file_get_fence() 115 return fence; in sync_file_get_fence() 137 struct dma_fence *fence = sync_file->fence; in sync_file_get_name() local 140 fence->ops->get_driver_name(fence), in sync_file_get_name() 141 fence->ops->get_timeline_name(fence), in sync_file_get_name() 169 fence = dma_fence_unwrap_merge(a->fence, b->fence); in sync_file_merge() 170 if (!fence) { in sync_file_merge() 174 sync_file->fence = fence; in sync_file_merge() 300 dma_fence_unwrap_for_each(fence, &iter, sync_file->fence) in sync_file_ioctl_fence_info() [all …]
|
A D | dma-resv.c | 129 dma_fence_put(fence); in dma_resv_list_free() 239 dma_fence_put(fence); in dma_resv_reserve_fences() 287 dma_fence_get(fence); in dma_resv_add_fence() 388 cursor->fence = dma_fence_get_rcu(cursor->fence); in dma_resv_iter_walk_unlocked() 389 if (!cursor->fence) { in dma_resv_iter_walk_unlocked() 421 return cursor->fence; in dma_resv_iter_first_unlocked() 450 return cursor->fence; in dma_resv_iter_next_unlocked() 474 return fence; in dma_resv_iter_first() 502 return fence; in dma_resv_iter_next() 627 *fence = NULL; in dma_resv_get_singleton() [all …]
|
A D | dma-fence-chain.c | 44 chain = to_dma_fence_chain(fence); in dma_fence_chain_walk() 46 dma_fence_put(fence); in dma_fence_chain_walk() 74 dma_fence_put(fence); in dma_fence_chain_walk() 155 dma_fence_put(fence); in dma_fence_chain_enable_signaling() 166 dma_fence_chain_for_each(fence, fence) { in dma_fence_chain_signaled() 170 dma_fence_put(fence); in dma_fence_chain_signaled() 205 dma_fence_put(chain->fence); in dma_fence_chain_release() 206 dma_fence_free(fence); in dma_fence_chain_release() 231 struct dma_fence *fence, in dma_fence_chain_init() argument 239 chain->fence = fence; in dma_fence_chain_init() [all …]
|
A D | st-dma-fence-chain.c | 194 dma_fence_put(fence); in find_seqno() 203 dma_fence_put(fence); in find_seqno() 216 dma_fence_get(fence); in find_seqno() 218 dma_fence_put(fence); in find_seqno() 229 dma_fence_get(fence); in find_seqno() 231 dma_fence_put(fence); in find_seqno() 273 dma_fence_put(fence); in find_signaled() 279 if (fence && fence != fc.chains[0]) { in find_signaled() 311 dma_fence_put(fence); in find_out_of_order() 326 fence ? fence->seqno : 0); in find_out_of_order() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/ |
A D | i915_sw_fence.c | 131 return fence->fn(fence, state); in __i915_sw_fence_notify() 245 fence->fn = fn; in __i915_sw_fence_init() 247 fence->flags = 0; in __i915_sw_fence_init() 258 fence->error = 0; in i915_sw_fence_reinit() 379 wq->private = fence; in __i915_sw_fence_await_sw_fence() 433 fence = xchg(&cb->base.fence, NULL); in timer_i915_sw_fence_wake() 434 if (!fence) in timer_i915_sw_fence_wake() 454 fence = xchg(&cb->base.fence, NULL); in dma_i915_sw_fence_wake_timer() 455 if (fence) { in dma_i915_sw_fence_wake_timer() 507 cb->fence = fence; in i915_sw_fence_await_dma_fence() [all …]
|
A D | i915_sw_fence.h | 42 void __i915_sw_fence_init(struct i915_sw_fence *fence, 47 #define i915_sw_fence_init(fence, fn) \ argument 52 __i915_sw_fence_init((fence), (fn), #fence, &__key); \ 55 #define i915_sw_fence_init(fence, fn) \ argument 58 __i915_sw_fence_init((fence), (fn), NULL, NULL); \ 65 void i915_sw_fence_fini(struct i915_sw_fence *fence); 81 struct i915_sw_fence *fence; member 103 return atomic_read(&fence->pending) <= 0; in i915_sw_fence_signaled() 108 return atomic_read(&fence->pending) < 0; in i915_sw_fence_done() 113 wait_event(fence->wait, i915_sw_fence_done(fence)); in i915_sw_fence_wait() [all …]
|
A D | i915_request.c | 1083 fence = NULL; in i915_request_await_start() 1113 fence = &prev->fence; in i915_request_await_start() 1116 if (!fence) in i915_request_await_start() 1122 fence, 0, in i915_request_await_start() 1426 fence = *child++; in i915_request_await_execution() 1430 if (fence->context == rq->fence.context) in i915_request_await_execution() 1528 fence = *child++; in i915_request_await_dma_fence() 1537 if (fence->context == rq->fence.context) in i915_request_await_dma_fence() 1543 fence)) in i915_request_await_dma_fence() 1559 fence); in i915_request_await_dma_fence() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | dma-fence.h | 275 if (fence) in dma_fence_put() 287 if (fence) in dma_fence_get() 289 return fence; in dma_fence_get() 302 return fence; in dma_fence_get_rcu() 327 struct dma_fence *fence; in dma_fence_get_rcu_safe() local 330 if (!fence) in dma_fence_get_rcu_safe() 353 dma_fence_put(fence); in dma_fence_get_rcu_safe() 404 if (fence->ops->signaled && fence->ops->signaled(fence)) { in dma_fence_is_signaled_locked() 434 if (fence->ops->signaled && fence->ops->signaled(fence)) { in dma_fence_is_signaled() 548 fence->error = error; in dma_fence_set_error() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/ |
A D | intel_ggtt_fencing.c | 82 val = fence->start + fence->size - I965_FENCE_PAGE; in i965_write_fence_reg() 248 GEM_BUG_ON(old->fence != fence); in fence_update() 276 vma->fence = fence; in fence_update() 293 struct i915_fence_reg *fence = vma->fence; in i915_vma_revoke_fence() local 297 if (!fence) in i915_vma_revoke_fence() 325 return fence->vma && i915_vma_is_active(fence->vma); in fence_is_active() 334 GEM_BUG_ON(fence->vma && fence->vma->fence != fence); in fence_find() 351 return fence; in fence_find() 372 fence = vma->fence; in __i915_vma_pin_fence() 395 GEM_BUG_ON(vma->fence != (set ? fence : NULL)); in __i915_vma_pin_fence() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/ |
A D | nouveau_fence.c | 59 list_del(&fence->head); in nouveau_fence_signal() 80 return from_fence(fence); in nouveau_local_fence() 91 fence = list_entry(fctx->pending.next, typeof(*fence), head); in nouveau_fence_context_kill() 136 fence = list_entry(fctx->pending.next, typeof(*fence), head); in nouveau_fence_update() 159 fence = list_entry(fctx->pending.next, typeof(*fence), head); in nouveau_fence_wait_uevent_handler() 213 fence->channel = chan; in nouveau_fence_emit() 224 ret = fctx->emit(fence); in nouveau_fence_emit() 358 fence) { in nouveau_fence_sync() 408 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in nouveau_fence_new() 409 if (!fence) in nouveau_fence_new() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_amdkfd_fence.c | 69 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in amdgpu_amdkfd_fence_create() 70 if (fence == NULL) in amdgpu_amdkfd_fence_create() 75 fence->mm = mm; in amdgpu_amdkfd_fence_create() 79 dma_fence_init(&fence->base, &amdkfd_fence_ops, &fence->lock, in amdgpu_amdkfd_fence_create() 82 return fence; in amdgpu_amdkfd_fence_create() 94 return fence; in to_amdgpu_amdkfd_fence() 123 if (!fence) in amdkfd_fence_enable_signaling() 154 if (WARN_ON(!fence)) in amdkfd_fence_release() 157 mmdrop(fence->mm); in amdkfd_fence_release() 175 if (!fence) in amdkfd_fence_check_mm() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/vgem/ |
A D | vgem_fence.c | 50 struct vgem_fence *fence = container_of(base, typeof(*fence), base); in vgem_fence_release() local 65 dma_fence_is_signaled(fence) ? fence->seqno : 0); in vgem_fence_timeline_value_str() 79 struct vgem_fence *fence = from_timer(fence, t, timer); in vgem_fence_timeout() local 89 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in vgem_fence_create() 90 if (!fence) in vgem_fence_create() 94 dma_fence_init(&fence->base, &vgem_fence_ops, &fence->lock, in vgem_fence_create() 102 return &fence->base; in vgem_fence_create() 148 if (!fence) { in vgem_fence_attach_ioctl() 218 fence = idr_replace(&vfile->fence_idr, NULL, arg->fence); in vgem_fence_signal_ioctl() 220 if (!fence) in vgem_fence_signal_ioctl() [all …]
|
/linux-6.3-rc2/include/trace/events/ |
A D | dma_fence.h | 16 TP_ARGS(fence), 19 __string(driver, fence->ops->get_driver_name(fence)) 20 __string(timeline, fence->ops->get_timeline_name(fence)) 26 __assign_str(driver, fence->ops->get_driver_name(fence)); 27 __assign_str(timeline, fence->ops->get_timeline_name(fence)); 41 TP_ARGS(fence) 48 TP_ARGS(fence) 55 TP_ARGS(fence) 62 TP_ARGS(fence) 69 TP_ARGS(fence) [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/scheduler/ |
A D | sched_fence.c | 53 dma_fence_signal(&fence->scheduled); in drm_sched_fence_scheduled() 58 dma_fence_signal(&fence->finished); in drm_sched_fence_finished() 77 if (!WARN_ON_ONCE(!fence)) in drm_sched_fence_free_rcu() 92 if (!WARN_ON_ONCE(fence->sched)) in drm_sched_fence_free() 108 dma_fence_put(fence->parent); in drm_sched_fence_release_scheduled() 123 dma_fence_put(&fence->scheduled); in drm_sched_fence_release_finished() 156 if (fence == NULL) in drm_sched_fence_alloc() 159 fence->owner = owner; in drm_sched_fence_alloc() 160 spin_lock_init(&fence->lock); in drm_sched_fence_alloc() 162 return fence; in drm_sched_fence_alloc() [all …]
|
A D | gpu_scheduler_trace.h | 40 __field(struct dma_fence *, fence) 58 __entry->fence, __get_str(name), 74 TP_ARGS(fence), 76 __field(struct dma_fence *, fence) 80 __entry->fence = &fence->finished; 87 TP_ARGS(sched_job, fence), 91 __field(struct dma_fence *, fence) 99 __entry->fence = fence; 100 __entry->ctx = fence->context; 101 __entry->seqno = fence->seqno; [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/selftests/ |
A D | lib_sw_fence.c | 42 atomic_set(&fence->pending, 1); in __onstack_fence_init() 43 fence->error = 0; in __onstack_fence_init() 44 fence->fn = nop_fence_notify; in __onstack_fence_init() 49 if (!fence->fn) in onstack_fence_fini() 52 i915_sw_fence_commit(fence); in onstack_fence_fini() 53 i915_sw_fence_fini(fence); in onstack_fence_fini() 85 struct i915_sw_fence fence; member 95 struct heap_fence *h = container_of(fence, typeof(*h), fence); in heap_fence_notify() 102 heap_fence_put(&h->fence); in heap_fence_notify() 119 return &h->fence; in heap_fence_create() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_fence.c | 134 fence->destroy(fence); in vmw_fence_obj_destroy() 547 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in vmw_fence_create() 556 *p_fence = fence; in vmw_fence_create() 560 kfree(fence); in vmw_fence_create() 568 container_of(fence, struct vmw_user_fence, fence); in vmw_user_fence_destroy() 578 struct vmw_fence_obj *fence = &ufence->fence; in vmw_user_fence_base_release() local 752 fence = &(container_of(base, struct vmw_user_fence, base)->fence); in vmw_fence_obj_wait_ioctl() 792 fence = &(container_of(base, struct vmw_user_fence, base)->fence); in vmw_fence_obj_signaled_ioctl() 960 eaction->fence = vmw_fence_obj_reference(fence); in vmw_event_fence_action_queue() 1075 if (!fence) { in vmw_fence_event_ioctl() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gem/ |
A D | i915_gem_wait.c | 27 if (dma_fence_is_i915(fence)) in i915_gem_object_wait_fence() 30 return dma_fence_wait_timeout(fence, in i915_gem_object_wait_fence() 39 struct dma_fence *fence; in i915_gem_object_boost() local 60 if (dma_fence_is_i915(fence) && in i915_gem_object_boost() 72 struct dma_fence *fence; in i915_gem_object_wait_reservation() local 98 if (dma_fence_is_signaled(fence) || !dma_fence_is_i915(fence)) in fence_set_priority() 101 rq = to_request(fence); in fence_set_priority() 118 if (dma_fence_is_signaled(fence)) in i915_gem_fence_wait_priority() 124 if (dma_fence_is_array(fence)) { in i915_gem_fence_wait_priority() 141 fence_set_priority(fence, attr); in i915_gem_fence_wait_priority() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/radeon/ |
A D | radeon_fence.c | 177 seq = atomic64_read(&fence->rdev->fence_drv[fence->ring].last_seq); in radeon_fence_check_signaled() 180 radeon_irq_kms_sw_irq_put(fence->rdev, fence->ring); in radeon_fence_check_signaled() 431 if (!fence) in radeon_fence_signaled() 434 if (radeon_fence_seq_signaled(fence->rdev, fence->seq, fence->ring)) { in radeon_fence_signaled() 550 seq[fence->ring] = fence->seq; in radeon_fence_wait_timeout() 692 return fence; in radeon_fence_ref() 706 *fence = NULL; in radeon_fence_unref() 754 if (!fence) { in radeon_fence_need_sync() 764 if (fence->seq <= fdrv->sync_seq[fence->ring]) { in radeon_fence_need_sync() 785 if (!fence) { in radeon_fence_note_sync() [all …]
|
A D | radeon_sync.c | 63 struct radeon_fence *fence) in radeon_sync_fence() argument 67 if (!fence) in radeon_sync_fence() 70 other = sync->sync_to[fence->ring]; in radeon_sync_fence() 71 sync->sync_to[fence->ring] = radeon_fence_later(fence, other); in radeon_sync_fence() 73 if (fence->is_vm_update) { in radeon_sync_fence() 95 struct radeon_fence *fence; in radeon_sync_resv() local 100 fence = to_radeon_fence(f); in radeon_sync_resv() 101 if (fence && fence->rdev == rdev) in radeon_sync_resv() 102 radeon_sync_fence(sync, fence); in radeon_sync_resv() 181 radeon_fence_note_sync(fence, ring); in radeon_sync_rings() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/ |
A D | drm_syncobj.c | 261 wait->fence = fence; in drm_syncobj_fence_add_wait() 328 if (fence) in drm_syncobj_replace_fence() 335 rcu_assign_pointer(syncobj->fence, fence); in drm_syncobj_replace_fence() 452 *fence = wait.fence; in drm_syncobj_find_fence() 514 if (fence) in drm_syncobj_create() 690 if (!fence) in drm_syncobj_import_sync_file_fence() 955 fence = rcu_dereference_protected(syncobj->fence, in syncobj_wait_syncobj_func() 964 wait->fence = fence; in syncobj_wait_syncobj_func() 1026 if (fence) in drm_syncobj_array_wait_timeout() 1027 entries[i].fence = fence; in drm_syncobj_array_wait_timeout() [all …]
|
/linux-6.3-rc2/drivers/gpu/host1x/ |
A D | intr.c | 15 struct host1x_syncpt_fence *fence) in host1x_intr_add_fence_to_list() argument 22 list_add(&fence->list, &fence_in_list->list); in host1x_intr_add_fence_to_list() 28 list_add(&fence->list, &list->list); in host1x_intr_add_fence_to_list() 33 struct host1x_syncpt_fence *fence; in host1x_intr_update_hw_state() local 49 INIT_LIST_HEAD(&fence->list); in host1x_intr_add_fence_locked() 52 host1x_intr_update_hw_state(host, fence->sp); in host1x_intr_add_fence_locked() 62 if (list_empty(&fence->list)) { in host1x_intr_remove_fence() 67 list_del_init(&fence->list); in host1x_intr_remove_fence() 78 struct host1x_syncpt_fence *fence, *tmp; in host1x_intr_handle_interrupt() local 91 list_del_init(&fence->list); in host1x_intr_handle_interrupt() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/v3d/ |
A D | v3d_fence.c | 8 struct v3d_fence *fence; in v3d_fence_create() local 10 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in v3d_fence_create() 11 if (!fence) in v3d_fence_create() 14 fence->dev = &v3d->drm; in v3d_fence_create() 15 fence->queue = queue; in v3d_fence_create() 16 fence->seqno = ++v3d->queue[queue].emit_seqno; in v3d_fence_create() 17 dma_fence_init(&fence->base, &v3d_fence_ops, &v3d->job_lock, in v3d_fence_create() 18 v3d->queue[queue].fence_context, fence->seqno); in v3d_fence_create() 20 return &fence->base; in v3d_fence_create() 23 static const char *v3d_fence_get_driver_name(struct dma_fence *fence) in v3d_fence_get_driver_name() argument [all …]
|
/linux-6.3-rc2/tools/testing/selftests/sync/ |
A D | sync_stress_consumer.c | 40 static int busy_wait_on_fence(int fence) in busy_wait_on_fence() argument 66 int fence, valid, i; in mpsc_producer_thread() local 73 valid = sw_sync_fence_is_valid(fence); in mpsc_producer_thread() 82 ASSERT(sync_wait(fence, -1) > 0, in mpsc_producer_thread() 100 sw_sync_fence_destroy(fence); in mpsc_producer_thread() 108 int fence, merged, tmp, valid, it, i; in mpcs_consumer_thread() local 121 sw_sync_fence_destroy(fence); in mpcs_consumer_thread() 122 fence = merged; in mpcs_consumer_thread() 125 valid = sw_sync_fence_is_valid(fence); in mpcs_consumer_thread() 133 ASSERT(sync_wait(fence, -1) > 0, in mpcs_consumer_thread() [all …]
|