/linux-6.6.21/drivers/dma-buf/ |
D | dma-fence.c | 114 static const char *dma_fence_stub_get_name(struct dma_fence *fence) in dma_fence_stub_get_name() argument 159 struct dma_fence *fence; in dma_fence_allocate_private_stub() local 161 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in dma_fence_allocate_private_stub() 162 if (fence == NULL) in dma_fence_allocate_private_stub() 165 dma_fence_init(fence, in dma_fence_allocate_private_stub() 171 &fence->flags); in dma_fence_allocate_private_stub() 173 dma_fence_signal_timestamp(fence, timestamp); in dma_fence_allocate_private_stub() 175 return fence; in dma_fence_allocate_private_stub() 367 int dma_fence_signal_timestamp_locked(struct dma_fence *fence, in dma_fence_signal_timestamp_locked() argument 373 lockdep_assert_held(fence->lock); in dma_fence_signal_timestamp_locked() [all …]
|
D | sync_file.c | 65 struct sync_file *sync_file_create(struct dma_fence *fence) in sync_file_create() argument 73 sync_file->fence = dma_fence_get(fence); in sync_file_create() 106 struct dma_fence *fence; in sync_file_get_fence() local 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() 142 fence->context, in sync_file_get_name() 143 fence->seqno); in sync_file_get_name() [all …]
|
D | dma-fence-chain.c | 12 static bool dma_fence_chain_enable_signaling(struct dma_fence *fence); 39 struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence) in dma_fence_chain_walk() argument 44 chain = to_dma_fence_chain(fence); in dma_fence_chain_walk() 46 dma_fence_put(fence); in dma_fence_chain_walk() 54 if (!dma_fence_is_signaled(prev_chain->fence)) in dma_fence_chain_walk() 74 dma_fence_put(fence); in dma_fence_chain_walk() 112 static const char *dma_fence_chain_get_driver_name(struct dma_fence *fence) in dma_fence_chain_get_driver_name() argument 117 static const char *dma_fence_chain_get_timeline_name(struct dma_fence *fence) in dma_fence_chain_get_timeline_name() argument 145 static bool dma_fence_chain_enable_signaling(struct dma_fence *fence) in dma_fence_chain_enable_signaling() argument 147 struct dma_fence_chain *head = to_dma_fence_chain(fence); in dma_fence_chain_enable_signaling() [all …]
|
D | dma-resv.c | 71 struct dma_resv *resv, struct dma_fence **fence, in dma_resv_list_entry() argument 78 *fence = (struct dma_fence *)(tmp & ~DMA_RESV_LIST_MASK); in dma_resv_list_entry() 86 struct dma_fence *fence, in dma_resv_list_set() argument 89 long tmp = ((long)fence) | usage; in dma_resv_list_set() 126 struct dma_fence *fence; in dma_resv_list_free() local 128 dma_resv_list_entry(list, i, NULL, &fence, NULL); in dma_resv_list_free() 129 dma_fence_put(fence); in dma_resv_list_free() 210 struct dma_fence *fence; in dma_resv_reserve_fences() local 212 dma_resv_list_entry(old, i, obj, &fence, &usage); in dma_resv_reserve_fences() 213 if (dma_fence_is_signaled(fence)) in dma_resv_reserve_fences() [all …]
|
D | st-dma-fence-chain.c | 62 struct dma_fence *fence, in mock_chain() argument 71 dma_fence_chain_init(f, dma_fence_get(prev), dma_fence_get(fence), in mock_chain() 184 struct dma_fence *fence; in find_seqno() local 192 fence = dma_fence_get(fc.tail); in find_seqno() 193 err = dma_fence_chain_find_seqno(&fence, 0); in find_seqno() 194 dma_fence_put(fence); in find_seqno() 201 fence = dma_fence_get(fc.tail); in find_seqno() 202 err = dma_fence_chain_find_seqno(&fence, i + 1); in find_seqno() 203 dma_fence_put(fence); in find_seqno() 209 if (fence != fc.chains[i]) { in find_seqno() [all …]
|
/linux-6.6.21/include/linux/ |
D | dma-fence.h | 105 typedef void (*dma_fence_func_t)(struct dma_fence *fence, 143 const char * (*get_driver_name)(struct dma_fence *fence); 155 const char * (*get_timeline_name)(struct dma_fence *fence); 192 bool (*enable_signaling)(struct dma_fence *fence); 209 bool (*signaled)(struct dma_fence *fence); 227 signed long (*wait)(struct dma_fence *fence, 238 void (*release)(struct dma_fence *fence); 248 void (*fence_value_str)(struct dma_fence *fence, char *str, int size); 258 void (*timeline_value_str)(struct dma_fence *fence, 279 void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/ |
D | i915_sw_fence.c | 49 static inline void debug_fence_init(struct i915_sw_fence *fence) in debug_fence_init() argument 51 debug_object_init(fence, &i915_sw_fence_debug_descr); in debug_fence_init() 54 static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) in debug_fence_init_onstack() argument 56 debug_object_init_on_stack(fence, &i915_sw_fence_debug_descr); in debug_fence_init_onstack() 59 static inline void debug_fence_activate(struct i915_sw_fence *fence) in debug_fence_activate() argument 61 debug_object_activate(fence, &i915_sw_fence_debug_descr); in debug_fence_activate() 64 static inline void debug_fence_set_state(struct i915_sw_fence *fence, in debug_fence_set_state() argument 67 debug_object_active_state(fence, &i915_sw_fence_debug_descr, old, new); in debug_fence_set_state() 70 static inline void debug_fence_deactivate(struct i915_sw_fence *fence) in debug_fence_deactivate() argument 72 debug_object_deactivate(fence, &i915_sw_fence_debug_descr); in debug_fence_deactivate() [all …]
|
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); \ 62 void i915_sw_fence_reinit(struct i915_sw_fence *fence); 65 void i915_sw_fence_fini(struct i915_sw_fence *fence); 67 static inline void i915_sw_fence_fini(struct i915_sw_fence *fence) {} in i915_sw_fence_fini() argument 70 void i915_sw_fence_commit(struct i915_sw_fence *fence); 72 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence, [all …]
|
D | i915_request.c | 54 struct i915_sw_fence *fence; member 61 static const char *i915_fence_get_driver_name(struct dma_fence *fence) in i915_fence_get_driver_name() argument 63 return dev_name(to_request(fence)->i915->drm.dev); in i915_fence_get_driver_name() 66 static const char *i915_fence_get_timeline_name(struct dma_fence *fence) in i915_fence_get_timeline_name() argument 79 if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) in i915_fence_get_timeline_name() 82 ctx = i915_request_gem_context(to_request(fence)); in i915_fence_get_timeline_name() 89 static bool i915_fence_signaled(struct dma_fence *fence) in i915_fence_signaled() argument 91 return i915_request_completed(to_request(fence)); in i915_fence_signaled() 94 static bool i915_fence_enable_signaling(struct dma_fence *fence) in i915_fence_enable_signaling() argument 96 return i915_request_enable_breadcrumb(to_request(fence)); in i915_fence_enable_signaling() [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/gt/ |
D | intel_ggtt_fencing.c | 49 static struct drm_i915_private *fence_to_i915(struct i915_fence_reg *fence) in fence_to_i915() argument 51 return fence->ggtt->vm.i915; in fence_to_i915() 54 static struct intel_uncore *fence_to_uncore(struct i915_fence_reg *fence) in fence_to_uncore() argument 56 return fence->ggtt->vm.gt->uncore; in fence_to_uncore() 59 static void i965_write_fence_reg(struct i915_fence_reg *fence) in i965_write_fence_reg() argument 65 if (GRAPHICS_VER(fence_to_i915(fence)) >= 6) { in i965_write_fence_reg() 66 fence_reg_lo = FENCE_REG_GEN6_LO(fence->id); in i965_write_fence_reg() 67 fence_reg_hi = FENCE_REG_GEN6_HI(fence->id); in i965_write_fence_reg() 71 fence_reg_lo = FENCE_REG_965_LO(fence->id); in i965_write_fence_reg() 72 fence_reg_hi = FENCE_REG_965_HI(fence->id); in i965_write_fence_reg() [all …]
|
/linux-6.6.21/drivers/gpu/drm/scheduler/ |
D | sched_fence.c | 52 struct dma_fence *fence) in drm_sched_fence_set_parent() argument 59 smp_store_release(&s_fence->parent, dma_fence_get(fence)); in drm_sched_fence_set_parent() 62 dma_fence_set_deadline(fence, s_fence->deadline); in drm_sched_fence_set_parent() 65 void drm_sched_fence_scheduled(struct drm_sched_fence *fence, in drm_sched_fence_scheduled() argument 75 drm_sched_fence_set_parent(fence, parent); in drm_sched_fence_scheduled() 77 dma_fence_signal(&fence->scheduled); in drm_sched_fence_scheduled() 80 void drm_sched_fence_finished(struct drm_sched_fence *fence, int result) in drm_sched_fence_finished() argument 83 dma_fence_set_error(&fence->finished, result); in drm_sched_fence_finished() 84 dma_fence_signal(&fence->finished); in drm_sched_fence_finished() 87 static const char *drm_sched_fence_get_driver_name(struct dma_fence *fence) in drm_sched_fence_get_driver_name() argument [all …]
|
D | gpu_scheduler_trace.h | 40 __field(struct dma_fence *, fence) 50 __entry->fence = &sched_job->s_fence->finished; 58 __entry->fence, __get_str(name), 73 TP_PROTO(struct drm_sched_fence *fence), 74 TP_ARGS(fence), 76 __field(struct dma_fence *, fence) 80 __entry->fence = &fence->finished; 82 TP_printk("fence=%p signaled", __entry->fence) 86 TP_PROTO(struct drm_sched_job *sched_job, struct dma_fence *fence), 87 TP_ARGS(sched_job, fence), [all …]
|
/linux-6.6.21/drivers/gpu/drm/nouveau/ |
D | nouveau_fence.c | 42 from_fence(struct dma_fence *fence) in from_fence() argument 44 return container_of(fence, struct nouveau_fence, base); in from_fence() 48 nouveau_fctx(struct nouveau_fence *fence) in nouveau_fctx() argument 50 return container_of(fence->base.lock, struct nouveau_fence_chan, lock); in nouveau_fctx() 54 nouveau_fence_signal(struct nouveau_fence *fence) in nouveau_fence_signal() argument 58 dma_fence_signal_locked(&fence->base); in nouveau_fence_signal() 59 list_del(&fence->head); in nouveau_fence_signal() 60 rcu_assign_pointer(fence->channel, NULL); in nouveau_fence_signal() 62 if (test_bit(DMA_FENCE_FLAG_USER_BITS, &fence->base.flags)) { in nouveau_fence_signal() 63 struct nouveau_fence_chan *fctx = nouveau_fctx(fence); in nouveau_fence_signal() [all …]
|
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_amdkfd_fence.c | 67 struct amdgpu_amdkfd_fence *fence; in amdgpu_amdkfd_fence_create() local 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() 76 get_task_comm(fence->timeline_name, current); in amdgpu_amdkfd_fence_create() 77 spin_lock_init(&fence->lock); in amdgpu_amdkfd_fence_create() 78 fence->svm_bo = svm_bo; 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() 87 struct amdgpu_amdkfd_fence *fence; in to_amdgpu_amdkfd_fence() local [all …]
|
/linux-6.6.21/drivers/gpu/drm/vgem/ |
D | vgem_fence.c | 38 static const char *vgem_fence_get_driver_name(struct dma_fence *fence) in vgem_fence_get_driver_name() argument 43 static const char *vgem_fence_get_timeline_name(struct dma_fence *fence) in vgem_fence_get_timeline_name() argument 50 struct vgem_fence *fence = container_of(base, typeof(*fence), base); in vgem_fence_release() local 52 del_timer_sync(&fence->timer); in vgem_fence_release() 53 dma_fence_free(&fence->base); in vgem_fence_release() 56 static void vgem_fence_value_str(struct dma_fence *fence, char *str, int size) in vgem_fence_value_str() argument 58 snprintf(str, size, "%llu", fence->seqno); in vgem_fence_value_str() 61 static void vgem_fence_timeline_value_str(struct dma_fence *fence, char *str, in vgem_fence_timeline_value_str() argument 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 [all …]
|
/linux-6.6.21/include/trace/events/ |
D | dma_fence.h | 14 TP_PROTO(struct dma_fence *fence), 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)); 28 __entry->context = fence->context; 29 __entry->seqno = fence->seqno; 39 TP_PROTO(struct dma_fence *fence), 41 TP_ARGS(fence) [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/selftests/ |
D | lib_sw_fence.c | 30 nop_fence_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state) in nop_fence_notify() argument 35 void __onstack_fence_init(struct i915_sw_fence *fence, in __onstack_fence_init() argument 39 debug_fence_init_onstack(fence); in __onstack_fence_init() 41 __init_waitqueue_head(&fence->wait, name, key); in __onstack_fence_init() 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() 47 void onstack_fence_fini(struct i915_sw_fence *fence) in onstack_fence_fini() argument 49 if (!fence->fn) in onstack_fence_fini() 52 i915_sw_fence_commit(fence); in onstack_fence_fini() [all …]
|
/linux-6.6.21/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_fence.c | 52 struct vmw_fence_obj fence; member 72 struct vmw_fence_obj *fence; member 80 fman_from_fence(struct vmw_fence_obj *fence) in fman_from_fence() argument 82 return container_of(fence->base.lock, struct vmw_fence_manager, lock); in fman_from_fence() 125 struct vmw_fence_obj *fence = in vmw_fence_obj_destroy() local 128 struct vmw_fence_manager *fman = fman_from_fence(fence); in vmw_fence_obj_destroy() 131 list_del_init(&fence->head); in vmw_fence_obj_destroy() 134 fence->destroy(fence); in vmw_fence_obj_destroy() 149 struct vmw_fence_obj *fence = in vmw_fence_enable_signaling() local 152 struct vmw_fence_manager *fman = fman_from_fence(fence); in vmw_fence_enable_signaling() [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/gem/ |
D | i915_gem_wait.c | 18 i915_gem_object_wait_fence(struct dma_fence *fence, in i915_gem_object_wait_fence() argument 24 if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) in i915_gem_object_wait_fence() 27 if (dma_fence_is_i915(fence)) in i915_gem_object_wait_fence() 28 return i915_request_wait_timeout(to_request(fence), flags, timeout); 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 59 dma_resv_for_each_fence_unlocked(&cursor, fence) in i915_gem_object_boost() 60 if (dma_fence_is_i915(fence) && in i915_gem_object_boost() 61 !i915_request_started(to_request(fence))) in i915_gem_object_boost() 62 intel_rps_boost(to_request(fence)); in i915_gem_object_boost() [all …]
|
/linux-6.6.21/drivers/gpu/drm/radeon/ |
D | radeon_fence.c | 135 struct radeon_fence **fence, in radeon_fence_emit() argument 141 *fence = kmalloc(sizeof(struct radeon_fence), GFP_KERNEL); in radeon_fence_emit() 142 if ((*fence) == NULL) { in radeon_fence_emit() 145 (*fence)->rdev = rdev; in radeon_fence_emit() 146 (*fence)->seq = seq = ++rdev->fence_drv[ring].sync_seq[ring]; in radeon_fence_emit() 147 (*fence)->ring = ring; in radeon_fence_emit() 148 (*fence)->is_vm_update = false; in radeon_fence_emit() 149 dma_fence_init(&(*fence)->base, &radeon_fence_ops, in radeon_fence_emit() 153 radeon_fence_ring_emit(rdev, ring, *fence); in radeon_fence_emit() 154 trace_radeon_fence_emit(rdev->ddev, ring, (*fence)->seq); in radeon_fence_emit() [all …]
|
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() 75 sync->last_vm_update = radeon_fence_later(fence, other); 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() [all …]
|
/linux-6.6.21/drivers/gpu/drm/ |
D | drm_syncobj.c | 212 struct dma_fence *fence; member 222 struct dma_fence *fence; member 263 struct dma_fence *fence; in drm_syncobj_fence_add_wait() local 265 if (wait->fence) in drm_syncobj_fence_add_wait() 273 fence = dma_fence_get(rcu_dereference_protected(syncobj->fence, 1)); in drm_syncobj_fence_add_wait() 274 if (!fence || dma_fence_chain_find_seqno(&fence, wait->point)) { in drm_syncobj_fence_add_wait() 275 dma_fence_put(fence); in drm_syncobj_fence_add_wait() 277 } else if (!fence) { in drm_syncobj_fence_add_wait() 278 wait->fence = dma_fence_get_stub(); in drm_syncobj_fence_add_wait() 280 wait->fence = fence; in drm_syncobj_fence_add_wait() [all …]
|
/linux-6.6.21/drivers/gpu/host1x/ |
D | intr.c | 15 struct host1x_syncpt_fence *fence) in host1x_intr_add_fence_to_list() argument 20 if ((s32)(fence_in_list->threshold - fence->threshold) <= 0) { in host1x_intr_add_fence_to_list() 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 36 fence = list_first_entry(&sp->fences.list, struct host1x_syncpt_fence, list); in host1x_intr_update_hw_state() 38 host1x_hw_intr_set_syncpt_threshold(host, sp->id, fence->threshold); in host1x_intr_update_hw_state() 45 void host1x_intr_add_fence_locked(struct host1x *host, struct host1x_syncpt_fence *fence) in host1x_intr_add_fence_locked() argument 47 struct host1x_fence_list *fence_list = &fence->sp->fences; in host1x_intr_add_fence_locked() 49 INIT_LIST_HEAD(&fence->list); in host1x_intr_add_fence_locked() [all …]
|
/linux-6.6.21/drivers/gpu/drm/v3d/ |
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.6.21/tools/testing/selftests/sync/ |
D | sync_stress_consumer.c | 40 static int busy_wait_on_fence(int fence) in busy_wait_on_fence() argument 45 error = sync_fence_count_with_status(fence, FENCE_STATUS_ERROR); in busy_wait_on_fence() 47 active = sync_fence_count_with_status(fence, in busy_wait_on_fence() 66 int fence, valid, i; in mpsc_producer_thread() local 72 fence = sw_sync_fence_create(consumer_timeline, "fence", i); in mpsc_producer_thread() 73 valid = sw_sync_fence_is_valid(fence); in mpsc_producer_thread() 82 ASSERT(sync_wait(fence, -1) > 0, in mpsc_producer_thread() 85 ASSERT(busy_wait_on_fence(fence) == 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 [all …]
|