Skip to contentSkip to conversation

drm/amdgpu: Skip ring soft recovery when fence was NULL

PATCH In review wentalou 2 participants 2 messages Dec 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

wentalou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Skip ring soft recovery when fence was NULL

amdgpu_ring_soft_recovery would have Call-Trace, when s_fence->parent was NULL inside amdgpu_job_timedout. Check fence first, as drm_sched_hw_job_reset did.

Change-Id Ibb062e36feb4e2522a59641fe0d2d76b9773cda7
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -1
index 5b75bdc..335a0ed 100644
@@ -397,7 +397,7 @@ bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,
 {
 	ktime_t deadline = ktime_add_us(ktime_get(), 10000);
 
-	if (!ring->funcs->soft_recovery)
+	if (!ring->funcs->soft_recovery || !fence)
 		return false;
 
 	atomic_inc(&ring->adev->gpu_reset_counter);
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): 1544064170-12834-1-git-send-email-Wentao.Lou-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 06.12.18 um 03:42 schrieb wentalou:

Quoted 6 lines

amdgpu_ring_soft_recovery would have Call-Trace, when s_fence->parent was NULL inside amdgpu_job_timedout. Check fence first, as drm_sched_hw_job_reset did.

Change-Id Ibb062e36feb4e2522a59641fe0d2d76b9773cda7
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +0 -0
index 5b75bdc..335a0ed 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid, · line 403

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +1 -1
@@ -397,7 +397,7 @@ bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,
  {
  	ktime_t deadline = ktime_add_us(ktime_get(), 10000);
 
-	if (!ring->funcs->soft_recovery)
+	if (!ring->funcs->soft_recovery || !fence)
  		return false;
 
  	atomic_inc(&ring->adev->gpu_reset_counter);

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