| /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 | 84 * @fences: Array of dma_fence pointers to be deduplicated 85 * @num_fences: Number of entries in the @fences array 88 * fences with the same context, keeping only the most recent one. 90 * The array is modified in-place and unreferenced duplicate fences are released 91 * via dma_fence_put(). The function returns the new number of fences after 94 * Return: Number of unique fences remaining in the array. 96 int dma_fence_dedup_array(struct dma_fence **fences, int num_fences) in dma_fence_dedup_array() argument 100 sort(fences, num_fences, sizeof(*fences), fence_cmp, NULL); in dma_fence_dedup_array() 107 if (fences[ in dma_fence_dedup_array() 119 __dma_fence_unwrap_merge(unsigned int num_fences,struct dma_fence ** fences,struct dma_fence_unwrap * iter) __dma_fence_unwrap_merge() argument [all...] |
| H A D | st-dma-fence-chain.c | 97 struct dma_fence **fences; in sanitycheck() 118 fc->fences = kvmalloc_objs(*fc->fences, count, GFP_KERNEL | __GFP_ZERO); in fence_chains_init() 119 if (!fc->fences) { in fence_chains_init() 126 fc->fences[i] = mock_fence(); in fence_chains_init() 127 if (!fc->fences[i]) { in fence_chains_init() 133 fc->fences[i], in fence_chains_init() 150 dma_fence_put(fc->fences[i]); in fence_chains_init() 153 kvfree(fc->fences); in fence_chains_init() 164 dma_fence_signal(fc->fences[ 102 struct dma_fence **fences; global() member [all...] |
| H A D | st-dma-resv.c | 224 cursor.fences = (void*)~0; in test_for_each_unlocked() 242 struct dma_fence *f, **fences = NULL; in test_for_each_unlocked() 268 r = dma_resv_get_fences(&resv, usage, &i, &fences); in test_get_fences() 274 if (i != 1 || fences[0] != f) { in test_get_fences() 282 dma_fence_put(fences[i]); in test_get_fences() 283 kfree(fences); in test_get_fences() 247 struct dma_fence *f, **fences = NULL; test_get_fences() local
|
| H A D | st-dma-fence-unwrap.c | 52 struct dma_fence **fences; in mock_array() 56 fences = kzalloc_objs(*fences, num_fences); in mock_array() 57 if (!fences) in mock_array() 62 fences[i] = va_arg(valist, typeof(*fences)); in mock_array() 65 array = dma_fence_array_create(num_fences, fences, in mock_array() 73 kfree(fences); in mock_array() 78 dma_fence_put(va_arg(valist, typeof(*fences))); in mock_array() 150 KUNIT_FAIL(test, "Not all fences see in unwrap_array() 53 struct dma_fence **fences; mock_array() local [all...] |
| H A D | dma-fence.c | 31 * fence context, this allows checking if fences belong to the same 38 * DOC: DMA fences overview 40 * DMA fences, represented by &struct dma_fence, are the kernel internal 46 * dma_fence_context_alloc(), and all fences on the same context are 49 * Since the purposes of fences is to facilitate cross-device and 52 * - Individual fences can be exposed as a &sync_file, accessed as a file 63 * implicit fences are stored in &struct dma_resv through the 76 * further command submission and force complete all in-flight fences, e.g. 85 * Drivers should not try to second guess timeout handling of fences from 90 * which completes the fences, wit 861 dma_fence_test_signaled_any(struct dma_fence ** fences,uint32_t count,uint32_t * idx) dma_fence_test_signaled_any() argument 898 dma_fence_wait_any_timeout(struct dma_fence ** fences,uint32_t count,bool intr,signed long timeout,uint32_t * idx) dma_fence_wait_any_timeout() argument [all...] |
| /linux/drivers/gpu/host1x/ |
| H A D | intr.c | 35 if (!list_empty(&sp->fences.list)) { in host1x_intr_update_hw_state() 36 fence = list_first_entry(&sp->fences.list, struct host1x_syncpt_fence, list); in host1x_intr_update_hw_state() 47 struct host1x_fence_list *fence_list = &fence->sp->fences; in host1x_intr_add_fence_locked() 57 struct host1x_fence_list *fence_list = &fence->sp->fences; in host1x_intr_remove_fence() 83 spin_lock(&sp->fences.lock); in host1x_intr_handle_interrupt() 85 list_for_each_entry_safe(fence, tmp, &sp->fences.list, list) { in host1x_intr_handle_interrupt() 97 * so if no fences remain, no update is needed. in host1x_intr_handle_interrupt() 99 if (!list_empty(&sp->fences.list)) in host1x_intr_handle_interrupt() 102 spin_unlock(&sp->fences.lock); in host1x_intr_init() 114 spin_lock_init(&syncpt->fences in host1x_intr_init() [all...] |
| H A D | syncpt.h | 43 struct host1x_fence_list fences; member
|
| H A D | fence.c | 138 dma_fence_init(&fence->base, &host1x_syncpt_fence_ops, &sp->fences.lock, in host1x_fence_create()
|
| /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() 194 list_for_each_entry_safe(fence, tmp, &fence_drv->fences, link) { in amdgpu_userq_fence_driver_destroy() 289 list_add_tail(&fence->link, &fence_drv->fences); in amdgpu_userq_fence_init() 592 /* Count the number of expected fences s 692 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 716 struct dma_fence **fences, *fence, *f; amdgpu_userq_wait_return_fence_info() local [all...] |
| H A D | amdgpu_userq_fence.h | 56 struct list_head fences; member
|
| H A D | amdgpu_jpeg.c | 113 unsigned int fences = 0; in amdgpu_jpeg_idle_work_handler() local 121 fences += amdgpu_fence_count_emitted(&adev->jpeg.inst[i].ring_dec[j]); in amdgpu_jpeg_idle_work_handler() 124 if (!fences && !atomic_read(&adev->jpeg.total_submission_cnt)) { in amdgpu_jpeg_idle_work_handler()
|
| H A D | amdgpu_gfx.c | 2236 * It counts the number of emitted fences for each GFX and compute ring. If there in amdgpu_gfx_enforce_isolation_handler() 2237 * are any fences, it schedules the `enforce_isolation_work` to be run after a in amdgpu_gfx_enforce_isolation_handler() 2238 * delay of `GFX_SLICE_PERIOD`. If there are no fences, it signals the Kernel Fusion in amdgpu_gfx_enforce_isolation_handler() 2247 u32 i, idx, fences = 0; in amdgpu_gfx_enforce_isolation_handler() 2260 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); in amdgpu_gfx_enforce_isolation_handler() 2264 fences += amdgpu_fence_count_emitted(&adev->gfx.compute_ring[i]); 2266 if (fences) { 2421 u32 i, fences = 0; in amdgpu_gfx_profile_idle_work_handler() 2430 fences += amdgpu_fence_count_emitted(&adev->gfx.gfx_ring[i]); 2432 fences in amdgpu_gfx_profile_ring_begin_use() 2229 u32 i, idx, fences = 0; amdgpu_gfx_enforce_isolation_handler() local 2403 u32 i, fences = 0; amdgpu_gfx_profile_idle_work_handler() local [all...] |
| H A D | amdgpu_vcn.c | 467 unsigned int fences = 0, fence[AMDGPU_MAX_VCN_INSTANCES] = {0}; in amdgpu_vcn_idle_work_handler() local 491 fences += fence[i]; in amdgpu_vcn_idle_work_handler() 493 if (!fences && !atomic_read(&vcn_inst->total_submission_cnt)) { in amdgpu_vcn_idle_work_handler() 525 unsigned int fences = 0; in amdgpu_vcn_ring_begin_use() local 529 fences += amdgpu_fence_count_emitted(&vcn_inst->ring_enc[i]); in amdgpu_vcn_ring_begin_use() 531 if (fences || atomic_read(&vcn_inst->dpg_enc_submission_cnt)) in amdgpu_vcn_ring_begin_use()
|
| H A D | amdgpu_vpe.c | 354 unsigned int fences = 0; in vpe_idle_work_handler() 356 fences += amdgpu_fence_count_emitted(&adev->vpe.ring); in vpe_idle_work_handler() 357 if (fences) in vpe_idle_work_handler() 349 unsigned int fences = 0; vpe_idle_work_handler() local
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_sync.c | 324 * Get a fence from syncs, exec queue, and VM. If syncs contain in-fences create 325 * and return a composite fence of all in-fences + last fence. If no in-fences 335 struct dma_fence **fences = NULL; in xe_sync_in_fence_get() local 342 /* Reject in fences */ in xe_sync_in_fence_get() 358 fences = kmalloc_objs(*fences, num_fence); in xe_sync_in_fence_get() 359 if (!fences) in xe_sync_in_fence_get() 362 fences[current_fence++] = in xe_sync_in_fence_get() 365 fences[current_fenc in xe_sync_in_fence_get() [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/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() 2114 * using mandatory fences underneath. Currently the below in eb_move_to_gpu() 2775 __free_fence_array(struct eb_fence *fences, unsigned int n) 2778 drm_syncobj_put(ptr_mask_bits(fences[n].syncobj, 2)); in __free_fence_array() 2779 dma_fence_put(fences[n].dma_fence); in __free_fence_array() 2780 dma_fence_chain_free(fences[n].chain_fence); in __free_fence_array() 2782 kvfree(fences); in __free_fence_array() 2814 f = krealloc(eb->fences, in add_timeline_fence_array() 2820 eb->fences in add_timeline_fence_array() 2777 __free_fence_array(struct eb_fence * fences,unsigned int n) __free_fence_array() argument 2995 put_fence_array(struct eb_fence * fences,int num_fences) put_fence_array() argument 3190 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()
|
| /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/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 …]
|