Skip to content
Snippets Groups Projects
Commit 7f11c59e authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: overwrite signaled fence in amdgpu_sync


This allows using amdgpu_sync even without peeking into the fences for a
long time.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 16590745
No related branches found
No related tags found
No related merge requests found
......@@ -135,11 +135,16 @@ static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f)
struct amdgpu_sync_entry *e;
hash_for_each_possible(sync->fences, e, node, f->context) {
if (unlikely(e->fence->context != f->context))
continue;
if (dma_fence_is_signaled(e->fence)) {
dma_fence_put(e->fence);
e->fence = dma_fence_get(f);
return true;
}
amdgpu_sync_keep_later(&e->fence, f);
return true;
if (likely(e->fence->context == f->context)) {
amdgpu_sync_keep_later(&e->fence, f);
return true;
}
}
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment