summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stanner <phasta@kernel.org>2025-10-28 14:46:01 +0100
committerPhilipp Stanner <phasta@kernel.org>2025-10-31 11:09:00 +0100
commit437b30db77460a3af41d4fd0398bd6ff03f910ae (patch)
tree969e8dc2a6ddeff38f58e33c507f0b29fd27ae2d
parent402b3a865090578f9245115e17ee230e01daf60e (diff)
drm/sched: Fix comment in drm_sched_run_job_work()
drm_sched_run_job_work() contains a comment which explains that an entity being NULL means that there is no more work to do. It can, however, also mean that there is work, but the scheduler doesn't have enough credits to process the jobs right now. Provide this detail in the comment. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20251028134602.94125-3-phasta@kernel.org
-rw-r--r--drivers/gpu/drm/scheduler/sched_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index c39f0245e3a9..492e8af639db 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -1237,8 +1237,13 @@ static void drm_sched_run_job_work(struct work_struct *w)
/* Find entity with a ready job */
entity = drm_sched_select_entity(sched);
- if (!entity)
- return; /* No more work */
+ if (!entity) {
+ /*
+ * Either no more work to do, or the next ready job needs more
+ * credits than the scheduler has currently available.
+ */
+ return;
+ }
sched_job = drm_sched_entity_pop_job(entity);
if (!sched_job) {