Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: always signal all fences

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>

authored by

Christian König and committed by
Alex Deucher
2ef004d9 090b767e

+5 -2
+5 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
··· 204 204 if (seq != ring->fence_drv.sync_seq) 205 205 amdgpu_fence_schedule_fallback(ring); 206 206 207 + if (unlikely(seq == last_seq)) 208 + return; 209 + 207 210 last_seq &= drv->num_fences_mask; 208 211 seq &= drv->num_fences_mask; 209 212 210 - while (last_seq != seq) { 213 + do { 211 214 struct fence *fence, **ptr; 212 215 213 216 ++last_seq; ··· 231 228 BUG(); 232 229 233 230 fence_put(fence); 234 - } 231 + } while (last_seq != seq); 235 232 } 236 233 237 234 /**