diff options
| author | Christian König <christian.koenig@amd.com> | 2026-02-02 15:06:25 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-03-23 21:06:01 +0300 |
| commit | fc61df1516178958d7e61ec52c05257d92e9f2e8 (patch) | |
| tree | e16dc241d5bf3029411c873c6f7cea1f31b350fd | |
| parent | 809773e06692b9feef372c56ca0747cce9bbf860 (diff) | |
| download | linux-fc61df1516178958d7e61ec52c05257d92e9f2e8.tar.xz | |
drm/amdgpu: annotate eviction fence signaling path
Make sure lockdep sees the dependencies here.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c index 55e8b9cc2f9f..9ca21a32bc98 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c @@ -64,8 +64,17 @@ amdgpu_eviction_fence_suspend_worker(struct work_struct *work) container_of(evf_mgr, struct amdgpu_fpriv, evf_mgr); struct amdgpu_userq_mgr *uq_mgr = &fpriv->userq_mgr; struct dma_fence *ev_fence; + bool cookie; mutex_lock(&uq_mgr->userq_mutex); + + /* + * This is intentionally after taking the userq_mutex since we do + * allocate memory while holding this lock, but only after ensuring that + * the eviction fence is signaled. + */ + cookie = dma_fence_begin_signalling(); + ev_fence = amdgpu_evf_mgr_get_fence(evf_mgr); amdgpu_userq_evict(uq_mgr, !evf_mgr->shutdown); @@ -75,6 +84,7 @@ amdgpu_eviction_fence_suspend_worker(struct work_struct *work) * next fence. */ dma_fence_signal(ev_fence); + dma_fence_end_signalling(cookie); dma_fence_put(ev_fence); mutex_unlock(&uq_mgr->userq_mutex); } |
