[PATCH v2] drm/sched: Use struct for drm_sched_init() params
Boris Brezillon
boris.brezillon at collabora.com
Wed Jan 29 07:59:46 UTC 2025
On Tue, 28 Jan 2025 15:29:27 +0100
Philipp Stanner <phasta at kernel.org> wrote:
> drm_sched_init() has a great many parameters and upcoming new
> functionality for the scheduler might add even more. Generally, the
> great number of parameters reduces readability and has already caused
> one missnaming in:
>
> commit 6f1cacf4eba7 ("drm/nouveau: Improve variable name in nouveau_sched_init()").
>
> Introduce a new struct for the scheduler init parameters and port all
> users.
>
> Signed-off-by: Philipp Stanner <phasta at kernel.org>
> ---
> Changes in v2:
> - Point out that the hang-limit is deprecated. (Christian)
> - Initialize the structs to 0 at declaration. (Planet Earth)
> - Don't set stuff explicitly to 0 / NULL. (Tvrtko)
> - Make the structs const where possible. (Boris)
> - v3d: Use just 1, universal, function for sched-init. (Maíra)
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 18 ++++--
> drivers/gpu/drm/etnaviv/etnaviv_sched.c | 20 +++----
> drivers/gpu/drm/imagination/pvr_queue.c | 18 ++++--
> drivers/gpu/drm/lima/lima_sched.c | 16 +++--
> drivers/gpu/drm/msm/msm_ringbuffer.c | 17 +++---
> drivers/gpu/drm/nouveau/nouveau_sched.c | 15 +++--
> drivers/gpu/drm/panfrost/panfrost_job.c | 20 ++++---
> drivers/gpu/drm/panthor/panthor_mmu.c | 16 +++--
> drivers/gpu/drm/panthor/panthor_sched.c | 29 +++++----
Panfrost and panthor changes are
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
> drivers/gpu/drm/scheduler/sched_main.c | 50 ++++++----------
> drivers/gpu/drm/v3d/v3d_sched.c | 68 +++++++++-------------
> drivers/gpu/drm/xe/xe_execlist.c | 16 +++--
> drivers/gpu/drm/xe/xe_gpu_scheduler.c | 17 +++++-
> include/drm/gpu_scheduler.h | 37 ++++++++++--
> 14 files changed, 206 insertions(+), 151 deletions(-)
More information about the Freedreno
mailing list