From: Andrey Grodzovsky Date: Mon, 24 Sep 2018 12:10:22 +0000 (+0200) Subject: drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 X-Git-Tag: v4.20-rc1~81^2~17^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3547e3cf1976e6ff72098c8f8e7e4a1c3e727e1d;p=thirdparty%2Flinux.git drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warning message a bit and only re-activate the timer during processing if it was already activated before. (Christian) Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig Reviewed-and-Tested-by: Andrey Grodzovsky Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad15..4e6e9c9654dd7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(&drv->last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(&ring->fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); }