Lines Matching refs:fence
52 struct amd_sched_fence *fence = NULL; in amd_sched_fence_create() local
55 fence = kmem_cache_zalloc(sched_fence_slab, GFP_KERNEL); in amd_sched_fence_create()
56 if (fence == NULL) in amd_sched_fence_create()
59 fence->owner = owner; in amd_sched_fence_create()
60 fence->sched = entity->sched; in amd_sched_fence_create()
61 spin_lock_init(&fence->lock); in amd_sched_fence_create()
64 dma_fence_init(&fence->scheduled, &amd_sched_fence_ops_scheduled, in amd_sched_fence_create()
65 &fence->lock, entity->fence_context, seq); in amd_sched_fence_create()
66 dma_fence_init(&fence->finished, &amd_sched_fence_ops_finished, in amd_sched_fence_create()
67 &fence->lock, entity->fence_context + 1, seq); in amd_sched_fence_create()
69 return fence; in amd_sched_fence_create()
72 void amd_sched_fence_scheduled(struct amd_sched_fence *fence) in amd_sched_fence_scheduled() argument
74 int ret = dma_fence_signal(&fence->scheduled); in amd_sched_fence_scheduled()
77 DMA_FENCE_TRACE(&fence->scheduled, in amd_sched_fence_scheduled()
80 DMA_FENCE_TRACE(&fence->scheduled, in amd_sched_fence_scheduled()
84 void amd_sched_fence_finished(struct amd_sched_fence *fence) in amd_sched_fence_finished() argument
86 int ret = dma_fence_signal(&fence->finished); in amd_sched_fence_finished()
89 DMA_FENCE_TRACE(&fence->finished, in amd_sched_fence_finished()
92 DMA_FENCE_TRACE(&fence->finished, in amd_sched_fence_finished()
96 static const char *amd_sched_fence_get_driver_name(struct dma_fence *fence) in amd_sched_fence_get_driver_name() argument
103 struct amd_sched_fence *fence = to_amd_sched_fence(f); in amd_sched_fence_get_timeline_name() local
104 return (const char *)fence->sched->name; in amd_sched_fence_get_timeline_name()
122 struct amd_sched_fence *fence = to_amd_sched_fence(f); in amd_sched_fence_free() local
124 dma_fence_put(fence->parent); in amd_sched_fence_free()
125 kmem_cache_free(sched_fence_slab, fence); in amd_sched_fence_free()
138 struct amd_sched_fence *fence = to_amd_sched_fence(f); in amd_sched_fence_release_scheduled() local
140 call_rcu(&fence->finished.rcu, amd_sched_fence_free); in amd_sched_fence_release_scheduled()
152 struct amd_sched_fence *fence = to_amd_sched_fence(f); in amd_sched_fence_release_finished() local
154 dma_fence_put(&fence->scheduled); in amd_sched_fence_release_finished()