On Wed, 2025-10-08 at 09:53 +0100, Tvrtko Ursulin wrote:
> Helper operates on the run queue so lets make that the primary argument.
>
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> Cc: Christian König <[email protected]>
> Cc: Danilo Krummrich <[email protected]>
> Cc: Matthew Brost <[email protected]>
> Cc: Philipp Stanner <[email protected]>
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
That's a new patch from the RFC, isn't it?
And it's a general code improvement that is not related to CFS. I think
I mentioned it a few times already that a series is easier to review
and workflows are simplified if generic-improvement patches are
branched out and sent separately.
I thought you had agreed with that?
P.
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c
> b/drivers/gpu/drm/scheduler/sched_main.c
> index 46119aacb809..8b8c55b25762 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -174,13 +174,13 @@ void drm_sched_rq_update_fifo_locked(struct
> drm_sched_entity *entity,
> /**
> * drm_sched_rq_init - initialize a given run queue struct
> *
> + * @rq: scheduler run queue
> * @sched: scheduler instance to associate with this run queue
> - * @rq: scheduler run queue
> *
> * Initializes a scheduler runqueue.
> */
> -static void drm_sched_rq_init(struct drm_gpu_scheduler *sched,
> - struct drm_sched_rq *rq)
> +static void drm_sched_rq_init(struct drm_sched_rq *rq,
> + struct drm_gpu_scheduler *sched)
> {
> spin_lock_init(&rq->lock);
> INIT_LIST_HEAD(&rq->entities);
> @@ -1353,7 +1353,7 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
> const struct drm_sched_init_
> sched->sched_rq[i] = kzalloc(sizeof(*sched->sched_rq[i]),
> GFP_KERNEL);
> if (!sched->sched_rq[i])
> goto Out_unroll;
> - drm_sched_rq_init(sched, sched->sched_rq[i]);
> + drm_sched_rq_init(sched->sched_rq[i], sched);
> }
>
> init_waitqueue_head(&sched->job_scheduled);