From: Nicolai Hähnle <nicolai.haehnle@xxxxxxx> The function does not actually remove the job from the FIFO, so "peek" describes it better. Signed-off-by: Nicolai Hähnle <nicolai.haehnle at amd.com> --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 97c94f9683fa..742d724cd720 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -301,21 +301,21 @@ static bool amd_sched_entity_add_dependency_cb(struct amd_sched_entity *entity) if (!dma_fence_add_callback(entity->dependency, &entity->cb, amd_sched_entity_wakeup)) return true; dma_fence_put(entity->dependency); return false; } static struct amd_sched_job * -amd_sched_entity_pop_job(struct amd_sched_entity *entity) +amd_sched_entity_peek_job(struct amd_sched_entity *entity) { struct amd_gpu_scheduler *sched = entity->sched; struct amd_sched_job *sched_job; if (!kfifo_out_peek(&entity->job_queue, &sched_job, sizeof(sched_job))) return NULL; while ((entity->dependency = sched->ops->dependency(sched_job))) if (amd_sched_entity_add_dependency_cb(entity)) return NULL; @@ -593,21 +593,21 @@ static int amd_sched_main(void *param) struct dma_fence *fence; wait_event_interruptible(sched->wake_up_worker, (!amd_sched_blocked(sched) && (entity = amd_sched_select_entity(sched))) || kthread_should_stop()); if (!entity) continue; - sched_job = amd_sched_entity_pop_job(entity); + sched_job = amd_sched_entity_peek_job(entity); if (!sched_job) continue; s_fence = sched_job->s_fence; atomic_inc(&sched->hw_rq_count); amd_sched_job_begin(sched_job); fence = sched->ops->run_job(sched_job); amd_sched_fence_scheduled(s_fence); -- 2.11.0