diff options
author | Luben Tuikov <luben.tuikov@amd.com> | 2023-05-18 01:35:49 +0200 |
---|---|---|
committer | Luben Tuikov <luben.tuikov@amd.com> | 2023-05-19 18:03:38 +0200 |
commit | e072700869dd96405a9c3752d3741a79bca6e2e2 (patch) | |
tree | 558d728adafa7066c391bf2a9eef598f05abec47 /drivers/gpu/drm/scheduler | |
parent | fbdev: Rename fb_mem*() helpers (diff) | |
download | linux-e072700869dd96405a9c3752d3741a79bca6e2e2.tar.xz linux-e072700869dd96405a9c3752d3741a79bca6e2e2.zip |
drm/sched: Rename to drm_sched_can_queue()
Rename drm_sched_ready() to drm_sched_can_queue(). "ready" can mean many
things and is thus meaningless in this context. Instead, rename to a name
which precisely conveys what is being checked.
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Link: https://lore.kernel.org/r/20230517233550.377847-1-luben.tuikov@amd.com
Diffstat (limited to 'drivers/gpu/drm/scheduler')
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 172e63c87bfc..8739322c3032 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -848,13 +848,12 @@ void drm_sched_job_cleanup(struct drm_sched_job *job) EXPORT_SYMBOL(drm_sched_job_cleanup); /** - * drm_sched_ready - is the scheduler ready - * + * drm_sched_can_queue -- Can we queue more to the hardware? * @sched: scheduler instance * * Return true if we can push more jobs to the hw, otherwise false. */ -static bool drm_sched_ready(struct drm_gpu_scheduler *sched) +static bool drm_sched_can_queue(struct drm_gpu_scheduler *sched) { return atomic_read(&sched->hw_rq_count) < sched->hw_submission_limit; @@ -868,7 +867,7 @@ static bool drm_sched_ready(struct drm_gpu_scheduler *sched) */ void drm_sched_wakeup(struct drm_gpu_scheduler *sched) { - if (drm_sched_ready(sched)) + if (drm_sched_can_queue(sched)) wake_up_interruptible(&sched->wake_up_worker); } @@ -885,7 +884,7 @@ drm_sched_select_entity(struct drm_gpu_scheduler *sched) struct drm_sched_entity *entity; int i; - if (!drm_sched_ready(sched)) + if (!drm_sched_can_queue(sched)) return NULL; /* Kernel run queue has higher priority than normal run queue*/ |