| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_deps.c | 38 if (deps->fences != &deps->single) in i915_deps_reset_fences() 39 kfree(deps->fences); in i915_deps_reset_fences() 42 deps->fences = &deps->single; in i915_deps_reset_fences() 52 deps->fences = NULL; in i915_deps_init() 69 dma_fence_put(deps->fences[i]); in i915_deps_fini() 71 if (deps->fences != &deps->single) in i915_deps_fini() 72 kfree(deps->fences); in i915_deps_fini() 89 memcpy(new_fences, deps->fences, in i915_deps_grow() 91 swap(new_fences, deps->fences); in i915_deps_grow() 96 deps->fences[deps->num_deps++] = dma_fence_get(fence); in i915_deps_grow() [all …]
|
| H A D | i915_deps.h | 26 struct dma_fence **fences; member
|
| H A D | Kconfig.profile | 16 int "Timeout for unsignaled foreign fences (ms, jiffy granularity)"
|
| /linux/drivers/dma-buf/ |
| H A D | dma-fence-unwrap.c | 96 size_t dma_fence_dedup_array(struct dma_fence **fences, size_t num_fences) in dma_fence_dedup_array() argument 103 sort(fences, num_fences, sizeof(*fences), fence_cmp, NULL); in dma_fence_dedup_array() 110 if (fences[i]->context == fences[j]->context) in dma_fence_dedup_array() 111 dma_fence_put(fences[i]); in dma_fence_dedup_array() 113 fences[++j] = fences[i]; in dma_fence_dedup_array() 122 struct dma_fence **fences, in __dma_fence_unwrap_merge() argument 133 dma_fence_unwrap_for_each(tmp, &iter[i], fences[i]) { in __dma_fence_unwrap_merge() 167 dma_fence_unwrap_for_each(tmp, &iter[i], fences[i]) { in __dma_fence_unwrap_merge()
|
| H A D | dma-fence.c | 862 dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, in dma_fence_test_signaled_any() argument 868 struct dma_fence *fence = fences[i]; in dma_fence_test_signaled_any() 899 dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, in dma_fence_wait_any_timeout() argument 906 if (WARN_ON(!fences || !count || timeout < 0)) in dma_fence_wait_any_timeout() 911 if (dma_fence_is_signaled(fences[i])) { in dma_fence_wait_any_timeout() 927 struct dma_fence *fence = fences[i]; in dma_fence_wait_any_timeout() 945 if (dma_fence_test_signaled_any(fences, count, idx)) in dma_fence_wait_any_timeout() 958 dma_fence_remove_callback(fences[i], &cb[i].base); in dma_fence_wait_any_timeout()
|
| H A D | st-dma-fence.c | 351 struct dma_fence __rcu **fences; member 384 rcu_assign_pointer(t->fences[t->id], f1); in thread_signal_callback() 389 f2 = dma_fence_get_rcu_safe(&t->fences[!t->id]); in thread_signal_callback() 421 rcu_assign_pointer(t->fences[t->id], NULL); in thread_signal_callback() 452 t[i].fences = f; in test_race_signal_callback()
|
| /linux/Documentation/driver-api/ |
| H A 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
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_userq_fence.c | 83 INIT_LIST_HEAD(&fence_drv->fences); in amdgpu_userq_fence_driver_alloc() 156 list_for_each_entry(userq_fence, &fence_drv->fences, link) { in amdgpu_userq_fence_driver_process() 161 list_cut_before(&to_be_signaled, &fence_drv->fences, in amdgpu_userq_fence_driver_process() 180 return list_empty(&fence_drv->fences) ? 0 : 1; in amdgpu_userq_fence_driver_process() 195 list_for_each_entry_safe(fence, tmp, &fence_drv->fences, link) { in amdgpu_userq_fence_driver_destroy() 288 list_add_tail(&fence->link, &fence_drv->fences); in amdgpu_userq_fence_init() 698 struct dma_fence **fences, unsigned int *num_fences, in amdgpu_userq_wait_add_fence() argument 705 fences[(*num_fences)++] = dma_fence_get(fence); in amdgpu_userq_wait_add_fence() 722 struct dma_fence **fences, *fence, *f; in amdgpu_userq_wait_return_fence_info() local 734 fences = kmalloc_array(wait_info->num_fences, sizeof(*fences), in amdgpu_userq_wait_return_fence_info() [all …]
|
| H A D | amdgpu_ctx.c | 198 res = ktime_add(res, amdgpu_ctx_fence_time(centity->fences[i])); in amdgpu_ctx_entity_time() 215 entity = kzalloc_flex(*entity, fences, amdgpu_sched_jobs); in amdgpu_ctx_init_entity() 289 res = ktime_add(res, amdgpu_ctx_fence_time(entity->fences[i])); in amdgpu_ctx_fini_entity() 290 dma_fence_put(entity->fences[i]); in amdgpu_ctx_fini_entity() 748 other = centity->fences[idx]; in amdgpu_ctx_add_fence() 754 centity->fences[idx] = fence; in amdgpu_ctx_add_fence() 788 fence = dma_fence_get(centity->fences[seq & (amdgpu_sched_jobs - 1)]); in amdgpu_ctx_get_fence() 850 other = dma_fence_get(centity->fences[idx]); in amdgpu_ctx_wait_prev_fence()
|
| H A D | amdgpu_cs.c | 1647 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_all_fences() argument 1657 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_all_fences() 1692 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_any_fence() argument 1710 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_any_fence() 1758 struct drm_amdgpu_fence *fences; in amdgpu_cs_wait_fences_ioctl() local 1769 fences = memdup_array_user(u64_to_user_ptr(wait->in.fences), in amdgpu_cs_wait_fences_ioctl() 1772 if (IS_ERR(fences)) in amdgpu_cs_wait_fences_ioctl() 1773 return PTR_ERR(fences); in amdgpu_cs_wait_fences_ioctl() 1776 r = amdgpu_cs_wait_all_fences(adev, filp, wait, fences); in amdgpu_cs_wait_fences_ioctl() 1778 r = amdgpu_cs_wait_any_fence(adev, filp, wait, fences); in amdgpu_cs_wait_fences_ioctl() [all …]
|
| H A D | amdgpu_userq_fence.h | 56 struct list_head fences; member
|
| H A D | amdgpu_debugfs.c | 1937 struct dma_fence **fences) in amdgpu_ib_preempt_fences_swap() 1953 ptr = &drv->fences[last_seq]; in amdgpu_ib_preempt_signal_fences() 1961 fences[last_seq] = fence; in amdgpu_ib_preempt_signal_fences() 1966 static void amdgpu_ib_preempt_signal_fences(struct dma_fence **fences, in amdgpu_ib_preempt_job_recovery() 1973 fence = fences[i]; in amdgpu_ib_preempt_job_recovery() 2014 ptr = &drv->fences[preempt_seq]; in amdgpu_ib_preempt_mark_partial_job() 2038 struct dma_fence **fences = NULL; in amdgpu_debugfs_ib_preempt() 2055 fences = kcalloc(length, sizeof(void *), GFP_KERNEL); in amdgpu_debugfs_ib_preempt() 2056 if (!fences) in amdgpu_debugfs_ib_preempt() 2082 /* swap out the old fences */ in amdgpu_debugfs_ib_preempt() 1922 amdgpu_ib_preempt_fences_swap(struct amdgpu_ring * ring,struct dma_fence ** fences) amdgpu_ib_preempt_fences_swap() argument 1951 amdgpu_ib_preempt_signal_fences(struct dma_fence ** fences,int length) amdgpu_ib_preempt_signal_fences() argument 2023 struct dma_fence **fences = NULL; amdgpu_debugfs_ib_preempt() local [all...] |
| H A D | amdgpu_uvd.c | 1248 unsigned int fences = 0, i, j; in amdgpu_uvd_idle_work_handler() local 1253 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring); in amdgpu_uvd_idle_work_handler() 1255 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring_enc[j]); in amdgpu_uvd_idle_work_handler() 1258 if (fences == 0) { in amdgpu_uvd_idle_work_handler()
|
| H A D | amdgpu_gfx.c | 2589 u32 i, idx, fences = 0; in amdgpu_gfx_enforce_isolation_handler() local 2602 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); in amdgpu_gfx_enforce_isolation_handler() 2606 fences += amdgpu_fence_count_emitted(&adev->gfx.compute_ring[i]); in amdgpu_gfx_enforce_isolation_handler() 2608 if (fences) { in amdgpu_gfx_enforce_isolation_handler() 2763 u32 i, fences = 0; in amdgpu_gfx_profile_idle_work_handler() local 2772 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); in amdgpu_gfx_profile_idle_work_handler() 2774 fences += amdgpu_fence_count_emitted(&adev->gfx.compute_ring[i]); in amdgpu_gfx_profile_idle_work_handler() 2775 if (!fences && !atomic_read(&adev->gfx.total_submission_cnt)) { in amdgpu_gfx_profile_idle_work_handler()
|
| /linux/Documentation/gpu/ |
| H A D | drm-vm-bind-async.rst | 20 synchronization objects can be either generic, like dma-fences or 31 understanding of dma-fences is required to digest this 38 the GPU and CPU. Memory fences are sometimes referred to as 39 user-fences, userspace-fences or gpu futexes and do not necessarily obey 41 The kernel should thus avoid waiting for memory fences with locks held. 46 a certain mode that disallows completion dma-fences. 72 IOCTL returns. A synchronous VM_BIND takes neither in-fences nor 73 out-fences. Synchronous VM_BIND may block and wait for GPU operations; 94 Since asynchronous VM_BIND operations may use dma-fences embedded in 96 memory fences given as VM_BIND in-fences need to be awaited [all …]
|
| H A D | drm-compute.rst | 8 that cannot use fences.
|
| /linux/include/linux/ |
| H A D | dma-fence-array.h | 42 struct dma_fence **fences; member 82 int num_fences, struct dma_fence **fences, 86 struct dma_fence **fences,
|
| H A D | dma-fence.h | 722 signed long dma_fence_wait_any_timeout(struct dma_fence **fences,
|
| /linux/drivers/gpu/drm/virtio/ |
| H A D | virtgpu_fence.c | 94 list_add_tail(&fence->node, &drv->fences); in virtio_gpu_fence_emit() 119 list_for_each_entry_safe(curr, tmp, &drv->fences, node) { in virtio_gpu_fence_event_process() 129 list_for_each_entry_safe(curr, tmp, &drv->fences, node) { in virtio_gpu_fence_event_process()
|
| H A D | virtgpu_kms.c | 194 INIT_LIST_HEAD(&vgdev->fence_drv.fences); in virtio_gpu_init()
|
| /linux/drivers/gpu/drm/radeon/ |
| H A D | radeon_trace.h | 36 __field(u32, fences) 42 __entry->fences = radeon_fence_count_emitted( 47 __entry->fences)
|
| /linux/drivers/gpu/host1x/ |
| H A D | fence.c | 138 dma_fence_init(&fence->base, &host1x_syncpt_fence_ops, &sp->fences.lock, in host1x_fence_create()
|
| /linux/tools/memory-model/ |
| H A D | linux-kernel.cat | 55 * A-cumulative release fences of lock-release ensure that any stores that 97 (* Propagation: Ordering from release operations and strong fences. *) 107 * No fences needed here for prop because relation confined to one process.
|
| /linux/tools/memory-model/Documentation/ |
| H A D | explanation.txt | 301 fences), such as calls to smp_rmb() or rcu_read_lock(). 786 only internal operations. However, loads, stores, and fences involve 826 about the fence. However, fences do constrain the way CPUs and the 833 Strong fences, including smp_mb() and synchronize_rcu(), force 843 Acquire fences, such as smp_load_acquire(), force the CPU to 848 Release fences, such as smp_store_release(), force the CPU to 869 The propagation ordering enforced by release fences and strong fences 872 fence. We describe this property by saying that release fences and 873 strong fences are A-cumulative. By contrast, smp_wmb() fences are not 878 rcu_read_lock(), rcu_read_unlock(), and synchronize_rcu() fences have [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_vm.c | 3408 struct dma_fence **fences = NULL; in ops_execute() local 3425 fences = kmalloc_objs(*fences, n_fence); in ops_execute() 3426 if (!fences) { in ops_execute() 3462 fences[current_fence++] = fence ?: dma_fence_get_stub(); in ops_execute() 3468 fences[current_fence++] = in ops_execute() 3474 dma_fence_array_init(cf, n_fence, fences, dma_fence_context_alloc(1), in ops_execute() 3495 dma_fence_put(fences[--current_fence]); in ops_execute() 3496 kfree(fences); in ops_execute()
|