Skip to contentSkip to conversation

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

PATCH In review wentalou 2 participants 2 messages Dec 5, 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 parent was NULL

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

Change-Id I0b674ffd96afd44bcefe37a66fb157b1dbba61a0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -1
index e0af44f..2945615 100644
@@ -33,7 +33,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
 	struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
 	struct amdgpu_job *job = to_amdgpu_job(s_job);
 
-	if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
+	if (s_job->s_fence->parent && amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
 		DRM_ERROR("ring %s timeout, but soft recovered\n",
 			  s_job->sched->name);
 		return;
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): 1544007825-10610-1-git-send-email-Wentao.Lou-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 05.12.18 um 12:03 schrieb wentalou:

Quoted 15 lines

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

Change-Id I0b674ffd96afd44bcefe37a66fb157b1dbba61a0
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
index e0af44f..2945615 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_timedout(struct drm_sched_job *s_job) · line 36

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -1
@@ -33,7 +33,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
  	struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
  	struct amdgpu_job *job = to_amdgpu_job(s_job);
 
-	if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
+	if (s_job->s_fence->parent && amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {

Of hand that line looks to long to me, but apart from that the patch looks good.

Maybe add the NULL check to amdgpu_ring_soft_recovery instead?

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_timedout(struct drm_sched_job *s_job) · line 39

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
  		DRM_ERROR("ring %s timeout, but soft recovered\n",
  			  s_job->sched->name);
  		return;

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