Home
last modified time | relevance | path

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

12345678

/linux/drivers/gpu/drm/i915/
H A Di915_sw_fence.c49 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 __maybe_unused 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 …]
H A Di915_sw_fence.h42 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 …]
H A 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()
178 int i915_sw_fence_await_active(struct i915_sw_fence *fence,
222 struct dma_fence *fence; in __i915_request_await_exclusive() local
[all …]
H A Di915_deps.c75 static int i915_deps_grow(struct i915_deps *deps, struct dma_fence *fence, in i915_deps_grow() argument
96 deps->fences[deps->num_deps++] = dma_fence_get(fence); in i915_deps_grow()
100 if (ctx->no_wait_gpu && !dma_fence_is_signaled(fence)) { in i915_deps_grow()
105 ret = dma_fence_wait(fence, ctx->interruptible); in i915_deps_grow()
109 ret = fence->error; in i915_deps_grow()
177 struct dma_fence *fence, in i915_deps_add_dependency() argument
183 if (!fence) in i915_deps_add_dependency()
186 if (dma_fence_is_signaled(fence)) { in i915_deps_add_dependency()
187 ret = fence->error; in i915_deps_add_dependency()
196 if (!entry->context || entry->context != fence->context) in i915_deps_add_dependency()
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_fence.c23 struct vmw_fence_obj fence; member
48 fman_from_fence(struct vmw_fence_obj *fence) in fman_from_fence() argument
50 return container_of(fence->base.extern_lock, struct vmw_fence_manager, in fman_from_fence()
56 struct vmw_fence_obj *fence = in vmw_fence_obj_destroy() local
58 struct vmw_fence_manager *fman = fman_from_fence(fence); in vmw_fence_obj_destroy()
60 if (!list_empty(&fence->head)) { in vmw_fence_obj_destroy()
73 list_del_init(&fence->head); in vmw_fence_obj_destroy()
74 if (fence->waiter_added) in vmw_fence_obj_destroy()
78 fence->destroy(fence); in vmw_fence_obj_destroy()
101 struct vmw_fence_obj *fence = in vmw_fence_enable_signaling() local
[all …]
/linux/drivers/gpu/drm/i915/selftests/
H A 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->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 …]
H A Dlib_sw_fence.h16 #define onstack_fence_init(fence) \ argument
20 __onstack_fence_init((fence), #fence, &__key); \
23 #define onstack_fence_init(fence) \ argument
24 __onstack_fence_init((fence), NULL, NULL)
27 void __onstack_fence_init(struct i915_sw_fence *fence,
30 void onstack_fence_fini(struct i915_sw_fence *fence);
33 struct i915_sw_fence fence; member
41 void heap_fence_put(struct i915_sw_fence *fence);
/linux/drivers/gpu/drm/vgem/
H A 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 timer_delete_sync(&fence->timer); in vgem_fence_release()
53 dma_fence_free(&fence->base); in vgem_fence_release()
64 struct vgem_fence *fence = timer_container_of(fence, t, timer); in vgem_fence_timeout() local
66 dma_fence_signal(&fence->base); in vgem_fence_timeout()
72 struct vgem_fence *fence; in vgem_fence_create() local
74 fence = kzalloc_obj(*fence); in vgem_fence_create()
75 if (!fence) in vgem_fence_create()
[all …]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_fence.c134 struct radeon_fence **fence, in radeon_fence_emit() argument
140 *fence = kmalloc_obj(struct radeon_fence); in radeon_fence_emit()
141 if ((*fence) == NULL) in radeon_fence_emit()
144 (*fence)->rdev = rdev; in radeon_fence_emit()
145 (*fence)->seq = seq = ++rdev->fence_drv[ring].sync_seq[ring]; in radeon_fence_emit()
146 (*fence)->ring = ring; in radeon_fence_emit()
147 (*fence)->is_vm_update = false; in radeon_fence_emit()
148 dma_fence_init(&(*fence)->base, &radeon_fence_ops, in radeon_fence_emit()
152 radeon_fence_ring_emit(rdev, ring, *fence); in radeon_fence_emit()
153 trace_radeon_fence_emit(rdev_to_drm(rdev), ring, (*fence)->seq); in radeon_fence_emit()
[all …]
H A 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()
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/drivers/dma-buf/
H A Dsync_file.c65 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
142 driver = dma_fence_driver_name(fence); in sync_file_get_name()
143 timeline = dma_fence_timeline_name(fence); in sync_file_get_name()
147 fence->context, in sync_file_get_name()
148 fence->seqno); in sync_file_get_name()
[all …]
/linux/tools/testing/selftests/sync/
H A Dsync_stress_consumer.c40 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 …]
H A Dsync_alloc.c46 int timeline, fence, valid; in test_alloc_fence() local
52 fence = sw_sync_fence_create(timeline, "allocFence", 1); in test_alloc_fence()
53 valid = sw_sync_fence_is_valid(fence); in test_alloc_fence()
56 sw_sync_fence_destroy(fence); in test_alloc_fence()
63 int fence, timeline; in test_alloc_fence_negative() local
68 fence = sw_sync_fence_create(-1, "fence", 1); in test_alloc_fence_negative()
69 ASSERT(fence < 0, "Success allocating negative fence\n"); in test_alloc_fence_negative()
71 sw_sync_fence_destroy(fence); in test_alloc_fence_negative()
H A Dsync_stress_merge.c43 int fence, tmpfence, merged, valid; in test_merge_stress_random_merge() local
51 fence = sw_sync_fence_create(timelines[0], "fence", 0); in test_merge_stress_random_merge()
52 valid = sw_sync_fence_is_valid(fence); in test_merge_stress_random_merge()
76 merged = sync_merge("merge", tmpfence, fence); in test_merge_stress_random_merge()
78 sw_sync_fence_destroy(fence); in test_merge_stress_random_merge()
79 fence = merged; in test_merge_stress_random_merge()
91 ASSERT(sync_fence_size(fence) == size, in test_merge_stress_random_merge()
97 ret = sync_wait(fence, 0); in test_merge_stress_random_merge()
106 ret = sync_wait(fence, 0); in test_merge_stress_random_merge()
109 sw_sync_fence_destroy(fence); in test_merge_stress_random_merge()
H A Dsync_merge.c34 int fence, valid, merged; in test_fence_merge_same_fence() local
40 fence = sw_sync_fence_create(timeline, "allocFence", 5); in test_fence_merge_same_fence()
41 valid = sw_sync_fence_is_valid(fence); in test_fence_merge_same_fence()
44 merged = sync_merge("mergeFence", fence, fence); in test_fence_merge_same_fence()
45 valid = sw_sync_fence_is_valid(fence); in test_fence_merge_same_fence()
56 sw_sync_fence_destroy(fence); in test_fence_merge_same_fence()
H A Dsync_fence.c34 int fence, valid, ret; in test_fence_one_timeline_wait() local
40 fence = sw_sync_fence_create(timeline, "allocFence", 5); in test_fence_one_timeline_wait()
41 valid = sw_sync_fence_is_valid(fence); in test_fence_one_timeline_wait()
45 ret = sync_wait(fence, 0); in test_fence_one_timeline_wait()
53 ret = sync_wait(fence, 0); in test_fence_one_timeline_wait()
61 ret = sync_wait(fence, 0); in test_fence_one_timeline_wait()
67 ret = sync_wait(fence, 0); in test_fence_one_timeline_wait()
70 sw_sync_fence_destroy(fence); in test_fence_one_timeline_wait()
/linux/drivers/gpu/drm/virtio/
H A Dvirtgpu_fence.c64 struct virtio_gpu_fence *fence = kzalloc_obj(struct virtio_gpu_fence); in virtio_gpu_fence_alloc() local
66 if (!fence) in virtio_gpu_fence_alloc()
67 return fence; in virtio_gpu_fence_alloc()
69 fence->drv = drv; in virtio_gpu_fence_alloc()
70 fence->ring_idx = ring_idx; in virtio_gpu_fence_alloc()
71 fence->emit_fence_info = !(base_fence_ctx == drv->context); in virtio_gpu_fence_alloc()
78 dma_fence_init(&fence->f, &virtio_gpu_fence_ops, &drv->lock, in virtio_gpu_fence_alloc()
81 return fence; in virtio_gpu_fence_alloc()
86 struct virtio_gpu_fence *fence) in virtio_gpu_fence_emit() argument
92 fence->fence_id = fence->f.seqno = ++drv->current_fence_id; in virtio_gpu_fence_emit()
[all …]
/linux/drivers/gpu/drm/msm/
H A Dmsm_fence.c82 bool msm_fence_completed(struct msm_fence_context *fctx, uint32_t fence) in msm_fence_completed() argument
88 return (int32_t)(fctx->completed_fence - fence) >= 0 || in msm_fence_completed()
89 (int32_t)(*fctx->fenceptr - fence) >= 0; in msm_fence_completed()
93 void msm_update_fence(struct msm_fence_context *fctx, uint32_t fence) in msm_update_fence() argument
98 if (fence_after(fence, fctx->completed_fence)) in msm_update_fence()
99 fctx->completed_fence = fence; in msm_update_fence()
110 static inline struct msm_fence *to_msm_fence(struct dma_fence *fence) in to_msm_fence() argument
112 return container_of(fence, struct msm_fence, base); in to_msm_fence()
115 static const char *msm_fence_get_driver_name(struct dma_fence *fence) in msm_fence_get_driver_name() argument
120 static const char *msm_fence_get_timeline_name(struct dma_fence *fence) in msm_fence_get_timeline_name() argument
[all …]
/linux/tools/memory-model/
H A Dlinux-kernel.cat53 * smp_mb__after_unlock_lock() fence only affects a single lock handover.
58 * to the CPU that executes the fence. Therefore, all those stores are
59 * also affected by the fence.
65 let strong-fence = mb | gp
67 let nonrw-fence = strong-fence | po-rel | acq-po
68 let fence = nonrw-fence | wmb | rmb
95 let ppo = to-r | to-w | (fence & int) | (po-unlock-lock-po & int)
100 let cumul-fence
[all...]
/linux/drivers/gpu/drm/nouveau/
H A Dnv84_fence.c86 nv84_fence_emit(struct nouveau_fence *fence) in nv84_fence_emit() argument
88 struct nouveau_channel *chan = fence->channel; in nv84_fence_emit()
89 struct nv84_fence_chan *fctx = chan->fence; in nv84_fence_emit()
92 return fctx->base.emit32(chan, addr, fence->base.seqno); in nv84_fence_emit()
96 nv84_fence_sync(struct nouveau_fence *fence, in nv84_fence_sync() argument
99 struct nv84_fence_chan *fctx = chan->fence; in nv84_fence_sync()
102 return fctx->base.sync32(chan, addr, fence->base.seqno); in nv84_fence_sync()
108 struct nv84_fence_priv *priv = chan->cli->drm->fence; in nv84_fence_read()
115 struct nv84_fence_priv *priv = chan->cli->drm->fence; in nv84_fence_context_del()
116 struct nv84_fence_chan *fctx = chan->fence; in nv84_fence_context_del()
[all …]
H A Dnv10_fence.c33 nv10_fence_emit(struct nouveau_fence *fence) in nv10_fence_emit() argument
35 struct nvif_push *push = &fence->channel->chan.push; in nv10_fence_emit()
38 PUSH_MTHD(push, NV06E, SET_REFERENCE, fence->base.seqno); in nv10_fence_emit()
46 nv10_fence_sync(struct nouveau_fence *fence, in nv10_fence_sync() argument
61 struct nv10_fence_chan *fctx = chan->fence; in nv10_fence_context_del()
64 chan->fence = NULL; in nv10_fence_context_del()
73 fctx = chan->fence = kzalloc_obj(*fctx); in nv10_fence_context_new()
87 struct nv10_fence_priv *priv = drm->fence; in nv10_fence_destroy()
90 drm->fence = NULL; in nv10_fence_destroy()
99 priv = drm->fence = kzalloc_obj(*priv); in nv10_fence_create()
H A Dnv04_fence.c40 nv04_fence_emit(struct nouveau_fence *fence) in nv04_fence_emit() argument
42 struct nvif_push *push = &unrcu_pointer(fence->channel)->chan.push; in nv04_fence_emit()
45 PUSH_NVSQ(push, NV_SW, 0x0150, fence->base.seqno); in nv04_fence_emit()
52 nv04_fence_sync(struct nouveau_fence *fence, in nv04_fence_sync() argument
70 struct nv04_fence_chan *fctx = chan->fence; in nv04_fence_context_del()
72 chan->fence = NULL; in nv04_fence_context_del()
85 chan->fence = fctx; in nv04_fence_context_new()
94 struct nv04_fence_priv *priv = drm->fence; in nv04_fence_destroy()
95 drm->fence = NULL; in nv04_fence_destroy()
104 priv = drm->fence = kzalloc_obj(*priv); in nv04_fence_create()
/linux/include/drm/
H A Ddrm_syncobj.h51 struct dma_fence __rcu *fence; member
109 struct dma_fence *fence; in drm_syncobj_fence_get() local
112 fence = dma_fence_get_rcu_safe(&syncobj->fence); in drm_syncobj_fence_get()
115 return fence; in drm_syncobj_fence_get()
122 struct dma_fence *fence,
125 struct dma_fence *fence);
128 struct dma_fence **fence);
131 struct dma_fence *fence);
/linux/drivers/gpu/host1x/
H A Dfence.c128 struct host1x_syncpt_fence *fence; in host1x_fence_create() local
130 fence = kzalloc_obj(*fence); in host1x_fence_create()
131 if (!fence) in host1x_fence_create()
134 fence->sp = sp; in host1x_fence_create()
135 fence->threshold = threshold; in host1x_fence_create()
136 fence->timeout = timeout; in host1x_fence_create()
138 dma_fence_init(&fence->base, &host1x_syncpt_fence_ops, &sp->fences.lock, in host1x_fence_create()
141 INIT_DELAYED_WORK(&fence->timeout_work, do_fence_timeout); in host1x_fence_create()
143 return &fence->base; in host1x_fence_create()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_cs.c432 struct dma_fence *fence; in amdgpu_cs_p2_dependencies() local
446 fence = amdgpu_ctx_get_fence(ctx, entity, deps[i].handle); in amdgpu_cs_p2_dependencies()
449 if (IS_ERR(fence)) in amdgpu_cs_p2_dependencies()
450 return PTR_ERR(fence); in amdgpu_cs_p2_dependencies()
451 else if (!fence) in amdgpu_cs_p2_dependencies()
456 struct dma_fence *old = fence; in amdgpu_cs_p2_dependencies()
458 s_fence = to_drm_sched_fence(fence); in amdgpu_cs_p2_dependencies()
459 fence = dma_fence_get(&s_fence->scheduled); in amdgpu_cs_p2_dependencies()
463 r = amdgpu_sync_fence(&p->sync, fence, GFP_KERNEL); in amdgpu_cs_p2_dependencies()
464 dma_fence_put(fence); in amdgpu_cs_p2_dependencies()
[all …]

12345678