Searched refs:fences (Results 1 - 25 of 56) sorted by relevance

123

/linux-master/drivers/gpu/drm/i915/
H A Di915_deps.c18 * the migration fence with the unbind fences if these are coalesced
38 if (deps->fences != &deps->single)
39 kfree(deps->fences);
42 deps->fences = &deps->single;
52 deps->fences = NULL;
62 * then resets the fences array.
69 dma_fence_put(deps->fences[i]);
71 if (deps->fences != &deps->single)
72 kfree(deps->fences);
89 memcpy(new_fences, deps->fences,
134 struct dma_fence **fences = deps->fences; local
[all...]
H A Di915_deps.h18 * @fences: Allocated array of fence pointers if more than a single fence;
20 * @num_deps: Current number of dependency fences.
21 * @fences_size: Size of the @fences array in number of pointers.
26 struct dma_fence **fences; member in struct:i915_deps
/linux-master/drivers/gpu/host1x/
H A Dintr.c35 if (!list_empty(&sp->fences.list)) {
36 fence = list_first_entry(&sp->fences.list, struct host1x_syncpt_fence, list);
47 struct host1x_fence_list *fence_list = &fence->sp->fences;
57 struct host1x_fence_list *fence_list = &fence->sp->fences;
83 spin_lock(&sp->fences.lock);
85 list_for_each_entry_safe(fence, tmp, &sp->fences.list, list) {
98 spin_unlock(&sp->fences.lock);
110 spin_lock_init(&syncpt->fences.lock);
111 INIT_LIST_HEAD(&syncpt->fences.list);
H A Dsyncpt.h43 struct host1x_fence_list fences; member in struct:host1x_syncpt
/linux-master/drivers/dma-buf/
H A Ddma-resv.c49 * can have any number of fences attaches to it. Each fence carries an usage
51 * resource. The RCU mechanism is used to protect read access to fences from
142 RCU_INIT_POINTER(obj->fences, NULL);
156 dma_resv_list_free(rcu_dereference_protected(obj->fences, true));
161 /* Dereference the fences while ensuring RCU rules */
164 return rcu_dereference_check(obj->fences, dma_resv_held(obj));
168 * dma_resv_reserve_fences - Reserve space to add fences to a dma_resv object.
170 * @num_fences: number of fences we want to add
221 * We are not changing the effective set of fences here so can
224 * active (unsignaled) fences
258 struct dma_resv_list *fences = dma_resv_fences_list(obj); local
561 dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences) argument
623 struct dma_fence **fences; local
[all...]
H A Ddma-fence-unwrap.c64 struct dma_fence **fences,
76 dma_fence_unwrap_for_each(tmp, &iter[i], fences[i]) {
106 fences[i] = dma_fence_unwrap_first(fences[i], &iter[i]);
117 while (fences[i] && dma_fence_is_signaled(fences[i]))
118 fences[i] = dma_fence_unwrap_next(&iter[i]);
120 next = fences[i];
125 * We can't guarantee that inpute fences are ordered by
128 * the fences b
63 __dma_fence_unwrap_merge(unsigned int num_fences, struct dma_fence **fences, struct dma_fence_unwrap *iter) argument
[all...]
H A Ddma-fence-array.c3 * dma-fence-array: aggregate fences to be waited together
32 * Propagate the first error reported by any of our fences, but only
87 if (dma_fence_add_callback(array->fences[i], &cb[i].cb,
89 int error = array->fences[i]->error;
120 dma_fence_put(array->fences[i]);
122 kfree(array->fences);
133 dma_fence_set_deadline(array->fences[i], deadline);
148 * @num_fences: [in] number of fences to add in the array
149 * @fences: [in] array containing the fences
165 dma_fence_array_create(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any) argument
[all...]
H A Dst-dma-fence-unwrap.c49 struct dma_fence **fences; local
53 fences = kcalloc(num_fences, sizeof(*fences), GFP_KERNEL);
54 if (!fences)
59 fences[i] = va_arg(valist, typeof(*fences));
62 array = dma_fence_array_create(num_fences, fences,
70 kfree(fences);
75 dma_fence_put(va_arg(valist, typeof(*fences)));
155 pr_err("Not all fences see
[all...]
H A Dst-dma-fence-chain.c102 struct dma_fence **fences; member in struct:fence_chains
124 fc->fences = kvmalloc_array(count, sizeof(*fc->fences),
126 if (!fc->fences) {
133 fc->fences[i] = mock_fence();
134 if (!fc->fences[i]) {
140 fc->fences[i],
157 dma_fence_put(fc->fences[i]);
160 kvfree(fc->fences);
171 dma_fence_signal(fc->fences[
[all...]
H A Dst-dma-resv.c228 cursor.fences = (void*)~0;
247 struct dma_fence *f, **fences = NULL; local
274 r = dma_resv_get_fences(&resv, usage, &i, &fences);
280 if (i != 1 || fences[0] != f) {
288 dma_fence_put(fences[i]);
289 kfree(fences);
H A Ddma-fence.c32 * fence context, this allows checking if fences belong to the same
39 * DOC: DMA fences overview
41 * DMA fences, represented by &struct dma_fence, are the kernel internal
47 * dma_fence_context_alloc(), and all fences on the same context are
50 * Since the purposes of fences is to facilitate cross-device and
53 * - Individual fences can be exposed as a &sync_file, accessed as a file
64 * implicit fences are stored in &struct dma_resv through the
77 * further command submission and force complete all in-flight fences, e.g.
86 * Drivers should not try to second guess timeout handling of fences from
91 * which completes the fences, wit
811 dma_fence_test_signaled_any(struct dma_fence **fences, uint32_t count, uint32_t *idx) argument
848 dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx) argument
[all...]
/linux-master/include/linux/
H A Ddma-fence-array.h29 * struct dma_fence_array - fence to represent an array of fences
32 * @num_fences: number of fences in the array
33 * @num_pending: fences in the array still pending
34 * @fences: array of the fences
43 struct dma_fence **fences; member in struct:dma_fence_array
65 * dma_fence_array_for_each - iterate over all fences in array
70 * Test if @array is a dma_fence_array object and if yes iterate over all fences
80 struct dma_fence **fences,
H A Ddma-fence-unwrap.h38 * dma_fence_unwrap_for_each - iterate over all fences in containers
44 * potential fences in them. If @head is just a normal fence only that one is
52 struct dma_fence **fences,
56 * dma_fence_unwrap_merge - unwrap and merge fences
58 * All fences given as parameters are unwrapped and merged back together as flat
65 * all the given fences otherwise.
H A Ddma-resv.h53 * enum dma_resv_usage - how the fences from a dma_resv obj are used
56 * controls which fences are returned when queried.
59 * when the dma_resv object is asked for fences for one use case the fences
62 * For example when asking for WRITE fences then the KERNEL fences are returned
63 * as well. Similar when asked for READ fences then both WRITE and KERNEL
64 * fences are returned as well.
66 * Already used fences can be promoted in the sense that a fence with
68 * with this usage. But fences ca
178 struct dma_resv_list __rcu *fences; member in struct:dma_resv
210 struct dma_resv_list *fences; member in struct:dma_resv_iter
[all...]
/linux-master/drivers/gpu/drm/xe/
H A Dxe_sched_job.c83 struct dma_fence **fences; local
120 fences = kmalloc_array(q->width, sizeof(*fences), GFP_KERNEL);
121 if (!fences) {
127 fences[j] = xe_lrc_create_seqno_fence(q->lrc + j);
128 if (IS_ERR(fences[j])) {
129 err = PTR_ERR(fences[j]);
134 cf = dma_fence_array_create(q->width, fences,
146 xe_assert(job_to_xe(job), cf->base.seqno == fences[j]->seqno);
169 dma_fence_put(fences[
[all...]
H A Dxe_sync.c283 * Get a fence from syncs, exec queue, and VM. If syncs contain in-fences create
284 * and return a composite fence of all in-fences + last fence. If no in-fences
294 struct dma_fence **fences = NULL; local
301 /* Count in-fences */
316 fences = kmalloc_array(num_in_fence + 1, sizeof(*fences), GFP_KERNEL);
317 if (!fences)
322 fences[current_fence++] = sync[i].fence;
325 fences[current_fenc
[all...]
/linux-master/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_sync.c54 hash_init(sync->fences);
137 hash_for_each_possible(sync->fences, e, node, f->context) {
169 hash_add(sync->fences, &e->node, f->context);
185 /* We only want to trigger KFD eviction fences on
186 * evict or move jobs. Skip KFD fences otherwise.
198 /* Ignore fences depending on the sync mode */
228 * @sync: sync object to add fences from reservation object to
230 * @mode: how owner affects which fences we sync to
287 hash_for_each_safe(sync->fences, i, tmp, e, node) {
296 /* For fences fro
[all...]
H A Damdgpu_sync.h43 * Container for fences used to sync command submissions.
46 DECLARE_HASHTABLE(fences, 4);
H A Damdgpu_ids.c99 * amdgpu_pasid_free_delayed - free pasid when fences signal
101 * @resv: reservation object with the fences to wait for
104 * Free the pasid only after all the fences in resv are signaled.
139 * block for all the fences to complete.
204 struct dma_fence **fences; local
212 fences = kmalloc_array(id_mgr->num_ids, sizeof(void *), GFP_KERNEL);
213 if (!fences)
223 fences[i] = amdgpu_sync_peek_fence(&(*idle)->active, r);
224 if (!fences[i])
238 dma_fence_get(fences[
[all...]
H A Damdgpu_fence.c185 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask];
299 ptr = &drv->fences[last_seq];
335 * amdgpu_fence_wait_empty - wait for all fences to signal
339 * Wait for all fences on the requested ring to signal (all asics).
340 * Returns 0 if the fences have passed, error for all other cases.
351 ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask];
372 * Wait for all fences on the requested ring to signal (all asics).
387 * amdgpu_fence_count_emitted - get the count of emitted fences
391 * Get the number of fences emitted on the requested ring (all asics).
392 * Returns the number of emitted fences o
[all...]
/linux-master/drivers/gpu/drm/
H A Ddrm_suballoc.c89 * Cleans up the suballocation manager after use. All fences added
225 struct dma_fence **fences,
248 fences[i] = NULL;
257 fences[i] = sa->fence;
316 struct dma_fence *fences[DRM_SUBALLOC_MAX_QUEUES]; local
353 } while (drm_suballoc_next_hole(sa_manager, fences, tries));
356 if (fences[i])
357 fences[count++] = dma_fence_get(fences[i]);
363 t = dma_fence_wait_any_timeout(fences, coun
224 drm_suballoc_next_hole(struct drm_suballoc_manager *sa_manager, struct dma_fence **fences, unsigned int *tries) argument
[all...]
/linux-master/drivers/gpu/drm/i915/selftests/
H A Di915_sw_fence.c228 /* Test a chain of fences, A waits on B who waits on C */
308 /* Test multiple fences (AB) waiting on a single event (C) */
453 struct i915_sw_fence **fences; local
456 /* Test a long chain of fences */
457 fences = kmalloc_array(nfences, sizeof(*fences), GFP_KERNEL);
458 if (!fences)
462 fences[i] = alloc_fence();
463 if (!fences[i]) {
470 ret = i915_sw_fence_await_sw_fence_gfp(fences[
[all...]
/linux-master/drivers/gpu/drm/virtio/
H A Dvirtgpu_fence.c111 list_add_tail(&fence->node, &drv->fences);
136 list_for_each_entry_safe(curr, tmp, &drv->fences, node) {
143 * Signal any fences with a strictly smaller sequence number
146 list_for_each_entry_safe(curr, tmp, &drv->fences, node) {
/linux-master/drivers/gpu/drm/i915/gem/
H A Di915_gem_execbuffer.c315 struct eb_fence *fences; member in struct:i915_execbuffer
1050 /* Reserve enough slots to accommodate composite fences */
2130 * using mandatory fences underneath. Currently the below
2791 __free_fence_array(struct eb_fence *fences, unsigned int n) argument
2794 drm_syncobj_put(ptr_mask_bits(fences[n].syncobj, 2));
2795 dma_fence_put(fences[n].dma_fence);
2796 dma_fence_chain_free(fences[n].chain_fence);
2798 kvfree(fences);
2830 f = krealloc(eb->fences,
2836 eb->fences
3009 put_fence_array(struct eb_fence *fences, int num_fences) argument
3204 struct dma_fence **fences; local
[all...]
H A Di915_gem_busy.c51 * Note we only report on the status of native fences and we currently
52 * have two native fences:
63 struct dma_fence **child = array->fences;
130 * non-i915 fences, i.e. even though we may report the object as idle,
135 * We trade the ability to warn of foreign fences to report on which
152 /* Translate the write fences to the READ *and* WRITE engine */
155 /* Translate read fences to READ set of engines */

Completed in 219 milliseconds

123