Re: [RFC 01/14] drm/sched: Delete unused update_job_credits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 8 Jan 2025 09:34:11 +0100
Danilo Krummrich <dakr@xxxxxxxxxx> wrote:

> On Mon, Dec 30, 2024 at 04:52:46PM +0000, Tvrtko Ursulin wrote:
> > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx>
> > 
> > No driver is using the update_job_credits() schduler vfunc
> > so lets remove it.
> > 
> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx>  
> 
> (+ Boris)
> 
> AFAIR the panthor folks asked for this. I assume they never actually ended up
> using it? Unless they plan to use it,

+Frank

That was for the PowerVR driver, and it doesn't seem it's been hooked
up there. I don't think we'll ever need it in panthor, so

Acked-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>

> 
> Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> 
> > Cc: Christian König <christian.koenig@xxxxxxx>
> > Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
> > Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
> > Cc: Philipp Stanner <pstanner@xxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/scheduler/sched_main.c | 13 -------------
> >  include/drm/gpu_scheduler.h            | 13 -------------
> >  2 files changed, 26 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> > index 7ce25281c74c..1734c17aeea5 100644
> > --- a/drivers/gpu/drm/scheduler/sched_main.c
> > +++ b/drivers/gpu/drm/scheduler/sched_main.c
> > @@ -64,12 +64,6 @@
> >   * 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.
> >  	 */
> > diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
> > index 95e17504e46a..e2e6af8849c6 100644
> > --- a/include/drm/gpu_scheduler.h
> > +++ b/include/drm/gpu_scheduler.h
> > @@ -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);
> >  };
> >  
> >  /**
> > -- 
> > 2.47.1
> >   
> 





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux