Lines Matching defs:fence
26 #include <linux/dma-fence-array.h>
43 /* Helper to free pasid from a fence callback */
88 static void amdgpu_pasid_free_cb(struct dma_fence *fence,
95 dma_fence_put(fence);
111 struct dma_fence *fence;
114 r = dma_resv_get_singleton(resv, DMA_RESV_USAGE_BOOKKEEP, &fence);
118 if (!fence) {
126 dma_fence_wait(fence, false);
127 dma_fence_put(fence);
131 if (dma_fence_add_callback(fence, &cb->cb,
133 amdgpu_pasid_free_cb(fence, &cb->cb);
194 * @fence: fence to wait for if no id could be grabbed
196 * Try to find an idle VMID, if none is idle add a fence to wait to the sync
202 struct dma_fence **fence)
211 *fence = dma_fence_get(ring->vmid_wait);
252 *fence = dma_fence_get(&array->base);
269 * @fence: fence to wait for if no id could be grabbed
277 struct dma_fence **fence)
305 *fence = dma_fence_get(tmp);
330 * @fence: fence to wait for if no id could be grabbed
338 struct dma_fence **fence)
393 * @fence: fence to wait for if no id could be grabbed
398 struct amdgpu_job *job, struct dma_fence **fence)
408 r = amdgpu_vmid_grab_idle(vm, ring, &idle, fence);
413 r = amdgpu_vmid_grab_reserved(vm, ring, job, &id, fence);
417 r = amdgpu_vmid_grab_used(vm, ring, job, &id, fence);