Home
last modified time | relevance | path

Searched refs:fence (Results 1 – 25 of 286) sorted by relevance

12345678910>>...12

/drivers/dma-buf/
Ddma-fence.c113 static const char *dma_fence_stub_get_name(struct dma_fence *fence) in dma_fence_stub_get_name() argument
153 struct dma_fence *fence; in dma_fence_allocate_private_stub() local
155 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in dma_fence_allocate_private_stub()
156 if (fence == NULL) in dma_fence_allocate_private_stub()
159 dma_fence_init(fence, in dma_fence_allocate_private_stub()
163 dma_fence_signal(fence); in dma_fence_allocate_private_stub()
165 return fence; in dma_fence_allocate_private_stub()
357 int dma_fence_signal_timestamp_locked(struct dma_fence *fence, in dma_fence_signal_timestamp_locked() argument
363 lockdep_assert_held(fence->lock); in dma_fence_signal_timestamp_locked()
366 &fence->flags))) in dma_fence_signal_timestamp_locked()
[all …]
Ddma-resv.c105 RCU_INIT_POINTER(obj->fence, NULL); in dma_resv_init()
127 fobj = rcu_dereference_protected(obj->fence, 1); in dma_resv_fini()
172 struct dma_fence *fence; in dma_resv_reserve_shared() local
174 fence = rcu_dereference_protected(old->shared[i], in dma_resv_reserve_shared()
176 if (dma_fence_is_signaled(fence)) in dma_resv_reserve_shared()
177 RCU_INIT_POINTER(new->shared[--k], fence); in dma_resv_reserve_shared()
179 RCU_INIT_POINTER(new->shared[j++], fence); in dma_resv_reserve_shared()
191 rcu_assign_pointer(obj->fence, new); in dma_resv_reserve_shared()
198 struct dma_fence *fence; in dma_resv_reserve_shared() local
200 fence = rcu_dereference_protected(new->shared[i], in dma_resv_reserve_shared()
[all …]
Ddma-fence-chain.c12 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 …]
Dseqno-fence.c16 static const char *seqno_fence_get_driver_name(struct dma_fence *fence) in seqno_fence_get_driver_name() argument
18 struct seqno_fence *seqno_fence = to_seqno_fence(fence); in seqno_fence_get_driver_name()
20 return seqno_fence->ops->get_driver_name(fence); in seqno_fence_get_driver_name()
23 static const char *seqno_fence_get_timeline_name(struct dma_fence *fence) in seqno_fence_get_timeline_name() argument
25 struct seqno_fence *seqno_fence = to_seqno_fence(fence); in seqno_fence_get_timeline_name()
27 return seqno_fence->ops->get_timeline_name(fence); in seqno_fence_get_timeline_name()
30 static bool seqno_enable_signaling(struct dma_fence *fence) in seqno_enable_signaling() argument
32 struct seqno_fence *seqno_fence = to_seqno_fence(fence); in seqno_enable_signaling()
34 return seqno_fence->ops->enable_signaling(fence); in seqno_enable_signaling()
37 static bool seqno_signaled(struct dma_fence *fence) in seqno_signaled() argument
[all …]
Dst-dma-fence-chain.c62 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()
180 struct dma_fence *fence; in find_seqno() local
188 fence = dma_fence_get(fc.tail); in find_seqno()
189 err = dma_fence_chain_find_seqno(&fence, 0); in find_seqno()
190 dma_fence_put(fence); in find_seqno()
197 fence = dma_fence_get(fc.tail); in find_seqno()
198 err = dma_fence_chain_find_seqno(&fence, i + 1); in find_seqno()
199 dma_fence_put(fence); in find_seqno()
205 if (fence != fc.chains[i]) { in find_seqno()
[all …]
Dsync_file.c64 struct sync_file *sync_file_create(struct dma_fence *fence) in sync_file_create() argument
72 sync_file->fence = dma_fence_get(fence); in sync_file_create()
105 struct dma_fence *fence; in sync_file_get_fence() local
111 fence = dma_fence_get(sync_file->fence); in sync_file_get_fence()
114 return fence; in sync_file_get_fence()
136 struct dma_fence *fence = sync_file->fence; in sync_file_get_name() local
139 fence->ops->get_driver_name(fence), in sync_file_get_name()
140 fence->ops->get_timeline_name(fence), in sync_file_get_name()
141 fence->context, in sync_file_get_name()
142 fence->seqno); in sync_file_get_name()
[all …]
/drivers/gpu/drm/i915/
Di915_sw_fence.c47 static inline void debug_fence_init(struct i915_sw_fence *fence) in debug_fence_init() argument
49 debug_object_init(fence, &i915_sw_fence_debug_descr); in debug_fence_init()
52 static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) in debug_fence_init_onstack() argument
54 debug_object_init_on_stack(fence, &i915_sw_fence_debug_descr); in debug_fence_init_onstack()
57 static inline void debug_fence_activate(struct i915_sw_fence *fence) in debug_fence_activate() argument
59 debug_object_activate(fence, &i915_sw_fence_debug_descr); in debug_fence_activate()
62 static inline void debug_fence_set_state(struct i915_sw_fence *fence, in debug_fence_set_state() argument
65 debug_object_active_state(fence, &i915_sw_fence_debug_descr, old, new); in debug_fence_set_state()
68 static inline void debug_fence_deactivate(struct i915_sw_fence *fence) in debug_fence_deactivate() argument
70 debug_object_deactivate(fence, &i915_sw_fence_debug_descr); in debug_fence_deactivate()
[all …]
Di915_sw_fence.h41 void __i915_sw_fence_init(struct i915_sw_fence *fence,
46 #define i915_sw_fence_init(fence, fn) \ argument
50 __i915_sw_fence_init((fence), (fn), #fence, &__key); \
53 #define i915_sw_fence_init(fence, fn) \ argument
54 __i915_sw_fence_init((fence), (fn), NULL, NULL)
57 void i915_sw_fence_reinit(struct i915_sw_fence *fence);
60 void i915_sw_fence_fini(struct i915_sw_fence *fence);
62 static inline void i915_sw_fence_fini(struct i915_sw_fence *fence) {} in i915_sw_fence_fini() argument
65 void i915_sw_fence_commit(struct i915_sw_fence *fence);
67 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
[all …]
Di915_request.c50 struct i915_sw_fence *fence; member
57 static const char *i915_fence_get_driver_name(struct dma_fence *fence) in i915_fence_get_driver_name() argument
59 return dev_name(to_request(fence)->engine->i915->drm.dev); in i915_fence_get_driver_name()
62 static const char *i915_fence_get_timeline_name(struct dma_fence *fence) in i915_fence_get_timeline_name() argument
75 if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) in i915_fence_get_timeline_name()
78 ctx = i915_request_gem_context(to_request(fence)); in i915_fence_get_timeline_name()
85 static bool i915_fence_signaled(struct dma_fence *fence) in i915_fence_signaled() argument
87 return i915_request_completed(to_request(fence)); in i915_fence_signaled()
90 static bool i915_fence_enable_signaling(struct dma_fence *fence) in i915_fence_enable_signaling() argument
92 return i915_request_enable_breadcrumb(to_request(fence)); in i915_fence_enable_signaling()
[all …]
Di915_active.h48 void i915_active_noop(struct dma_fence *fence, struct dma_fence_cb *cb);
64 void *fence, in __i915_active_fence_init() argument
67 RCU_INIT_POINTER(active->fence, fence); in __i915_active_fence_init()
76 struct dma_fence *fence);
103 struct dma_fence *fence; in i915_active_fence_get() local
106 fence = dma_fence_get_rcu_safe(&active->fence); in i915_active_fence_get()
109 return fence; in i915_active_fence_get()
123 return rcu_access_pointer(active->fence); in i915_active_fence_isset()
168 __i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence);
169 int i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence);
[all …]
Di915_request.h59 rq__->fence.context, rq__->fence.seqno, \
165 struct dma_fence fence; member
315 static inline bool dma_fence_is_i915(const struct dma_fence *fence) in dma_fence_is_i915() argument
317 return fence->ops == &i915_fence_ops; in dma_fence_is_i915()
340 to_request(struct dma_fence *fence) in to_request() argument
343 BUILD_BUG_ON(offsetof(struct i915_request, fence) != 0); in to_request()
344 GEM_BUG_ON(fence && !dma_fence_is_i915(fence)); in to_request()
345 return container_of(fence, struct i915_request, fence); in to_request()
351 return to_request(dma_fence_get(&rq->fence)); in i915_request_get()
357 return to_request(dma_fence_get_rcu(&rq->fence)); in i915_request_get_rcu()
[all …]
Di915_active.c45 return IS_ERR(rcu_access_pointer(active->fence)); in is_barrier()
138 GEM_BUG_ON(rcu_access_pointer(ref->excl.fence)); in __active_retire()
206 return (struct dma_fence ** __force)&active->fence; in __active_fence_slot()
210 active_fence_cb(struct dma_fence *fence, struct dma_fence_cb *cb) in active_fence_cb() argument
215 return cmpxchg(__active_fence_slot(active), fence, NULL) == fence; in active_fence_cb()
219 node_retire(struct dma_fence *fence, struct dma_fence_cb *cb) in node_retire() argument
221 if (active_fence_cb(fence, cb)) in node_retire()
226 excl_retire(struct dma_fence *fence, struct dma_fence_cb *cb) in excl_retire() argument
228 if (active_fence_cb(fence, cb)) in excl_retire()
427 int i915_active_ref(struct i915_active *ref, u64 idx, struct dma_fence *fence) in i915_active_ref() argument
[all …]
/drivers/gpu/drm/i915/gt/
Dintel_ggtt_fencing.c43 static struct drm_i915_private *fence_to_i915(struct i915_fence_reg *fence) in fence_to_i915() argument
45 return fence->ggtt->vm.i915; in fence_to_i915()
48 static struct intel_uncore *fence_to_uncore(struct i915_fence_reg *fence) in fence_to_uncore() argument
50 return fence->ggtt->vm.gt->uncore; in fence_to_uncore()
53 static void i965_write_fence_reg(struct i915_fence_reg *fence) in i965_write_fence_reg() argument
59 if (GRAPHICS_VER(fence_to_i915(fence)) >= 6) { in i965_write_fence_reg()
60 fence_reg_lo = FENCE_REG_GEN6_LO(fence->id); in i965_write_fence_reg()
61 fence_reg_hi = FENCE_REG_GEN6_HI(fence->id); in i965_write_fence_reg()
65 fence_reg_lo = FENCE_REG_965_LO(fence->id); in i965_write_fence_reg()
66 fence_reg_hi = FENCE_REG_965_HI(fence->id); in i965_write_fence_reg()
[all …]
/drivers/gpu/drm/nouveau/
Dnouveau_fence.c44 from_fence(struct dma_fence *fence) in from_fence() argument
46 return container_of(fence, struct nouveau_fence, base); in from_fence()
50 nouveau_fctx(struct nouveau_fence *fence) in nouveau_fctx() argument
52 return container_of(fence->base.lock, struct nouveau_fence_chan, lock); in nouveau_fctx()
56 nouveau_fence_signal(struct nouveau_fence *fence) in nouveau_fence_signal() argument
60 dma_fence_signal_locked(&fence->base); in nouveau_fence_signal()
61 list_del(&fence->head); in nouveau_fence_signal()
62 rcu_assign_pointer(fence->channel, NULL); in nouveau_fence_signal()
64 if (test_bit(DMA_FENCE_FLAG_USER_BITS, &fence->base.flags)) { in nouveau_fence_signal()
65 struct nouveau_fence_chan *fctx = nouveau_fctx(fence); in nouveau_fence_signal()
[all …]
/drivers/gpu/drm/vgem/
Dvgem_fence.c38 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 …]
/drivers/gpu/drm/vmwgfx/
Dvmwgfx_fence.c55 struct vmw_fence_obj fence; member
75 struct vmw_fence_obj *fence; member
83 fman_from_fence(struct vmw_fence_obj *fence) in fman_from_fence() argument
85 return container_of(fence->base.lock, struct vmw_fence_manager, lock); in fman_from_fence()
128 struct vmw_fence_obj *fence = in vmw_fence_obj_destroy() local
131 struct vmw_fence_manager *fman = fman_from_fence(fence); in vmw_fence_obj_destroy()
134 list_del_init(&fence->head); in vmw_fence_obj_destroy()
137 fence->destroy(fence); in vmw_fence_obj_destroy()
152 struct vmw_fence_obj *fence = in vmw_fence_enable_signaling() local
155 struct vmw_fence_manager *fman = fman_from_fence(fence); in vmw_fence_enable_signaling()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd_fence.c67 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 …]
/drivers/gpu/drm/radeon/
Dradeon_fence.c135 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 …]
Dradeon_sync.c63 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()
96 struct radeon_fence *fence; in radeon_sync_resv() local
102 fence = f ? to_radeon_fence(f) : NULL; in radeon_sync_resv()
103 if (fence && fence->rdev == rdev) in radeon_sync_resv()
104 radeon_sync_fence(sync, fence); in radeon_sync_resv()
[all …]
/drivers/gpu/drm/scheduler/
Dsched_fence.c51 void drm_sched_fence_scheduled(struct drm_sched_fence *fence) in drm_sched_fence_scheduled() argument
53 int ret = dma_fence_signal(&fence->scheduled); in drm_sched_fence_scheduled()
56 DMA_FENCE_TRACE(&fence->scheduled, in drm_sched_fence_scheduled()
59 DMA_FENCE_TRACE(&fence->scheduled, in drm_sched_fence_scheduled()
63 void drm_sched_fence_finished(struct drm_sched_fence *fence) in drm_sched_fence_finished() argument
65 int ret = dma_fence_signal(&fence->finished); in drm_sched_fence_finished()
68 DMA_FENCE_TRACE(&fence->finished, in drm_sched_fence_finished()
71 DMA_FENCE_TRACE(&fence->finished, in drm_sched_fence_finished()
75 static const char *drm_sched_fence_get_driver_name(struct dma_fence *fence) in drm_sched_fence_get_driver_name() argument
82 struct drm_sched_fence *fence = to_drm_sched_fence(f); in drm_sched_fence_get_timeline_name() local
[all …]
Dgpu_scheduler_trace.h40 __field(struct dma_fence *, fence)
50 __entry->fence = &sched_job->s_fence->finished;
58 __entry->fence, __entry->name,
67 __field(struct dma_fence *, fence)
77 __entry->fence = &sched_job->s_fence->finished;
85 __entry->fence, __entry->name,
90 TP_PROTO(struct drm_sched_fence *fence),
91 TP_ARGS(fence),
93 __field(struct dma_fence *, fence)
97 __entry->fence = &fence->finished;
[all …]
/drivers/gpu/drm/i915/selftests/
Dlib_sw_fence.c30 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->flags = (unsigned long)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->flags) in onstack_fence_fini()
52 i915_sw_fence_commit(fence); in onstack_fence_fini()
[all …]
/drivers/gpu/drm/
Ddrm_syncobj.c206 struct dma_fence *fence; member
243 struct dma_fence *fence; in drm_syncobj_fence_add_wait() local
245 if (wait->fence) in drm_syncobj_fence_add_wait()
253 fence = dma_fence_get(rcu_dereference_protected(syncobj->fence, 1)); in drm_syncobj_fence_add_wait()
254 if (!fence || dma_fence_chain_find_seqno(&fence, wait->point)) { in drm_syncobj_fence_add_wait()
255 dma_fence_put(fence); in drm_syncobj_fence_add_wait()
257 } else if (!fence) { in drm_syncobj_fence_add_wait()
258 wait->fence = dma_fence_get_stub(); in drm_syncobj_fence_add_wait()
260 wait->fence = fence; in drm_syncobj_fence_add_wait()
287 struct dma_fence *fence, in drm_syncobj_add_point() argument
[all …]
/drivers/gpu/drm/v3d/
Dv3d_fence.c8 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 …]
/drivers/gpu/drm/i915/gem/
Di915_gem_wait.c18 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(to_request(fence), flags, timeout); in i915_gem_object_wait_fence()
30 return dma_fence_wait_timeout(fence, in i915_gem_object_wait_fence()
94 static void fence_set_priority(struct dma_fence *fence, in fence_set_priority() argument
100 if (dma_fence_is_signaled(fence) || !dma_fence_is_i915(fence)) in fence_set_priority()
103 rq = to_request(fence); in fence_set_priority()
112 static inline bool __dma_fence_is_chain(const struct dma_fence *fence) in __dma_fence_is_chain() argument
114 return fence->ops == &dma_fence_chain_ops; in __dma_fence_is_chain()
[all …]

12345678910>>...12