Commit 35a4279d authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Luben Tuikov

drm/sched: Rename drm_sched_run_job_queue_if_ready and clarify kerneldoc

"If ready" is not immediately clear what it means - is the scheduler
ready or something else? Drop the suffix, clarify kerneldoc, and employ
the same naming scheme as in drm_sched_run_free_queue:

 - drm_sched_run_job_queue   - enqueues if there is something to enqueue
                               *and* scheduler is ready (can queue)
 - __drm_sched_run_job_queue - low-level helper to simply queue the job
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-5-tvrtko.ursulin@linux.intel.comReviewed-by: default avatarLuben Tuikov <ltuikov89@gmail.com>
Signed-off-by: default avatarLuben Tuikov <ltuikov89@gmail.com>
parent 67dd1d8c
...@@ -256,10 +256,10 @@ drm_sched_rq_select_entity_fifo(struct drm_sched_rq *rq) ...@@ -256,10 +256,10 @@ drm_sched_rq_select_entity_fifo(struct drm_sched_rq *rq)
} }
/** /**
* drm_sched_run_job_queue - enqueue run-job work * __drm_sched_run_job_queue - enqueue run-job work
* @sched: scheduler instance * @sched: scheduler instance
*/ */
static void drm_sched_run_job_queue(struct drm_gpu_scheduler *sched) static void __drm_sched_run_job_queue(struct drm_gpu_scheduler *sched)
{ {
if (!READ_ONCE(sched->pause_submit)) if (!READ_ONCE(sched->pause_submit))
queue_work(sched->submit_wq, &sched->work_run_job); queue_work(sched->submit_wq, &sched->work_run_job);
...@@ -928,7 +928,7 @@ static bool drm_sched_can_queue(struct drm_gpu_scheduler *sched) ...@@ -928,7 +928,7 @@ static bool drm_sched_can_queue(struct drm_gpu_scheduler *sched)
void drm_sched_wakeup_if_can_queue(struct drm_gpu_scheduler *sched) void drm_sched_wakeup_if_can_queue(struct drm_gpu_scheduler *sched)
{ {
if (drm_sched_can_queue(sched)) if (drm_sched_can_queue(sched))
drm_sched_run_job_queue(sched); __drm_sched_run_job_queue(sched);
} }
/** /**
...@@ -1041,13 +1041,13 @@ drm_sched_pick_best(struct drm_gpu_scheduler **sched_list, ...@@ -1041,13 +1041,13 @@ drm_sched_pick_best(struct drm_gpu_scheduler **sched_list,
EXPORT_SYMBOL(drm_sched_pick_best); EXPORT_SYMBOL(drm_sched_pick_best);
/** /**
* drm_sched_run_job_queue_if_ready - enqueue run-job work if ready * drm_sched_run_job_queue - enqueue run-job work if there are ready entities
* @sched: scheduler instance * @sched: scheduler instance
*/ */
static void drm_sched_run_job_queue_if_ready(struct drm_gpu_scheduler *sched) static void drm_sched_run_job_queue(struct drm_gpu_scheduler *sched)
{ {
if (drm_sched_select_entity(sched)) if (drm_sched_select_entity(sched))
drm_sched_run_job_queue(sched); __drm_sched_run_job_queue(sched);
} }
/** /**
...@@ -1069,7 +1069,7 @@ static void drm_sched_free_job_work(struct work_struct *w) ...@@ -1069,7 +1069,7 @@ static void drm_sched_free_job_work(struct work_struct *w)
sched->ops->free_job(job); sched->ops->free_job(job);
drm_sched_run_free_queue(sched); drm_sched_run_free_queue(sched);
drm_sched_run_job_queue_if_ready(sched); drm_sched_run_job_queue(sched);
} }
/** /**
...@@ -1126,7 +1126,7 @@ static void drm_sched_run_job_work(struct work_struct *w) ...@@ -1126,7 +1126,7 @@ static void drm_sched_run_job_work(struct work_struct *w)
} }
wake_up(&sched->job_scheduled); wake_up(&sched->job_scheduled);
drm_sched_run_job_queue_if_ready(sched); drm_sched_run_job_queue(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