]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/sched: Delete unused update_job_credits
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fri, 10 Jan 2025 11:13:01 +0000 (11:13 +0000)
committerPhilipp Stanner <phasta@kernel.org>
Mon, 13 Jan 2025 09:35:44 +0000 (10:35 +0100)
No driver is using the update_job_credits() schduler vfunc
so lets remove it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <pstanner@redhat.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250110111301.76909-1-tvrtko.ursulin@igalia.com
drivers/gpu/drm/scheduler/sched_main.c
include/drm/gpu_scheduler.h

index 57da84908752c68af7e5c77f9cb503673717f52d..81d69c2ff6ab15daae3265c9ab86dea71be17191 100644 (file)
  * credit limit, the job won't be executed. Instead, the scheduler will wait
  * until the credit count has decreased enough to not overflow its credit limit.
  * This implies waiting for previously executed jobs.
- *
- * Optionally, drivers may register a callback (update_job_credits) provided by
- * struct drm_sched_backend_ops to update the job's credits dynamically. The
- * scheduler executes this callback every time the scheduler considers a job for
- * execution and subsequently checks whether the job fits the scheduler's credit
- * limit.
  */
 
 #include <linux/wait.h>
@@ -133,13 +127,6 @@ static bool drm_sched_can_queue(struct drm_gpu_scheduler *sched,
        if (!s_job)
                return false;
 
-       if (sched->ops->update_job_credits) {
-               s_job->credits = sched->ops->update_job_credits(s_job);
-
-               drm_WARN(sched, !s_job->credits,
-                        "Jobs with zero credits bypass job-flow control.\n");
-       }
-
        /* If a job exceeds the credit limit, truncate it to the credit limit
         * itself to guarantee forward progress.
         */
index 95e17504e46a383ca15d1015b6d524b768bc8f45..e2e6af8849c6450aaae324a20df3be7390ca89c3 100644 (file)
@@ -476,19 +476,6 @@ struct drm_sched_backend_ops {
          * and it's time to clean it up.
         */
        void (*free_job)(struct drm_sched_job *sched_job);
-
-       /**
-        * @update_job_credits: Called when the scheduler is considering this
-        * job for execution.
-        *
-        * This callback returns the number of credits the job would take if
-        * pushed to the hardware. Drivers may use this to dynamically update
-        * the job's credit count. For instance, deduct the number of credits
-        * for already signalled native fences.
-        *
-        * This callback is optional.
-        */
-       u32 (*update_job_credits)(struct drm_sched_job *sched_job);
 };
 
 /**