drm/amdgpu: Skip ring soft recovery when fence parent was NULL
Subsystems (2)
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.
--- 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
@@ -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
Am 05.12.18 um 12:03 schrieb wentalou:
Quoted 15 lines
amdgpu_ring_soft_recoverywould have Call-Trace,
whens_job->s_fence->parentwas NULL insideamdgpu_job_timedout. Check parent first, asdrm_sched_hw_job_resetdid.Change-Id I0b674ffd96afd44bcefe37a66fb157b1dbba61a0Signed-off-by Wentao Lou <[email protected]>--- 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
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
-0DRM_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