summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-07-12 13:57:03 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-07-14 16:46:07 -0400
commit2ef004d984226fb6845481bc928ae37fb1dacc5e (patch)
treecf108cf6da68b481e69d42f939d00d23a42d7136 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
parent090b767e97fcdabe8ecd71cf43e7d39d94e6cfef (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index e320b5b73ac6..0b109aebfec6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -204,10 +204,13 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)
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;
@@ -228,7 +231,7 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)
BUG();
fence_put(fence);
- }
+ } while (last_seq != seq);
}
/**