Lines Matching refs:ev_fence
55 if (evf_mgr->ev_fence && in amdgpu_eviction_fence_replace_fence()
56 !dma_fence_is_signaled(&evf_mgr->ev_fence->base)) in amdgpu_eviction_fence_replace_fence()
75 old_ef = evf_mgr->ev_fence; in amdgpu_eviction_fence_replace_fence()
76 evf_mgr->ev_fence = new_ef; in amdgpu_eviction_fence_replace_fence()
108 struct amdgpu_eviction_fence *ev_fence; in amdgpu_eviction_fence_suspend_worker() local
112 ev_fence = evf_mgr->ev_fence; in amdgpu_eviction_fence_suspend_worker()
113 if (ev_fence) in amdgpu_eviction_fence_suspend_worker()
114 dma_fence_get(&ev_fence->base); in amdgpu_eviction_fence_suspend_worker()
119 amdgpu_userq_evict(uq_mgr, ev_fence); in amdgpu_eviction_fence_suspend_worker()
122 dma_fence_put(&ev_fence->base); in amdgpu_eviction_fence_suspend_worker()
133 struct amdgpu_eviction_fence *ev_fence; in amdgpu_eviction_fence_enable_signaling() local
138 ev_fence = to_ev_fence(f); in amdgpu_eviction_fence_enable_signaling()
139 evf_mgr = ev_fence->evf_mgr; in amdgpu_eviction_fence_enable_signaling()
152 struct amdgpu_eviction_fence *ev_fence) in amdgpu_eviction_fence_signal() argument
155 dma_fence_signal(&ev_fence->base); in amdgpu_eviction_fence_signal()
162 struct amdgpu_eviction_fence *ev_fence; in amdgpu_eviction_fence_create() local
164 ev_fence = kzalloc(sizeof(*ev_fence), GFP_KERNEL); in amdgpu_eviction_fence_create()
165 if (!ev_fence) in amdgpu_eviction_fence_create()
168 ev_fence->evf_mgr = evf_mgr; in amdgpu_eviction_fence_create()
169 get_task_comm(ev_fence->timeline_name, current); in amdgpu_eviction_fence_create()
170 spin_lock_init(&ev_fence->lock); in amdgpu_eviction_fence_create()
171 dma_fence_init64(&ev_fence->base, &amdgpu_eviction_fence_ops, in amdgpu_eviction_fence_create()
172 &ev_fence->lock, evf_mgr->ev_fence_ctx, in amdgpu_eviction_fence_create()
174 return ev_fence; in amdgpu_eviction_fence_create()
179 struct amdgpu_eviction_fence *ev_fence; in amdgpu_eviction_fence_destroy() local
185 ev_fence = evf_mgr->ev_fence; in amdgpu_eviction_fence_destroy()
188 if (!ev_fence) in amdgpu_eviction_fence_destroy()
191 dma_fence_wait(&ev_fence->base, false); in amdgpu_eviction_fence_destroy()
194 dma_fence_put(&ev_fence->base); in amdgpu_eviction_fence_destroy()
200 struct amdgpu_eviction_fence *ev_fence; in amdgpu_eviction_fence_attach() local
214 ev_fence = evf_mgr->ev_fence; in amdgpu_eviction_fence_attach()
215 if (ev_fence) in amdgpu_eviction_fence_attach()
216 dma_resv_add_fence(resv, &ev_fence->base, DMA_RESV_USAGE_BOOKKEEP); in amdgpu_eviction_fence_attach()