| /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
|
| /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() 140 * -ENOENT when no fences were processes 141 * 1 when more fences are pending 142 * 0 when no fences are pending any more 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() 636 /* Count the number of expected fences s in amdgpu_userq_wait_count_fences() 698 amdgpu_userq_wait_add_fence(struct drm_amdgpu_userq_wait * wait_info,struct dma_fence ** fences,unsigned int * num_fences,struct dma_fence * fence) amdgpu_userq_wait_add_fence() argument 722 struct dma_fence **fences, *fence, *f; amdgpu_userq_wait_return_fence_info() local [all...] |
| H A D | amdgpu_fence.c | 121 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; in amdgpu_fence_emit() 234 ptr = &drv->fences[last_seq]; in amdgpu_fence_process() 270 * amdgpu_fence_wait_empty - wait for all fences to signal 274 * Wait for all fences on the requested ring to signal (all asics). 275 * Returns 0 if the fences have passed, error for all other cases. 286 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; in amdgpu_fence_wait_empty() 307 * Wait for all fences on the requested ring to signal (all asics). 322 * amdgpu_fence_count_emitted - get the count of emitted fences 326 * Get the number of fences emitted on the requested ring (all asics). 327 * Returns the number of emitted fences o [all...] |
| H A D | amdgpu_ctx.c | 199 res = ktime_add(res, amdgpu_ctx_fence_time(centity->fences[i])); in amdgpu_ctx_entity_time() 216 entity = kzalloc_flex(*entity, fences, amdgpu_sched_jobs); in amdgpu_ctx_init_entity() 290 res = ktime_add(res, amdgpu_ctx_fence_time(entity->fences[i])); in amdgpu_ctx_fini_entity() 291 dma_fence_put(entity->fences[i]); in amdgpu_ctx_fini_entity() 754 other = centity->fences[idx]; in amdgpu_ctx_add_fence() 760 centity->fences[idx] = fence; in amdgpu_ctx_add_fence() 794 fence = dma_fence_get(centity->fences[seq & (amdgpu_sched_jobs - 1)]); in amdgpu_ctx_set_entity_priority() 856 other = dma_fence_get(centity->fences[idx]); in amdgpu_ctx_wait_prev_fence()
|
| H A D | amdgpu_cs.c | 388 /* MM engine doesn't support user fences */ in amdgpu_cs_p2_ib() 1662 * amdgpu_cs_wait_all_fences - wait on all fences to signal in amdgpu_cs_wait_all_fences() 1667 * @fences: array of drm_amdgpu_fence in amdgpu_cs_wait_all_fences() 1672 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_all_fences() 1682 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_all_fences() 1712 * @fences: array of drm_amdgpu_fence in amdgpu_cs_wait_any_fence() 1717 struct drm_amdgpu_fence *fences) in amdgpu_cs_wait_any_fence() 1735 fence = amdgpu_cs_get_fence(adev, filp, &fences[i]); in amdgpu_cs_wait_any_fence() 1783 struct drm_amdgpu_fence *fences; in amdgpu_cs_wait_fences_ioctl() 1793 /* Get the fences fro 1654 amdgpu_cs_wait_all_fences(struct amdgpu_device * adev,struct drm_file * filp,union drm_amdgpu_wait_fences * wait,struct drm_amdgpu_fence * fences) amdgpu_cs_wait_all_fences() argument 1699 amdgpu_cs_wait_any_fence(struct amdgpu_device * adev,struct drm_file * filp,union drm_amdgpu_wait_fences * wait,struct drm_amdgpu_fence * fences) amdgpu_cs_wait_any_fence() argument 1765 struct drm_amdgpu_fence *fences; amdgpu_cs_wait_fences_ioctl() local [all...] |
| H A D | amdgpu_debugfs.c | 1923 struct dma_fence **fences) in amdgpu_ib_preempt_fences_swap() 1939 ptr = &drv->fences[last_seq]; in amdgpu_ib_preempt_fences_swap() 1947 fences[last_seq] = fence; in amdgpu_ib_preempt_fences_swap() 1952 static void amdgpu_ib_preempt_signal_fences(struct dma_fence **fences, in amdgpu_ib_preempt_signal_fences() 1959 fence = fences[i]; in amdgpu_ib_preempt_signal_fences() 2000 ptr = &drv->fences[preempt_seq]; in amdgpu_ib_preempt_mark_partial_job() 2024 struct dma_fence **fences = NULL; in amdgpu_debugfs_ib_preempt() 2041 fences = kzalloc_objs(*fences, length); in amdgpu_debugfs_ib_preempt() 2042 if (!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_userq_fence.h | 56 struct list_head fences; member
|
| H A D | amdgpu_uvd.c | 1250 unsigned int fences = 0, i, j; in amdgpu_uvd_idle_work_handler() 1255 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring); in amdgpu_uvd_idle_work_handler() 1257 fences += amdgpu_fence_count_emitted(&adev->uvd.inst[i].ring_enc[j]); in amdgpu_uvd_idle_work_handler() 1260 if (fences == 0) { in amdgpu_uvd_idle_work_handler() 1248 unsigned int fences = 0, i, j; amdgpu_uvd_idle_work_handler() local
|
| H A D | amdgpu_gfx.c | 2712 * It counts the number of emitted fences for each GFX and compute ring. If there in amdgpu_gfx_enforce_isolation_ring_begin_use() 2713 * are any fences, it schedules the `enforce_isolation_work` to be run after a in amdgpu_gfx_enforce_isolation_ring_begin_use() 2714 * delay of `GFX_SLICE_PERIOD`. If there are no fences, it signals the Kernel Fusion in amdgpu_gfx_enforce_isolation_ring_begin_use() 2723 u32 i, idx, fences = 0; 2736 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); in amdgpu_gfx_enforce_isolation_ring_end_use() 2740 fences += amdgpu_fence_count_emitted(&adev->gfx.compute_ring[i]); in amdgpu_gfx_enforce_isolation_ring_end_use() 2742 if (fences) { in amdgpu_gfx_enforce_isolation_ring_end_use() 2897 u32 i, fences = 0; 2906 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); 2908 fences 2589 u32 i, idx, fences = 0; amdgpu_gfx_enforce_isolation_handler() local 2763 u32 i, fences = 0; amdgpu_gfx_profile_idle_work_handler() local [all...] |
| /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 | 352 * fences, such as used by struct dma_resv. When using a seqlock, 488 * means that fences get signaled eventually. 545 * It's recommended for seqno fences to call dma_fence_signal when the 578 * Returns true if f1 is chronologically later than f2. Both fences must be 598 * Returns true if f1 is chronologically later than f2. Both fences must be 616 * fences must be from the same context, since a seqno is not re-used across 630 * Returns NULL if both fences are signaled, otherwise the fence that would be 631 * signaled last. Both fences must be from the same context, since a seqno is 722 signed long dma_fence_wait_any_timeout(struct dma_fence **fences, 787 * dma_fence_is_container - check if a fence is a container for other fences [all...] |
| /linux/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_execbuffer.c | 313 struct eb_fence *fences; member 1033 /* Reserve enough slots to accommodate composite fences */ in eb_validate_vmas() 2129 * using mandatory fences underneath. Currently the below in eb_move_to_gpu() 2790 __free_fence_array(struct eb_fence *fences, unsigned int n) in add_timeline_fence_array() 2793 drm_syncobj_put(ptr_mask_bits(fences[n].syncobj, 2)); in add_timeline_fence_array() 2794 dma_fence_put(fences[n].dma_fence); in add_timeline_fence_array() 2795 dma_fence_chain_free(fences[n].chain_fence); in add_timeline_fence_array() 2797 kvfree(fences); in add_timeline_fence_array() 2828 f = krealloc(eb->fences, in add_timeline_fence_array() 2834 eb->fences in add_timeline_fence_array() 2775 __free_fence_array(struct eb_fence * fences,unsigned int n) __free_fence_array() argument 2993 put_fence_array(struct eb_fence * fences,int num_fences) put_fence_array() argument 3188 struct dma_fence **fences; eb_composite_fence_create() local [all...] |
| /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 | 45 * reference to any fences for which 'enable_signaling' has been in host1x_syncpt_fence_enable_signaling() 48 * We cannot currently always guarantee that all fences get signalled in host1x_syncpt_fence_enable_signaling() 50 * that long-lasting fences will get reaped eventually. in host1x_syncpt_fence_enable_signaling() 138 dma_fence_init(&fence->base, &host1x_syncpt_fence_ops, &sp->fences.lock, in host1x_fence_create() 174 * signalled fences.
|
| /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 …]
|