diff options
author | wentalou <Wentao.Lou@amd.com> | 2018-12-06 10:29:52 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-07 17:53:47 -0500 |
commit | 49ebca798696a6a5da02a562cd1fd0e645264511 (patch) | |
tree | c170ca7f263397abf2d5ba8641e1930338e196cf /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | 53450efd6eb9e3155e16c14ce2ece387fc2d65e7 (diff) | |
download | linux-49ebca798696a6a5da02a562cd1fd0e645264511.tar.bz2 |
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.
Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 5b75bdc8dc28..335a0edf114b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -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); |