Lines Matching defs:sync

46  * amdgpu_sync_create - zero init sync object
48 * @sync: sync object to initialize
50 * Just clear the sync object for now.
52 void amdgpu_sync_create(struct amdgpu_sync *sync)
54 hash_init(sync->fences);
127 * @sync: sync object to add the fence to
133 static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f)
137 hash_for_each_possible(sync->fences, e, node, f->context) {
148 * amdgpu_sync_fence - remember to sync to this fence
150 * @sync: sync object to add fence to
151 * @f: fence to sync to
153 * Add the fence to the sync object.
155 int amdgpu_sync_fence(struct amdgpu_sync *sync, struct dma_fence *f)
162 if (amdgpu_sync_add_later(sync, f))
169 hash_add(sync->fences, &e->node, f->context);
174 /* Determine based on the owner and mode if we should sync to a fence or not */
181 /* Always sync to moves, no matter what */
192 /* Never sync to VM updates either. */
198 /* Ignore fences depending on the sync mode */
220 "Adding eviction fence to sync obj");
225 * amdgpu_sync_resv - sync to a reservation object
228 * @sync: sync object to add fences from reservation object to
230 * @mode: how owner affects which fences we sync to
235 int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
252 r = amdgpu_sync_fence(sync, f);
274 * @sync: the sync object
277 * Returns the next fence not signaled yet without removing it from the sync
280 struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
287 hash_for_each_safe(sync->fences, i, tmp, e, node) {
314 * amdgpu_sync_get_fence - get the next fence from the sync object
316 * @sync: sync object to use
318 * Get and removes the next fence from the sync object not signaled yet.
320 struct dma_fence *amdgpu_sync_get_fence(struct amdgpu_sync *sync)
327 hash_for_each_safe(sync->fences, i, tmp, e, node) {
343 * amdgpu_sync_clone - clone a sync object
345 * @source: sync object to clone
346 * @clone: pointer to destination sync object
374 * @sync: sync object to get the fences from
377 * Add all unsignaled fences from sync to job.
379 int amdgpu_sync_push_to_job(struct amdgpu_sync *sync, struct amdgpu_job *job)
386 hash_for_each_safe(sync->fences, i, tmp, e, node) {
403 int amdgpu_sync_wait(struct amdgpu_sync *sync, bool intr)
409 hash_for_each_safe(sync->fences, i, tmp, e, node) {
421 * amdgpu_sync_free - free the sync object
423 * @sync: sync object to use
425 * Free the sync object.
427 void amdgpu_sync_free(struct amdgpu_sync *sync)
433 hash_for_each_safe(sync->fences, i, tmp, e, node)
438 * amdgpu_sync_init - init sync object subsystem
452 * amdgpu_sync_fini - fini sync object subsystem