Home
last modified time | relevance | path

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

12345678910>>...23

/external/mesa3d/src/gallium/drivers/nouveau/
Dnouveau_fence.c33 nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence) in nouveau_fence_new() argument
35 *fence = CALLOC_STRUCT(nouveau_fence); in nouveau_fence_new()
36 if (!*fence) in nouveau_fence_new()
39 (*fence)->screen = screen; in nouveau_fence_new()
40 (*fence)->ref = 1; in nouveau_fence_new()
41 LIST_INITHEAD(&(*fence)->work); in nouveau_fence_new()
47 nouveau_fence_trigger_work(struct nouveau_fence *fence) in nouveau_fence_trigger_work() argument
51 LIST_FOR_EACH_ENTRY_SAFE(work, tmp, &fence->work, list) { in nouveau_fence_trigger_work()
59 nouveau_fence_emit(struct nouveau_fence *fence) in nouveau_fence_emit() argument
61 struct nouveau_screen *screen = fence->screen; in nouveau_fence_emit()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i965/
Dbrw_sync.c72 struct brw_fence fence; member
76 brw_fence_init(struct brw_context *brw, struct brw_fence *fence, in brw_fence_init() argument
79 fence->brw = brw; in brw_fence_init()
80 fence->type = type; in brw_fence_init()
81 mtx_init(&fence->mutex, mtx_plain); in brw_fence_init()
85 fence->batch_bo = NULL; in brw_fence_init()
88 fence->sync_fd = -1; in brw_fence_init()
94 brw_fence_finish(struct brw_fence *fence) in brw_fence_finish() argument
96 switch (fence->type) { in brw_fence_finish()
98 if (fence->batch_bo) in brw_fence_finish()
[all …]
/external/mesa3d/src/mesa/drivers/dri/i915/
Dintel_syncobj.c58 struct intel_fence fence; member
62 intel_fence_finish(struct intel_fence *fence) in intel_fence_finish() argument
64 if (fence->batch_bo) in intel_fence_finish()
65 drm_intel_bo_unreference(fence->batch_bo); in intel_fence_finish()
69 intel_fence_insert(struct intel_context *intel, struct intel_fence *fence) in intel_fence_insert() argument
71 assert(!fence->batch_bo); in intel_fence_insert()
72 assert(!fence->signalled); in intel_fence_insert()
75 fence->batch_bo = intel->batch.bo; in intel_fence_insert()
76 drm_intel_bo_reference(fence->batch_bo); in intel_fence_insert()
81 intel_fence_has_completed_locked(struct intel_fence *fence) in intel_fence_has_completed_locked() argument
[all …]
/external/mesa3d/src/gallium/drivers/freedreno/
Dfreedreno_fence.c50 static void fence_flush(struct pipe_fence_handle *fence) in fence_flush() argument
52 if (fence->batch) in fence_flush()
53 fd_batch_flush(fence->batch, true, true); in fence_flush()
54 debug_assert(!fence->batch); in fence_flush()
57 void fd_fence_populate(struct pipe_fence_handle *fence, in fd_fence_populate() argument
60 if (!fence->batch) in fd_fence_populate()
62 fence->timestamp = timestamp; in fd_fence_populate()
63 fence->fence_fd = fence_fd; in fd_fence_populate()
64 fence->batch = NULL; in fd_fence_populate()
67 static void fd_fence_destroy(struct pipe_fence_handle *fence) in fd_fence_destroy() argument
[all …]
/external/mesa3d/src/util/
Du_queue.h72 util_queue_fence_init(struct util_queue_fence *fence) in util_queue_fence_init() argument
74 fence->val = 0; in util_queue_fence_init()
78 util_queue_fence_destroy(struct util_queue_fence *fence) in util_queue_fence_destroy() argument
80 assert(fence->val == 0); in util_queue_fence_destroy()
85 util_queue_fence_signal(struct util_queue_fence *fence) in util_queue_fence_signal() argument
87 uint32_t val = p_atomic_xchg(&fence->val, 0); in util_queue_fence_signal()
92 futex_wake(&fence->val, INT_MAX); in util_queue_fence_signal()
102 util_queue_fence_reset(struct util_queue_fence *fence) in util_queue_fence_reset() argument
105 fence->val = 1; in util_queue_fence_reset()
107 uint32_t v = p_atomic_xchg(&fence->val, 1); in util_queue_fence_reset()
[all …]
Du_queue.c99 do_futex_fence_wait(struct util_queue_fence *fence, in do_futex_fence_wait() argument
102 uint32_t v = fence->val; in do_futex_fence_wait()
109 v = p_atomic_cmpxchg(&fence->val, 1, 2); in do_futex_fence_wait()
114 int r = futex_wait(&fence->val, 2, timeout ? &ts : NULL); in do_futex_fence_wait()
120 v = fence->val; in do_futex_fence_wait()
127 _util_queue_fence_wait(struct util_queue_fence *fence) in _util_queue_fence_wait() argument
129 do_futex_fence_wait(fence, false, 0); in _util_queue_fence_wait()
133 _util_queue_fence_wait_timeout(struct util_queue_fence *fence, in _util_queue_fence_wait_timeout() argument
136 return do_futex_fence_wait(fence, true, abs_timeout); in _util_queue_fence_wait_timeout()
143 util_queue_fence_signal(struct util_queue_fence *fence) in util_queue_fence_signal() argument
[all …]
/external/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_fence.c48 struct lp_fence *fence = CALLOC_STRUCT(lp_fence); in lp_fence_create() local
50 if (!fence) in lp_fence_create()
53 pipe_reference_init(&fence->reference, 1); in lp_fence_create()
55 (void) mtx_init(&fence->mutex, mtx_plain); in lp_fence_create()
56 cnd_init(&fence->signalled); in lp_fence_create()
58 fence->id = fence_id++; in lp_fence_create()
59 fence->rank = rank; in lp_fence_create()
62 debug_printf("%s %d\n", __FUNCTION__, fence->id); in lp_fence_create()
64 return fence; in lp_fence_create()
70 lp_fence_destroy(struct lp_fence *fence) in lp_fence_destroy() argument
[all …]
/external/mesa3d/src/gallium/winsys/svga/drm/
Dvmw_fence.c106 struct vmw_fence *fence, *n; in vmw_fences_release() local
109 LIST_FOR_EACH_ENTRY_SAFE(fence, n, &ops->not_signaled, ops_list) in vmw_fences_release()
110 LIST_DELINIT(&fence->ops_list); in vmw_fences_release()
131 struct vmw_fence *fence, *n; in vmw_fences_signal() local
148 LIST_FOR_EACH_ENTRY_SAFE(fence, n, &ops->not_signaled, ops_list) { in vmw_fences_signal()
149 if (!vmw_fence_seq_is_signaled(fence->seqno, signaled, emitted)) in vmw_fences_signal()
152 p_atomic_set(&fence->signalled, 1); in vmw_fences_signal()
153 LIST_DELINIT(&fence->ops_list); in vmw_fences_signal()
170 vmw_fence(struct pipe_fence_handle *fence) in vmw_fence() argument
172 return (struct vmw_fence *) fence; in vmw_fence()
[all …]
/external/mesa3d/src/gallium/drivers/etnaviv/
Detnaviv_fence.c46 etna_fence_destroy(struct pipe_fence_handle *fence) in etna_fence_destroy() argument
48 if (fence->fence_fd != -1) in etna_fence_destroy()
49 close(fence->fence_fd); in etna_fence_destroy()
50 FREE(fence); in etna_fence_destroy()
56 struct pipe_fence_handle *fence) in etna_screen_fence_reference() argument
58 if (pipe_reference(&(*ptr)->reference, &fence->reference)) in etna_screen_fence_reference()
61 *ptr = fence; in etna_screen_fence_reference()
66 struct pipe_fence_handle *fence, uint64_t timeout) in etna_screen_fence_finish() argument
68 if (fence->fence_fd != -1) in etna_screen_fence_finish()
69 return !sync_wait(fence->fence_fd, timeout / 1000000); in etna_screen_fence_finish()
[all …]
/external/mesa3d/src/gallium/state_trackers/dri/
Ddri_helpers.c94 struct dri2_fence *fence = CALLOC_STRUCT(dri2_fence); in dri2_create_fence() local
96 if (!fence) in dri2_create_fence()
99 stapi->flush(stapi, 0, &fence->pipe_fence); in dri2_create_fence()
101 if (!fence->pipe_fence) { in dri2_create_fence()
102 FREE(fence); in dri2_create_fence()
106 fence->driscreen = dri_screen(_ctx->driScreenPriv); in dri2_create_fence()
107 return fence; in dri2_create_fence()
115 struct dri2_fence *fence = CALLOC_STRUCT(dri2_fence); in dri2_create_fence_fd() local
119 stapi->flush(stapi, ST_FLUSH_FENCE_FD, &fence->pipe_fence); in dri2_create_fence_fd()
122 ctx->create_fence_fd(ctx, &fence->pipe_fence, fd); in dri2_create_fence_fd()
[all …]
/external/mesa3d/src/gallium/drivers/swr/
Dswr_fence.cpp43 struct swr_fence *fence = (struct swr_fence *)userData; in swr_fence_cb() local
46 swr_fence_do_work(fence); in swr_fence_cb()
49 fence->read = userData2; in swr_fence_cb()
58 struct swr_fence *fence = swr_fence(fh); in swr_fence_submit() local
60 fence->write++; in swr_fence_submit()
61 fence->pending = TRUE; in swr_fence_submit()
62 ctx->api.pfnSwrSync(ctx->swrContext, swr_fence_cb, (uint64_t)fence, fence->write, 0); in swr_fence_submit()
72 struct swr_fence *fence = CALLOC_STRUCT(swr_fence); in swr_fence_create() local
73 if (!fence) in swr_fence_create()
76 pipe_reference_init(&fence->reference, 1); in swr_fence_create()
[all …]
Dswr_fence_work.cpp34 swr_fence_do_work(struct swr_fence *fence) in swr_fence_do_work() argument
38 if (fence->work.head.next) { in swr_fence_do_work()
39 work = fence->work.head.next; in swr_fence_do_work()
42 p_atomic_set(&fence->work.head.next, 0); in swr_fence_do_work()
43 p_atomic_set(&fence->work.tail, &fence->work.head); in swr_fence_do_work()
44 p_atomic_set(&fence->work.count, 0); in swr_fence_do_work()
70 struct swr_fence *fence = swr_fence(fh); in swr_add_fence_work() local
71 p_atomic_set(&fence->work.tail->next, work); in swr_add_fence_work()
72 p_atomic_set(&fence->work.tail, work); in swr_add_fence_work()
73 p_atomic_inc(&fence->work.count); in swr_add_fence_work()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/InstCombine/
Dconsecutive-fences.ll6 ; CHECK-NEXT: fence seq_cst
7 ; CHECK-NEXT: fence syncscope("singlethread") acquire
12 fence seq_cst
13 fence seq_cst
14 fence seq_cst
15 fence syncscope("singlethread") acquire
16 fence syncscope("singlethread") acquire
17 fence syncscope("singlethread") acquire
22 ; CHECK-NEXT: fence seq_cst
23 ; CHECK-NEXT: fence syncscope("singlethread") seq_cst
[all …]
/external/linux-kselftest/tools/testing/selftests/sync/
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 …]
/external/deqp/external/vulkancts/modules/vulkan/synchronization/
DvktSynchronizationBasicFenceTests.cpp60 const Unique<VkFence> fence (createFence(vk, device, &fenceInfo)); in basicOneFenceCase() local
75 if (VK_NOT_READY != vk.getFenceStatus(device, *fence)) in basicOneFenceCase()
78 if (VK_TIMEOUT != vk.waitForFences(device, 1u, &fence.get(), VK_TRUE, SHORT_FENCE_WAIT)) in basicOneFenceCase()
81 if (VK_NOT_READY != vk.getFenceStatus(device, *fence)) in basicOneFenceCase()
87 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence)); in basicOneFenceCase()
89 if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, LONG_FENCE_WAIT)) in basicOneFenceCase()
92 if (VK_SUCCESS != vk.getFenceStatus(device, *fence)) in basicOneFenceCase()
95 if (VK_SUCCESS != vk.resetFences(device, 1u, &fence.get())) in basicOneFenceCase()
98 if (VK_NOT_READY != vk.getFenceStatus(device, *fence)) in basicOneFenceCase()
132 const VkFence fence[2] = in basicMultiFenceCase() local
[all …]
/external/mesa3d/src/mesa/state_tracker/
Dst_cb_syncobj.c43 struct pipe_fence_handle *fence; member
62 screen->fence_reference(screen, &so->fence, NULL); in st_delete_sync_object()
75 assert(so->fence == NULL); in st_fence_sync()
77 pipe->flush(pipe, &so->fence, PIPE_FLUSH_DEFERRED); in st_fence_sync()
87 struct pipe_fence_handle *fence = NULL; in st_client_wait_sync() local
91 if (!so->fence) { in st_client_wait_sync()
100 screen->fence_reference(screen, &fence, so->fence); in st_client_wait_sync()
115 if (screen->fence_finish(screen, pipe, fence, timeout)) { in st_client_wait_sync()
117 screen->fence_reference(screen, &so->fence, NULL); in st_client_wait_sync()
121 screen->fence_reference(screen, &fence, NULL); in st_client_wait_sync()
[all …]
/external/mesa3d/src/intel/vulkan/
Danv_queue.c118 VkFence fence) in anv_QueueSubmit() argument
161 if (fence && submitCount == 0) { in anv_QueueSubmit()
167 result = anv_cmd_buffer_execbuf(device, NULL, NULL, 0, NULL, 0, fence); in anv_QueueSubmit()
173 VkFence submit_fence = (i == submitCount - 1) ? fence : VK_NULL_HANDLE; in anv_QueueSubmit()
268 struct anv_fence *fence; in anv_CreateFence() local
272 fence = vk_zalloc2(&device->alloc, pAllocator, sizeof(*fence), 8, in anv_CreateFence()
274 if (fence == NULL) in anv_CreateFence()
278 fence->permanent.type = ANV_FENCE_TYPE_SYNCOBJ; in anv_CreateFence()
284 fence->permanent.syncobj = anv_gem_syncobj_create(device, create_flags); in anv_CreateFence()
285 if (!fence->permanent.syncobj) in anv_CreateFence()
[all …]
/external/mesa3d/src/gallium/drivers/radeonsi/
Dsi_fence.c57 struct pipe_fence_handle *fence) in si_add_fence_dependency() argument
62 ws->cs_add_fence_dependency(rctx->dma.cs, fence); in si_add_fence_dependency()
63 ws->cs_add_fence_dependency(rctx->gfx.cs, fence); in si_add_fence_dependency()
86 struct si_multi_fence *fence = CALLOC_STRUCT(si_multi_fence); in si_create_multi_fence() local
87 if (!fence) in si_create_multi_fence()
90 pipe_reference_init(&fence->reference, 1); in si_create_multi_fence()
91 util_queue_fence_init(&fence->ready); in si_create_multi_fence()
93 return fence; in si_create_multi_fence()
99 struct si_multi_fence *fence = si_create_multi_fence(); in si_create_fence() local
100 if (!fence) in si_create_fence()
[all …]
/external/mesa3d/src/gallium/winsys/amdgpu/drm/
Damdgpu_cs.c44 struct amdgpu_fence *fence = CALLOC_STRUCT(amdgpu_fence); in amdgpu_fence_create() local
46 fence->reference.count = 1; in amdgpu_fence_create()
47 fence->ws = ctx->ws; in amdgpu_fence_create()
48 fence->ctx = ctx; in amdgpu_fence_create()
49 fence->fence.context = ctx->ctx; in amdgpu_fence_create()
50 fence->fence.ip_type = ip_type; in amdgpu_fence_create()
51 fence->fence.ip_instance = ip_instance; in amdgpu_fence_create()
52 fence->fence.ring = ring; in amdgpu_fence_create()
53 util_queue_fence_init(&fence->submitted); in amdgpu_fence_create()
54 util_queue_fence_reset(&fence->submitted); in amdgpu_fence_create()
[all …]
/external/mesa3d/src/gallium/winsys/i915/drm/
Di915_drm_fence.c23 struct i915_drm_fence *fence = CALLOC_STRUCT(i915_drm_fence); in i915_drm_fence_create() local
25 pipe_reference_init(&fence->reference, 1); in i915_drm_fence_create()
29 fence->bo = bo; in i915_drm_fence_create()
32 return (struct pipe_fence_handle *)fence; in i915_drm_fence_create()
38 struct pipe_fence_handle *fence) in i915_drm_fence_reference() argument
41 struct i915_drm_fence *f = (struct i915_drm_fence *)fence; in i915_drm_fence_reference()
48 *ptr = fence; in i915_drm_fence_reference()
53 struct pipe_fence_handle *fence) in i915_drm_fence_signalled() argument
55 struct i915_drm_fence *f = (struct i915_drm_fence *)fence; in i915_drm_fence_signalled()
66 struct pipe_fence_handle *fence) in i915_drm_fence_finish() argument
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/NewGVN/
Dfence.ll5 ; We can value forward across the fence since we can (semantically)
6 ; reorder the following load before the fence.
10 ; CHECK: fence
14 fence release
22 ; CHECK-NEXT: fence
26 fence release
34 ; followed by a release fence. This is not so much enforcing an
41 ; CHECK: fence
46 ; do { fence acquire: tmp = *%addr.i; ) while (!tmp);
49 fence acquire
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/GVN/
Dfence.ll4 ; We can value forward across the fence since we can (semantically)
5 ; reorder the following load before the fence.
9 ; CHECK: fence
13 fence release
22 ; CHECK-NEXT: fence
27 fence release
35 ; followed by a release fence. This is not so much enforcing an
42 ; CHECK: fence
47 ; do { fence acquire: tmp = *%addr.i; ) while (!tmp);
50 fence acquire
[all …]
/external/mesa3d/src/gallium/drivers/r300/
Dr300_flush.c38 struct pipe_fence_handle **fence) in r300_flush_and_cleanup() argument
56 r300->rws->cs_flush(r300->cs, flags, fence); in r300_flush_and_cleanup()
77 struct pipe_fence_handle **fence) in r300_flush() argument
82 r300_flush_and_cleanup(r300, flags, fence); in r300_flush()
84 if (fence) { in r300_flush()
89 r300->rws->cs_flush(r300->cs, flags, fence); in r300_flush()
115 if (fence && *fence) in r300_flush()
116 r300->rws->fence_reference(fence, NULL); in r300_flush()
117 r300_flush_and_cleanup(r300, flags, fence); in r300_flush()
129 struct pipe_fence_handle **fence, in r300_flush_wrapped() argument
[all …]
/external/llvm/test/Transforms/EarlyCSE/
Dfence.ll9 ; We can value forward across the fence since we can (semantically)
10 ; reorder the following load before the fence.
14 ; CHECK: fence
18 fence release
27 ; CHECK: fence
31 fence release
39 ; followed by a release fence. If this thread observed the release
41 ; fence. Note that it would be legal to reorder '%a' after the fence
47 ; CHECK: fence
52 fence acquire
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/EarlyCSE/
Dfence.ll10 ; We can value forward across the fence since we can (semantically)
11 ; reorder the following load before the fence.
15 ; CHECK: fence
19 fence release
28 ; CHECK: fence
32 fence release
40 ; followed by a release fence. If this thread observed the release
42 ; fence. Note that it would be legal to reorder '%a' after the fence
48 ; CHECK: fence
53 fence acquire
[all …]

12345678910>>...23