[PATCH 11/13] drm/amd: wait neccessary dependency before running job
Chunming Zhou
David1.Zhou at amd.com
Tue Aug 2 07:49:05 UTC 2016
Change-Id: Ibcc3558c2330caad1a2edb9902b3f21bd950d19f
Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
---
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 71b5f1a..a15fd88 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -436,9 +436,13 @@ 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_put(dependency);
+ }
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