summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/scheduler/sched_fence.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2016-03-04 09:33:44 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-05-02 22:17:53 +0300
commit4835096b07420c1d74cc5711c461830016e6cb03 (patch)
treef52f4f47daa5a5319ad9823a0cdfe75394314236 /drivers/gpu/drm/amd/scheduler/sched_fence.c
parente472d2588eef38c2f16f71d6160e58fb5948e84f (diff)
downloadlinux-4835096b07420c1d74cc5711c461830016e6cb03.tar.xz
drm/amdgpu: put job to list before done
the mirror_list will be used for later time out detect feature. This is needed to properly detect a GPU timeout with the scheduler. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/sched_fence.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/sched_fence.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/sched_fence.c b/drivers/gpu/drm/amd/scheduler/sched_fence.c
index dc115aea352b..33ddd38185d5 100644
--- a/drivers/gpu/drm/amd/scheduler/sched_fence.c
+++ b/drivers/gpu/drm/amd/scheduler/sched_fence.c
@@ -57,6 +57,15 @@ void amd_sched_fence_signal(struct amd_sched_fence *fence)
FENCE_TRACE(&fence->base, "was already signaled\n");
}
+void amd_sched_job_pre_schedule(struct amd_gpu_scheduler *sched ,
+ struct amd_sched_job *s_job)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&sched->job_list_lock, flags);
+ list_add_tail(&s_job->node, &sched->ring_mirror_list);
+ spin_unlock_irqrestore(&sched->job_list_lock, flags);
+}
+
void amd_sched_fence_scheduled(struct amd_sched_fence *s_fence)
{
struct fence_cb *cur, *tmp;