| /Linux-v5.15/drivers/dma-buf/ |
| D | sync_file.c | 149 struct dma_fence **fences, int num_fences) in sync_file_set_fence() argument 160 sync_file->fence = fences[0]; in sync_file_set_fence() 161 kfree(fences); in sync_file_set_fence() 163 array = dma_fence_array_create(num_fences, fences, in sync_file_set_fence() 182 return array->fences; in get_fences() 189 static void add_fence(struct dma_fence **fences, in add_fence() argument 192 fences[*i] = fence; in add_fence() 214 struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences; in sync_file_merge() local 228 fences = kcalloc(num_fences, sizeof(*fences), GFP_KERNEL); in sync_file_merge() 229 if (!fences) in sync_file_merge() [all …]
|
| D | st-dma-fence-chain.c | 100 struct dma_fence **fences; member 122 fc->fences = kvmalloc_array(count, sizeof(*fc->fences), in fence_chains_init() 124 if (!fc->fences) { in fence_chains_init() 131 fc->fences[i] = mock_fence(); in fence_chains_init() 132 if (!fc->fences[i]) { in fence_chains_init() 138 fc->fences[i], in fence_chains_init() 153 dma_fence_put(fc->fences[i]); in fence_chains_init() 156 kvfree(fc->fences); in fence_chains_init() 167 dma_fence_signal(fc->fences[i]); in fence_chains_fini() 168 dma_fence_put(fc->fences[i]); in fence_chains_fini() [all …]
|
| D | dma-fence-array.c | 87 if (dma_fence_add_callback(array->fences[i], &cb[i].cb, in dma_fence_array_enable_signaling() 89 int error = array->fences[i]->error; in dma_fence_array_enable_signaling() 116 dma_fence_put(array->fences[i]); in dma_fence_array_release() 118 kfree(array->fences); in dma_fence_array_release() 151 struct dma_fence **fences, in dma_fence_array_create() argument 171 array->fences = fences; in dma_fence_array_create() 197 if (array->fences[i]->context != context) in dma_fence_match_context()
|
| D | dma-fence.c | 808 dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, in dma_fence_test_signaled_any() argument 814 struct dma_fence *fence = fences[i]; in dma_fence_test_signaled_any() 845 dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, in dma_fence_wait_any_timeout() argument 852 if (WARN_ON(!fences || !count || timeout < 0)) in dma_fence_wait_any_timeout() 857 if (dma_fence_is_signaled(fences[i])) { in dma_fence_wait_any_timeout() 873 struct dma_fence *fence = fences[i]; in dma_fence_wait_any_timeout() 891 if (dma_fence_test_signaled_any(fences, count, idx)) in dma_fence_wait_any_timeout() 904 dma_fence_remove_callback(fences[i], &cb[i].base); in dma_fence_wait_any_timeout()
|
| D | st-dma-fence.c | 432 struct dma_fence __rcu **fences; member 461 rcu_assign_pointer(t->fences[t->id], f1); in thread_signal_callback() 466 f2 = dma_fence_get_rcu_safe(&t->fences[!t->id]); in thread_signal_callback() 498 rcu_assign_pointer(t->fences[t->id], NULL); in thread_signal_callback() 522 t[i].fences = f; in race_signal_callback()
|
| D | dma-resv.c | 221 struct dma_resv_list *fences = dma_resv_shared_list(obj); in dma_resv_reset_shared_max() local 226 if (fences) in dma_resv_reset_shared_max() 227 fences->shared_max = fences->shared_count; in dma_resv_reset_shared_max()
|
| /Linux-v5.15/drivers/gpu/drm/amd/amdgpu/ |
| D | amdgpu_ids.c | 110 struct dma_fence *fence, **fences; in amdgpu_pasid_free_delayed() local 115 r = dma_resv_get_fences(resv, NULL, &count, &fences); in amdgpu_pasid_free_delayed() 125 fence = fences[0]; in amdgpu_pasid_free_delayed() 126 kfree(fences); in amdgpu_pasid_free_delayed() 131 array = dma_fence_array_create(count, fences, context, in amdgpu_pasid_free_delayed() 134 kfree(fences); in amdgpu_pasid_free_delayed() 203 struct dma_fence **fences; in amdgpu_vmid_grab_idle() local 210 fences = kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_KERNEL); in amdgpu_vmid_grab_idle() 211 if (!fences) in amdgpu_vmid_grab_idle() 221 fences[i] = amdgpu_sync_peek_fence(&(*idle)->active, r); in amdgpu_vmid_grab_idle() [all …]
|
| D | amdgpu_sa.c | 207 struct dma_fence **fences, in amdgpu_sa_bo_next_hole() argument 229 fences[i] = NULL; in amdgpu_sa_bo_next_hole() 238 fences[i] = sa_bo->fence; in amdgpu_sa_bo_next_hole() 279 struct dma_fence *fences[AMDGPU_SA_NUM_FENCE_LISTS]; in amdgpu_sa_bo_new() local 314 } while (amdgpu_sa_bo_next_hole(sa_manager, fences, tries)); in amdgpu_sa_bo_new() 317 if (fences[i]) in amdgpu_sa_bo_new() 318 fences[count++] = dma_fence_get(fences[i]); in amdgpu_sa_bo_new() 322 t = dma_fence_wait_any_timeout(fences, count, false, in amdgpu_sa_bo_new() 326 dma_fence_put(fences[i]); in amdgpu_sa_bo_new()
|
| D | amdgpu_sync.c | 53 hash_init(sync->fences); in amdgpu_sync_create() 137 hash_for_each_possible(sync->fences, e, node, f->context) { in amdgpu_sync_add_later() 169 hash_add(sync->fences, &e->node, f->context); in amdgpu_sync_fence() 311 hash_for_each_safe(sync->fences, i, tmp, e, node) { in amdgpu_sync_peek_fence() 352 hash_for_each_safe(sync->fences, i, tmp, e, node) { in amdgpu_sync_get_fence() 383 hash_for_each_safe(source->fences, i, tmp, e, node) { in amdgpu_sync_clone() 408 hash_for_each_safe(sync->fences, i, tmp, e, node) { in amdgpu_sync_wait() 434 hash_for_each_safe(sync->fences, i, tmp, e, node) { in amdgpu_sync_free()
|
| D | amdgpu_fence.c | 179 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; in amdgpu_fence_emit() 292 ptr = &drv->fences[last_seq]; in amdgpu_fence_process() 348 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; in amdgpu_fence_wait_empty() 484 ring->fence_drv.fences = kcalloc(num_hw_submission * 2, sizeof(void *), in amdgpu_fence_driver_init_ring() 486 if (!ring->fence_drv.fences) in amdgpu_fence_driver_init_ring() 589 dma_fence_put(ring->fence_drv.fences[j]); in amdgpu_fence_driver_sw_fini() 590 kfree(ring->fence_drv.fences); in amdgpu_fence_driver_sw_fini() 591 ring->fence_drv.fences = NULL; in amdgpu_fence_driver_sw_fini()
|
| D | amdgpu_jpeg.c | 78 unsigned int fences = 0; in amdgpu_jpeg_idle_work_handler() local 85 fences += amdgpu_fence_count_emitted(&adev->jpeg.inst[i].ring_dec); in amdgpu_jpeg_idle_work_handler() 88 if (!fences && !atomic_read(&adev->jpeg.total_submission_cnt)) in amdgpu_jpeg_idle_work_handler()
|
| D | amdgpu_ctx.c | 103 entity = kzalloc(struct_size(entity, fences, amdgpu_sched_jobs), in amdgpu_ctx_init_entity() 178 dma_fence_put(entity->fences[i]); in amdgpu_ctx_fini_entity() 472 other = centity->fences[idx]; in amdgpu_ctx_add_fence() 479 centity->fences[idx] = fence; in amdgpu_ctx_add_fence() 511 fence = dma_fence_get(centity->fences[seq & (amdgpu_sched_jobs - 1)]); in amdgpu_ctx_get_fence() 573 other = dma_fence_get(centity->fences[idx]); in amdgpu_ctx_wait_prev_fence() 680 fence = dma_fence_get(centity->fences[i]); in amdgpu_ctx_fence_time()
|
| D | amdgpu_debugfs.c | 1327 struct dma_fence **fences) in amdgpu_ib_preempt_fences_swap() argument 1343 ptr = &drv->fences[last_seq]; in amdgpu_ib_preempt_fences_swap() 1351 fences[last_seq] = fence; in amdgpu_ib_preempt_fences_swap() 1356 static void amdgpu_ib_preempt_signal_fences(struct dma_fence **fences, in amdgpu_ib_preempt_signal_fences() argument 1363 fence = fences[i]; in amdgpu_ib_preempt_signal_fences() 1404 ptr = &drv->fences[preempt_seq]; in amdgpu_ib_preempt_mark_partial_job() 1428 struct dma_fence **fences = NULL; in amdgpu_debugfs_ib_preempt() local 1444 fences = kcalloc(length, sizeof(void *), GFP_KERNEL); in amdgpu_debugfs_ib_preempt() 1445 if (!fences) in amdgpu_debugfs_ib_preempt() 1474 amdgpu_ib_preempt_fences_swap(ring, fences); in amdgpu_debugfs_ib_preempt() [all …]
|
| D | amdgpu_cs.c | 1526 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_all_fences() argument 1536 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_all_fences() 1571 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_any_fence() argument 1589 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_any_fence() 1639 struct drm_amdgpu_fence *fences; in amdgpu_cs_wait_fences_ioctl() local 1643 fences = kmalloc_array(fence_count, sizeof(struct drm_amdgpu_fence), in amdgpu_cs_wait_fences_ioctl() 1645 if (fences == NULL) in amdgpu_cs_wait_fences_ioctl() 1648 fences_user = u64_to_user_ptr(wait->in.fences); in amdgpu_cs_wait_fences_ioctl() 1649 if (copy_from_user(fences, fences_user, in amdgpu_cs_wait_fences_ioctl() 1656 r = amdgpu_cs_wait_all_fences(adev, filp, wait, fences); in amdgpu_cs_wait_fences_ioctl() [all …]
|
| D | amdgpu_sync.h | 45 DECLARE_HASHTABLE(fences, 4);
|
| D | amdgpu_vcn.c | 388 unsigned int fences = 0, fence[AMDGPU_MAX_VCN_INSTANCES] = {0}; in amdgpu_vcn_idle_work_handler() local 413 fences += fence[j]; in amdgpu_vcn_idle_work_handler() 416 if (!fences && !atomic_read(&adev->vcn.total_submission_cnt)) { in amdgpu_vcn_idle_work_handler() 453 unsigned int fences = 0; in amdgpu_vcn_ring_begin_use() local 457 fences += amdgpu_fence_count_emitted(&adev->vcn.inst[ring->me].ring_enc[i]); in amdgpu_vcn_ring_begin_use() 459 if (fences || atomic_read(&adev->vcn.inst[ring->me].dpg_enc_submission_cnt)) in amdgpu_vcn_ring_begin_use()
|
| /Linux-v5.15/Documentation/driver-api/ |
| D | sync_file.rst | 9 the fences(struct dma_fence) that are needed to synchronize between drivers or 29 in-fences and out-fences 33 the driver to userspace we call the fences it contains 'out-fences'. They are 37 Out-fences are fences that the driver creates. 40 userspace we call these fence(s) 'in-fences'. Receiving in-fences means that 42 the in-fences. 72 of the Sync File to the kernel. The kernel can then retrieve the fences
|
| D | dma-buf.rst | 156 :doc: DMA fences overview 218 * Future fences, used in HWC1 to signal when a buffer isn't used by the display 222 * Proxy fences, proposed to handle &drm_syncobj for which the fence has not yet 225 * Userspace fences or gpu futexes, fine-grained locking within a command buffer 231 batch DMA fences for memory management instead of context preemption DMA 232 fences which get reattached when the compute job is rescheduled. 235 fences and controls when they fire. Mixing indefinite fences with normal 236 in-kernel DMA fences does not work, even when a fallback timeout is included to 242 * Only userspace knows about all dependencies in indefinite fences and when 246 for memory management needs, which means we must support indefinite fences being [all …]
|
| /Linux-v5.15/drivers/gpu/drm/i915/selftests/ |
| D | i915_sw_fence.c | 453 struct i915_sw_fence **fences; in test_chain() local 457 fences = kmalloc_array(nfences, sizeof(*fences), GFP_KERNEL); in test_chain() 458 if (!fences) in test_chain() 462 fences[i] = alloc_fence(); in test_chain() 463 if (!fences[i]) { in test_chain() 470 ret = i915_sw_fence_await_sw_fence_gfp(fences[i], in test_chain() 471 fences[i - 1], in test_chain() 478 i915_sw_fence_commit(fences[i]); in test_chain() 484 if (i915_sw_fence_done(fences[i])) { in test_chain() 490 i915_sw_fence_commit(fences[0]); in test_chain() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/radeon/ |
| D | radeon_sa.c | 248 struct radeon_fence **fences, in radeon_sa_bo_next_hole() argument 278 fences[i] = sa_bo->fence; in radeon_sa_bo_next_hole() 317 struct radeon_fence *fences[RADEON_NUM_RINGS]; in radeon_sa_bo_new() local 336 fences[i] = NULL; in radeon_sa_bo_new() 350 } while (radeon_sa_bo_next_hole(sa_manager, fences, tries)); in radeon_sa_bo_new() 353 radeon_fence_ref(fences[i]); in radeon_sa_bo_new() 356 r = radeon_fence_wait_any(rdev, fences, false); in radeon_sa_bo_new() 358 radeon_fence_unref(&fences[i]); in radeon_sa_bo_new()
|
| D | radeon_trace.h | 36 __field(u32, fences) 42 __entry->fences = radeon_fence_count_emitted( 47 __entry->fences)
|
| /Linux-v5.15/include/linux/ |
| D | dma-fence-array.h | 43 struct dma_fence **fences; member 78 struct dma_fence **fences,
|
| /Linux-v5.15/drivers/gpu/drm/virtio/ |
| D | virtgpu_fence.c | 104 list_add_tail(&fence->node, &drv->fences); in virtio_gpu_fence_emit() 122 list_for_each_entry_safe(curr, tmp, &drv->fences, node) { in virtio_gpu_fence_event_process() 132 list_for_each_entry_safe(curr, tmp, &drv->fences, node) { in virtio_gpu_fence_event_process()
|
| /Linux-v5.15/drivers/gpu/drm/i915/gem/ |
| D | i915_gem_execbuffer.c | 297 struct eb_fence *fences; member 2429 __free_fence_array(struct eb_fence *fences, unsigned int n) in __free_fence_array() argument 2432 drm_syncobj_put(ptr_mask_bits(fences[n].syncobj, 2)); in __free_fence_array() 2433 dma_fence_put(fences[n].dma_fence); in __free_fence_array() 2434 dma_fence_chain_free(fences[n].chain_fence); in __free_fence_array() 2436 kvfree(fences); in __free_fence_array() 2468 f = krealloc(eb->fences, in add_timeline_fence_array() 2474 eb->fences = f; in add_timeline_fence_array() 2592 f = krealloc(eb->fences, in add_fence_array() 2598 eb->fences = f; in add_fence_array() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/ |
| D | drm_gem.c | 1344 struct dma_fence **fences; in drm_gem_fence_array_add_implicit() local 1355 &fence_count, &fences); in drm_gem_fence_array_add_implicit() 1360 ret = drm_gem_fence_array_add(fence_array, fences[i]); in drm_gem_fence_array_add_implicit() 1366 dma_fence_put(fences[i]); in drm_gem_fence_array_add_implicit() 1367 kfree(fences); in drm_gem_fence_array_add_implicit()
|