A little fallout from "drm/amdgpu: sanitize fence numbers", we
sometimes need to signal all fences in the ring.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (seq != ring->fence_drv.sync_seq)
amdgpu_fence_schedule_fallback(ring);
+ if (unlikely(seq == last_seq))
+ return;
+
last_seq &= drv->num_fences_mask;
seq &= drv->num_fences_mask;
- while (last_seq != seq) {
+ do {
struct fence *fence, **ptr;
++last_seq;
BUG();
fence_put(fence);
- }
+ } while (last_seq != seq);
}
/**