diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-05-11 01:59:15 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:40:41 -0400 |
commit | 4f059ecdcec2dd6fab757a16cc552093bfd321ee (patch) | |
tree | d7cafdf6d2d308a22af7a2fa918dd3662d8b8cb8 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 65781c78ad74e4260fbec92c0ecc05738044e177 (diff) |
drm/amdgpu:use job's list instead of check fence
because if the fence is really signaled, it could already
released so the fence pointer is a wild pointer, but if
we use job->base.node we are safe because job will not
be released untill amdgpu_job_timedout finished.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 8b0f4864a885..d1385eba6f43 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2644,9 +2644,9 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job) | |||
2644 | if (job && j != i) | 2644 | if (job && j != i) |
2645 | continue; | 2645 | continue; |
2646 | 2646 | ||
2647 | /* here give the last chance to check if fence signaled | 2647 | /* here give the last chance to check if job removed from mirror-list |
2648 | * since we already pay some time on kthread_park */ | 2648 | * since we already pay some time on kthread_park */ |
2649 | if (job && dma_fence_is_signaled(&job->base.s_fence->finished)) { | 2649 | if (job && list_empty(&job->base.node)) { |
2650 | kthread_unpark(ring->sched.thread); | 2650 | kthread_unpark(ring->sched.thread); |
2651 | goto give_up_reset; | 2651 | goto give_up_reset; |
2652 | } | 2652 | } |