Home
last modified time | relevance | path

Searched full:fence (Results 1 – 25 of 1073) sorted by relevance

12345678910>>...43

/kernel/linux/linux-6.6/drivers/gpu/drm/i915/
Di915_sw_fence.c8 #include <linux/dma-fence.h>
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
[all …]
Di915_sw_fence.h12 #include <linux/dma-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);
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/
Di915_sw_fence.c8 #include <linux/dma-fence.h>
42 static inline void debug_fence_init(struct i915_sw_fence *fence) in debug_fence_init() argument
44 debug_object_init(fence, &i915_sw_fence_debug_descr); in debug_fence_init()
47 static inline void debug_fence_init_onstack(struct i915_sw_fence *fence) in debug_fence_init_onstack() argument
49 debug_object_init_on_stack(fence, &i915_sw_fence_debug_descr); in debug_fence_init_onstack()
52 static inline void debug_fence_activate(struct i915_sw_fence *fence) in debug_fence_activate() argument
54 debug_object_activate(fence, &i915_sw_fence_debug_descr); in debug_fence_activate()
57 static inline void debug_fence_set_state(struct i915_sw_fence *fence, in debug_fence_set_state() argument
60 debug_object_active_state(fence, &i915_sw_fence_debug_descr, old, new); in debug_fence_set_state()
63 static inline void debug_fence_deactivate(struct i915_sw_fence *fence) in debug_fence_deactivate() argument
[all …]
/kernel/linux/linux-6.6/include/linux/
Ddma-fence.h3 * Fence mechanism for dma-buf to allow for asynchronous dma access
31 * @refcount: refcount for this fence
32 * @ops: dma_fence_ops associated with this fence
33 * @rcu: used for releasing fence with kfree_rcu
36 * @context: execution context this fence belongs to, returned by
38 * @seqno: the sequence number of this fence inside the execution context,
39 * can be compared to decide which fence would be signaled later.
41 * @timestamp: Timestamp when the fence was signaled.
43 * dma_fence_signal, indicates that the fence has completed with an error.
49 * DMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled
[all …]
Ddma-fence-chain.h3 * fence-chain: chain fences together in a timeline
13 #include <linux/dma-fence.h>
18 * struct dma_fence_chain - fence to represent an node of a fence chain
19 * @base: fence base class
20 * @prev: previous fence of the chain
22 * @fence: encapsulated fence
23 * @lock: spinlock for fence handling
29 struct dma_fence *fence; member
35 * complection of the fence chain. Never used at the same time
54 * to_dma_fence_chain - cast a fence to a dma_fence_chain
[all …]
/kernel/linux/linux-6.6/drivers/dma-buf/
Ddma-fence.c3 * Fence mechanism for dma-buf and to allow for asynchronous dma access
16 #include <linux/dma-fence.h>
31 * fence context counter: each execution context should have its own
32 * fence context, this allows checking if fences belong to the same
45 * A fence is initialized using dma_fence_init() and completed using
60 * fence to be updated.
69 * DOC: fence cross-driver contract
95 * This means any code required for fence completion cannot acquire a
100 * callbacks. This means any code required for fence completion cannot
105 * for fence completeion cannot allocate memory with GFP_NOFS or GFP_NOIO.
[all …]
Ddma-fence-chain.c3 * fence-chain: chain fences together in a timeline
10 #include <linux/dma-fence-chain.h>
12 static bool dma_fence_chain_enable_signaling(struct dma_fence *fence);
15 * dma_fence_chain_get_prev - use RCU to get a reference to the previous fence
18 * Use dma_fence_get_rcu_safe to get a reference to the previous fence of the
33 * @fence: current chain node
35 * Walk the chain to the next node. Returns the next fence or NULL if we are at
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()
[all …]
/kernel/linux/linux-5.10/drivers/dma-buf/
Ddma-fence.c3 * Fence mechanism for dma-buf and to allow for asynchronous dma access
16 #include <linux/dma-fence.h>
30 * fence context counter: each execution context should have its own
31 * fence context, this allows checking if fences belong to the same
44 * A fence is initialized using dma_fence_init() and completed using
59 * fence to be updated.
68 * DOC: fence cross-driver contract
94 * This means any code required for fence completion cannot acquire a
99 * callbacks. This means any code required for fence completion cannot
104 * for fence completeion cannot allocate memory with GFP_NOFS or GFP_NOIO.
[all …]
Ddma-fence-chain.c3 * fence-chain: chain fences together in a timeline
10 #include <linux/dma-fence-chain.h>
12 static bool dma_fence_chain_enable_signaling(struct dma_fence *fence);
15 * dma_fence_chain_get_prev - use RCU to get a reference to the previous fence
18 * Use dma_fence_get_rcu_safe to get a reference to the previous fence of the
33 * @fence: current chain node
35 * Walk the chain to the next node. Returns the next fence or NULL if we are at
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()
[all …]
/kernel/linux/linux-5.10/include/linux/
Ddma-fence.h3 * Fence mechanism for dma-buf to allow for asynchronous dma access
31 * @refcount: refcount for this fence
32 * @ops: dma_fence_ops associated with this fence
33 * @rcu: used for releasing fence with kfree_rcu
36 * @context: execution context this fence belongs to, returned by
38 * @seqno: the sequence number of this fence inside the execution context,
39 * can be compared to decide which fence would be signaled later.
41 * @timestamp: Timestamp when the fence was signaled.
43 * dma_fence_signal, indicates that the fence has completed with an error.
49 * DMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/scheduler/
Dsched_fence.c52 struct dma_fence *fence) in drm_sched_fence_set_parent() argument
57 * fence's parent set before test_bit() in drm_sched_fence_set_parent()
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
68 /* Set the parent before signaling the scheduled fence, such that, in drm_sched_fence_scheduled()
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()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/radeon/
Dradeon_fence.c50 * for GPU/CPU synchronization. When the fence is written,
51 * it is expected that all buffers associated with that fence
59 * radeon_fence_write - write a fence value
63 * @ring: ring index the fence is associated with
65 * Writes a fence value to memory or a scratch register (all asics).
80 * radeon_fence_read - read a fence value
83 * @ring: ring index the fence is associated with
85 * Reads a fence value from memory or a scratch register (all asics).
86 * Returns the value of the fence read from memory or register.
125 * radeon_fence_emit - emit a fence on the requested ring
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/gt/
Dintel_ggtt_fencing.c18 * DOC: fence register handling
37 * dynamically associated with objects. Furthermore fence state is committed to
41 * cases the fence can be removed forcefully with i915_gem_object_put_fence().
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()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/
Dradeon_fence.c51 * for GPU/CPU synchronization. When the fence is written,
52 * it is expected that all buffers associated with that fence
60 * radeon_fence_write - write a fence value
64 * @ring: ring index the fence is associated with
66 * Writes a fence value to memory or a scratch register (all asics).
81 * radeon_fence_read - read a fence value
84 * @ring: ring index the fence is associated with
86 * Reads a fence value from memory or a scratch register (all asics).
87 * Returns the value of the fence read from memory or register.
126 * radeon_fence_emit - emit a fence on the requested ring
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/
Dvmwgfx_fence.c55 struct vmw_fence_obj fence; member
59 * struct vmw_event_fence_action - fence action that delivers a drm event.
62 * @action: A struct vmw_fence_action to hook up to a fence.
63 * @fence: A referenced pointer to the fence to keep it alive while @action
69 * current time tv_sec val when the fence signals.
71 * be assigned the current time tv_usec val when the fence signals.
77 struct vmw_fence_obj *fence; member
85 fman_from_fence(struct vmw_fence_obj *fence) in fman_from_fence() argument
87 return container_of(fence->base.lock, struct vmw_fence_manager, lock); in fman_from_fence()
94 * a) When a new fence seqno has been submitted by the fifo code.
[all …]
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/
Dnouveau_fence.c42 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 …]
/kernel/linux/linux-6.6/drivers/gpu/drm/vmwgfx/
Dvmwgfx_fence.c52 struct vmw_fence_obj fence; member
56 * struct vmw_event_fence_action - fence action that delivers a drm event.
58 * @action: A struct vmw_fence_action to hook up to a fence.
60 * @fence: A referenced pointer to the fence to keep it alive while @action
64 * current time tv_sec val when the fence signals.
66 * be assigned the current time tv_usec val when the fence signals.
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()
105 * a) When a new fence seqno has been submitted by the fifo code.
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/
Dintel_ggtt_fencing.c30 * DOC: fence register handling
49 * dynamically associated with objects. Furthermore fence state is committed to
53 * cases the fence can be removed forcefully with i915_gem_object_put_fence().
61 static struct drm_i915_private *fence_to_i915(struct i915_fence_reg *fence) in fence_to_i915() argument
63 return fence->ggtt->vm.i915; in fence_to_i915()
66 static struct intel_uncore *fence_to_uncore(struct i915_fence_reg *fence) in fence_to_uncore() argument
68 return fence->ggtt->vm.gt->uncore; in fence_to_uncore()
71 static void i965_write_fence_reg(struct i915_fence_reg *fence) in i965_write_fence_reg() argument
77 if (INTEL_GEN(fence_to_i915(fence)) >= 6) { in i965_write_fence_reg()
78 fence_reg_lo = FENCE_REG_GEN6_LO(fence->id); in i965_write_fence_reg()
[all …]
/kernel/linux/linux-5.10/include/trace/events/
Ddma_fence.h14 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 …]
/kernel/linux/linux-6.6/include/trace/events/
Ddma_fence.h14 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 …]
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd_fence.c23 #include <linux/dma-fence.h>
35 /* Eviction Fence
36 * Fence helper functions to deal with KFD memory eviction.
40 * All the BOs in a process share an eviction fence. When process X wants
58 * user queues and signal fence. The work item will also start another delayed
65 struct amdgpu_amdkfd_fence *fence; in amdgpu_amdkfd_fence_create() local
67 fence = kzalloc(sizeof(*fence), GFP_KERNEL); in amdgpu_amdkfd_fence_create()
68 if (fence == NULL) in amdgpu_amdkfd_fence_create()
73 fence->mm = mm; in amdgpu_amdkfd_fence_create()
74 get_task_comm(fence->timeline_name, current); in amdgpu_amdkfd_fence_create()
[all …]
/kernel/linux/linux-5.10/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 …]

12345678910>>...43