Commit e608d9f7 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Luben Tuikov

drm/sched: Move free worker re-queuing out of the if block

Whether or not there are more jobs to clean up does not depend on the
existance of the current job, given both drm_sched_get_finished_job and
drm_sched_free_job_queue_if_done take and drop the job list lock.
Therefore it is confusing to make it read like there is a dependency.
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Luben Tuikov <ltuikov89@gmail.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-3-tvrtko.ursulin@linux.intel.comReviewed-by: default avatarLuben Tuikov <ltuikov89@gmail.com>
Signed-off-by: default avatarLuben Tuikov <ltuikov89@gmail.com>
parent 7abbbe26
...@@ -1065,12 +1065,11 @@ static void drm_sched_free_job_work(struct work_struct *w) ...@@ -1065,12 +1065,11 @@ static void drm_sched_free_job_work(struct work_struct *w)
return; return;
job = drm_sched_get_finished_job(sched); job = drm_sched_get_finished_job(sched);
if (job) { if (job)
sched->ops->free_job(job); sched->ops->free_job(job);
drm_sched_free_job_queue_if_done(sched); drm_sched_free_job_queue_if_done(sched);
drm_sched_run_job_queue_if_ready(sched); drm_sched_run_job_queue_if_ready(sched);
}
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment