[PATCH 12/14] drm/amd: wait neccessary dependency before running job
Chunming Zhou
David1.Zhou at amd.com
Wed Jul 27 06:38:16 UTC 2016
Change-Id: Ibcc3558c2330caad1a2edb9902b3f21bd950d19f
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 33640ca..1e824f4 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -442,9 +442,12 @@ void amd_sched_job_recovery(struct amd_gpu_scheduler *sched)
list_for_each_entry_safe(s_job, tmp, &sched->ring_mirror_list, node) {
struct amd_sched_fence *s_fence = s_job->s_fence;
- struct fence *fence;
+ struct fence *fence, *dependency;
spin_unlock(&sched->job_list_lock);
+ while ((dependency = sched->ops->dependency(s_job)))
+ fence_wait(dependency, false);
+
fence = sched->ops->run_job(s_job);
atomic_inc(&sched->hw_rq_count);
if (fence) {
--
1.9.1
More information about the amd-gfx
mailing list