Skip to contentSkip to conversation

drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process

PATCH In review Andrey Grodzovsky 2 participants 2 messages Sep 23, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process

Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -1
index 1ae2583..9512248 100644
@@ -231,6 +231,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)
 
 	if (seq != ring->fence_drv.sync_seq)
 		amdgpu_fence_schedule_fallback(ring);
+	else
+		del_timer(&ring->fence_drv.fallback_timer);
 
 	if (unlikely(seq == last_seq))
 		return;
@@ -274,7 +276,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("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name);
 	amdgpu_fence_process(ring);
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1537673129-8345-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 23.09.2018 um 05:25 schrieb Andrey Grodzovsky:

Quoted 14 lines

Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index 1ae2583..9512248 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c void amdgpu_fence_process(struct amdgpu_ring *ring) · line 235

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -0
@@ -231,6 +231,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)
 
  	if (seq != ring->fence_drv.sync_seq)
  		amdgpu_fence_schedule_fallback(ring);
+	else
+		del_timer(&ring->fence_drv.fallback_timer);

Thinking more about it I came to the conclusion that this still isn't 100% correct.

We only want the fallback to be running when signaling is explicitly enabled. So if I'm not completely mistaken that rather should look like this:

if (del_timer(&ring->fence_drv.fallback_timer) &&
    seq != ring->fence_drv.sync_seq)
        amdgpu_fence_schedule_fallback(ring);

Regards,
Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c static void amdgpu_fence_fallback(struct timer_list *t) · line 282

Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +1 -1
  	if (unlikely(seq == last_seq))
  		return;
@@ -274,7 +276,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("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name);
  	amdgpu_fence_process(ring);
  }
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx