Home
last modified time | relevance | path

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

1234567891011

/hardware/google/gfxstream/guest/mesa/src/util/
Du_queue.h74 util_queue_fence_init(struct util_queue_fence *fence) in util_queue_fence_init() argument
76 fence->val = 0; in util_queue_fence_init()
80 util_queue_fence_destroy(struct util_queue_fence *fence) in util_queue_fence_destroy() argument
82 assert(p_atomic_read_relaxed(&fence->val) == 0); in util_queue_fence_destroy()
87 util_queue_fence_signal(struct util_queue_fence *fence) in util_queue_fence_signal() argument
89 uint32_t val = p_atomic_xchg(&fence->val, 0); in util_queue_fence_signal()
94 futex_wake(&fence->val, INT_MAX); in util_queue_fence_signal()
104 util_queue_fence_reset(struct util_queue_fence *fence) in util_queue_fence_reset() argument
107 fence->val = 1; in util_queue_fence_reset()
109 uint32_t v = p_atomic_xchg(&fence->val, 1); in util_queue_fence_reset()
[all …]
Du_queue.c115 do_futex_fence_wait(struct util_queue_fence *fence, in do_futex_fence_wait() argument
118 uint32_t v = p_atomic_read_relaxed(&fence->val); in do_futex_fence_wait()
125 v = p_atomic_cmpxchg(&fence->val, 1, 2); in do_futex_fence_wait()
130 int r = futex_wait(&fence->val, 2, timeout ? &ts : NULL); in do_futex_fence_wait()
136 v = p_atomic_read_relaxed(&fence->val); in do_futex_fence_wait()
143 _util_queue_fence_wait(struct util_queue_fence *fence) in _util_queue_fence_wait() argument
145 do_futex_fence_wait(fence, false, 0); in _util_queue_fence_wait()
149 _util_queue_fence_wait_timeout(struct util_queue_fence *fence, in _util_queue_fence_wait_timeout() argument
152 return do_futex_fence_wait(fence, true, abs_timeout); in _util_queue_fence_wait_timeout()
159 util_queue_fence_signal(struct util_queue_fence *fence) in util_queue_fence_signal() argument
[all …]
/hardware/qcom/sm7250/display/sdm/libs/utils/
Dfence.cpp70 shared_ptr<Fence> fence(new Fence(fd, name)); in Create() local
71 if (!fence) { in Create()
77 return fence; in Create()
80 int Fence::Dup(const shared_ptr<Fence> &fence) { in Dup() argument
81 return (fence ? dup(fence->fd_) : -1); in Dup()
84 int Fence::Get(const shared_ptr<Fence> &fence) { in Get() argument
85 return (fence ? fence->fd_ : -1); in Get()
106 for (auto &fence : fences) { in Merge() local
107 if (ignore_signaled && (Fence::Wait(fence, 0) == kErrorNone)) { in Merge()
111 merged_fence = Fence::Merge(fence, merged_fence); in Merge()
[all …]
/hardware/google/gfxstream/guest/mesa/src/vulkan/runtime/
Dvk_fence.c103 struct vk_fence *fence; in vk_fence_create() local
127 fence = vk_object_zalloc(device, pAllocator, size, VK_OBJECT_TYPE_FENCE); in vk_fence_create()
128 if (fence == NULL) in vk_fence_create()
136 VkResult result = vk_sync_init(device, &fence->permanent, in vk_fence_create()
139 vk_object_free(device, pAllocator, fence); in vk_fence_create()
143 *fence_out = fence; in vk_fence_create()
155 struct vk_fence *fence = NULL; in vk_common_CreateFence() local
157 VkResult result = vk_fence_create(device, pCreateInfo, pAllocator, &fence); in vk_common_CreateFence()
161 *pFence = vk_fence_to_handle(fence); in vk_common_CreateFence()
168 struct vk_fence *fence) in vk_fence_reset_temporary() argument
[all …]
Dvk_fence.h66 struct vk_fence *fence,
70 struct vk_fence *fence);
73 vk_fence_get_active_sync(struct vk_fence *fence) in vk_fence_get_active_sync() argument
75 return fence->temporary ? fence->temporary : &fence->permanent; in vk_fence_get_active_sync()
/hardware/qcom/sm7250/display/sdm/include/utils/
Dfence.h60 int Get(const shared_ptr<Fence> &fence);
77 static int Dup(const shared_ptr<Fence> &fence);
85 static DisplayError Wait(const shared_ptr<Fence> &fence);
86 static DisplayError Wait(const shared_ptr<Fence> &fence, int timeout);
89 static Status GetStatus(const shared_ptr<Fence> &fence);
91 static string GetStr(const shared_ptr<Fence> &fence);
98 Fence(const Fence &fence) = delete;
99 Fence& operator=(const Fence &fence) = delete;
100 Fence(Fence &&fence) = delete;
101 Fence& operator=(Fence &&fence) = delete;
[all …]
/hardware/google/gfxstream/host/vulkan/
DVkDecoderGlobalState_unittest.cpp36 MOCK_METHOD(VkResult, vkGetFenceStatus, (VkDevice device, VkFence fence), ());
39 (VkDevice device, uint32_t numFences, const VkFence* fence),
73 VkFence fence = reinterpret_cast<VkFence>(0x1234'0000); in TEST_F() local
79 mPool.add(fence); in TEST_F()
82 ASSERT_EQ(fence, reusedFence); in TEST_F()
92 VkFence fence = reinterpret_cast<VkFence>(0x1234'0000); in TEST_F() local
98 mPool.add(fence); in TEST_F()
101 ASSERT_EQ(fence, reusedFence); in TEST_F()
111 VkFence fence = reinterpret_cast<VkFence>(0x1234'0000); in TEST_F() local
117 mPool.add(fence); in TEST_F()
[all …]
DDeviceOpTracker.cpp42 void DeviceOpTracker::AddPendingGarbage(DeviceOpWaitable waitable, VkFence fence) { in AddPendingGarbage() argument
47 .obj = fence, in AddPendingGarbage()
178 VkFence fence = VK_NULL_HANDLE; in CreateFenceForOp() local
180 nullptr, &fence); in CreateFenceForOp()
182 mCreatedFence = fence; in CreateFenceForOp()
187 return fence; in CreateFenceForOp()
190 DeviceOpWaitable DeviceOpBuilder::OnQueueSubmittedWithFence(VkFence fence) { in OnQueueSubmittedWithFence() argument
191 if (mCreatedFence.has_value() && fence != mCreatedFence) { in OnQueueSubmittedWithFence()
196 mSubmittedFence = fence; in OnQueueSubmittedWithFence()
204 deviceDispatch = mTracker.mDeviceDispatch, fence, in OnQueueSubmittedWithFence()
[all …]
DVkDecoderSnapshotUtils.cpp148 VkFence fence; in saveImageContent() local
149 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in saveImageContent()
263 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in saveImageContent()
265 dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in saveImageContent()
266 _RUN_AND_CHECK(dispatch->vkResetFences(stateBlock->device, 1, &fence)); in saveImageContent()
273 dispatch->vkDestroyFence(stateBlock->device, fence, nullptr); in saveImageContent()
299 VkFence fence; in loadImageContent() local
300 _RUN_AND_CHECK(dispatch->vkCreateFence(stateBlock->device, &fenceCreateInfo, nullptr, &fence)); in loadImageContent()
340 _RUN_AND_CHECK(dispatch->vkQueueSubmit(stateBlock->queue, 1, &submitInfo, fence)); in loadImageContent()
342 dispatch->vkWaitForFences(stateBlock->device, 1, &fence, VK_TRUE, 3000000000L)); in loadImageContent()
[all …]
DVkAndroidNativeBuffer.cpp59 VkFence fence = VK_NULL_HANDLE; in getFenceFromPool() local
66 mVk->vkCreateFence(mDevice, &fenceCreateInfo, nullptr, &fence); in getFenceFromPool()
67 VK_ANB_DEBUG("no fences in pool, created %p", fence); in getFenceFromPool()
69 fence = mAvailableFences.back(); in getFenceFromPool()
71 VkResult res = mVk->vkResetFences(mDevice, 1, &fence); in getFenceFromPool()
76 VK_ANB_DEBUG("existing fence in pool: %p. also reset the fence", fence); in getFenceFromPool()
78 mUsedFences.emplace(fence); in getFenceFromPool()
80 return fence; in getFenceFromPool()
90 for (auto fence : mAvailableFences) { in ~QsriWaitFencePool() local
91 VK_ANB_DEBUG("destroy fence %p", fence); in ~QsriWaitFencePool()
[all …]
DVkDecoderInternalStructs.h57 void add(VkFence fence) { in add() argument
59 mPool.push_back(fence); in add()
67 VkFence fence = VK_NULL_HANDLE; in pop() local
70 auto it = std::find_if(mPool.begin(), mPool.end(), [this](const VkFence& fence) { in pop()
71 VkResult status = m_vk->vkGetFenceStatus(mDevice, fence); in pop()
86 fence = *it; in pop()
91 VK_CHECK(m_vk->vkResetFences(mDevice, 1, &fence)); in pop()
94 return fence; in pop()
/hardware/google/gfxstream/guest/android/
DANativeWindowEmulated.cpp28 .fence = -1, in EmulatedANativeWindow()
43 int EmulatedANativeWindow::queueBuffer(EGLClientBuffer buffer, int fence) { in queueBuffer() argument
48 .fence = fence, in queueBuffer()
54 int EmulatedANativeWindow::dequeueBuffer(EGLClientBuffer* buffer, int* fence) { in dequeueBuffer() argument
59 *fence = queuedAhb.fence; in dequeueBuffer()
68 .fence = -1, in cancelBuffer()
156 int fence) { in queueBuffer() argument
158 return anw->queueBuffer(buffer, fence); in queueBuffer()
162 int* fence) { in dequeueBuffer() argument
164 return anw->dequeueBuffer(buffer, fence); in dequeueBuffer()
DANativeWindowEmulated.h40 int queueBuffer(EGLClientBuffer buffer, int fence);
41 int dequeueBuffer(EGLClientBuffer* buffer, int* fence);
56 int fence = -1; member
85 int queueBuffer(EGLNativeWindowType window, EGLClientBuffer buffer, int fence) override;
86 int dequeueBuffer(EGLNativeWindowType window, EGLClientBuffer* buffer, int* fence) override;
DANativeWindowAndroid.cpp172 int fence) { in queueBuffer() argument
176 return ANativeWindow_queueBuffer(anw, anb, fence); in queueBuffer()
180 (void)fence; in queueBuffer()
186 int* fence) { in dequeueBuffer() argument
190 return ANativeWindow_dequeueBuffer(anw, anb, fence); in dequeueBuffer()
194 (void)fence; in dequeueBuffer()
/hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/chapters/VK_EXT_display_control/
Dfence_events.adoc7 Besides submitting a fence to a queue as part of a
8 <<devsandqueues-submission, queue submission>> command, a fence may: also be
11 [open,refpage='vkRegisterDeviceEventEXT',desc='Signal a fence when a device event occurs',type='pro…
15 To create a fence that will be signaled when an event occurs on a device,
25 * pname:pFence is a pointer to a handle in which the resulting fence
43 fence will be signaled.
51 a fence will be signaled, are:
55 * ename:VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT specifies that the fence
62 [open,refpage='vkRegisterDisplayEventEXT',desc='Signal a fence when a display event occurs',type='p…
66 To create a fence that will be signaled when an event occurs on a
[all …]
/hardware/interfaces/graphics/mapper/3.0/vts/functional/
DVtsHalGraphicsMapperV3_0TargetTest.cpp284 int fence = -1; in TEST_P() local
289 data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence, in TEST_P()
305 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
312 data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence, in TEST_P()
324 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
325 if (fence >= 0) { in TEST_P()
326 close(fence); in TEST_P()
352 int fence = -1; in TEST_P() local
356 mGralloc->lockYCbCr(bufferHandle, info.usage, region, fence)); in TEST_P()
364 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
[all …]
/hardware/google/gfxstream/guest/mesa/src/vulkan/wsi/
Dwsi_common_display.c173 struct wsi_display_fence *fence; member
1301 static void wsi_display_fence_event_handler(struct wsi_display_fence *fence);
1316 struct wsi_display_fence *fence = data; in wsi_display_vblank_handler() local
1318 wsi_display_fence_event_handler(fence); in wsi_display_vblank_handler()
1324 struct wsi_display_fence *fence = in wsi_display_sequence_handler() local
1327 wsi_display_fence_event_handler(fence); in wsi_display_sequence_handler()
1650 wsi_display_fence_wait(struct wsi_display_fence *fence, uint64_t timeout) in wsi_display_fence_wait() argument
1653 pthread_self(), fence->sequence, in wsi_display_fence_wait()
1656 pthread_mutex_lock(&fence->wsi->wait_mutex); in wsi_display_fence_wait()
1661 if (fence->event_received) { in wsi_display_fence_wait()
[all …]
/hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/appendices/
DVK_KHR_external_fence_win32.adoc24 This extension enables an application to export fence payload to and import
25 fence payload from Windows handles.
35 1) Should D3D12 fence handle types be supported, like they are for
39 Doing so would require extending the fence signal and wait operations to
42 A D3D12 fence can be signaled by importing it into a slink:VkSemaphore
44 D3D12 fence using non-Vulkan APIs.
/hardware/google/gfxstream/guest/vulkan_enc/
Dgfxstream_vk_private.cpp25 static bool isNoopFence(gfxstream_vk_fence* fence) { in isNoopFence() argument
26 return (fence && fence->vk.temporary && vk_sync_type_is_dummy(fence->vk.temporary->type)); in isNoopFence()
/hardware/interfaces/graphics/mapper/2.0/vts/functional/
DVtsHalGraphicsMapperV2_0TargetTest.cpp283 int fence = -1; in TEST_P() local
286 data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence))); in TEST_P()
297 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
301 data = static_cast<uint8_t*>(mGralloc->lock(bufferHandle, info.usage, region, fence))); in TEST_P()
309 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
310 if (fence >= 0) { in TEST_P()
311 close(fence); in TEST_P()
330 int fence = -1; in TEST_P() local
332 ASSERT_NO_FATAL_FAILURE(layout = mGralloc->lockYCbCr(bufferHandle, info.usage, region, fence)); in TEST_P()
349 ASSERT_NO_FATAL_FAILURE(fence = mGralloc->unlock(bufferHandle)); in TEST_P()
[all …]
/hardware/google/gfxstream/guest/fuchsia/include/android/
Dhardware_buffer.h425 int32_t fence, const ARect* rect, void** outVirtualAddress);
455 int32_t fence, const ARect* rect, AHardwareBuffer_Planes* outPlanes);
475 int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int32_t* fence);
530 int32_t fence, const ARect* rect, void** outVirtualAddress,
/hardware/google/gfxstream/guest/mesa/include/android_stub/android/
Dhardware_buffer.h430 int32_t fence, const ARect* rect, void** outVirtualAddress) __INTRODUCED_IN(26);
460 int32_t fence, const ARect* rect, AHardwareBuffer_Planes* outPlanes) __INTRODUCED_IN(29);
480 int AHardwareBuffer_unlock(AHardwareBuffer* buffer, int32_t* fence) __INTRODUCED_IN(26);
535 int32_t fence, const ARect* rect, void** outVirtualAddress,
/hardware/google/gfxstream/host/gl/
DEmulatedEglFenceSync.cpp51 void addFence(EmulatedEglFenceSync* fence) { in addFence() argument
52 mFences.set(fence, mTime.load() + kMaxGuestTimelines); in addFence()
61 mFences.eraseIf([time = mTime.load()](EmulatedEglFenceSync* fence, int fenceTime) { in sweep() argument
62 … EmulatedEglFenceSync* actual = EmulatedEglFenceSync::getFromHandle((uint64_t)(uintptr_t)fence); in sweep()
/hardware/google/gfxstream/host/
DVirtioGpuTimelines.cpp52 auto fence = std::make_unique<Fence>(fenceId, std::move(fenceCompletionCallback)); in enqueueFence() local
53 mTimelineQueues[ring].emplace_back(std::move(fence)); in enqueueFence()
108 bool operator()(std::unique_ptr<Fence> &fence) { in poll_locked()
109 fence->mCompletionCallback(); in poll_locked()
/hardware/google/graphics/common/libscaler/
Dlibscaler-v4l2.h160 inline void SetAddr(FrameInfo &frm, void *addr[SC_NUM_OF_PLANES], int mem_type, int fence) in SetAddr() argument
166 frm.fdAcquireFence = fence; in SetAddr()
309 inline bool SetSrcAddr(void *addr[SC_NUM_OF_PLANES], int mem_type, int fence = -1) {
310 SetAddr(m_frmSrc, addr, mem_type, fence);
314 inline bool SetDstAddr(void *addr[SC_NUM_OF_PLANES], int mem_type, int fence = -1) {
315 SetAddr(m_frmDst, addr, mem_type, fence);

1234567891011