[Lima] [PATCH 01/11] drm/sched: Split drm_sched_job_init
Steven Price
steven.price at arm.com
Thu Jun 24 14:32:02 UTC 2021
On 24/06/2021 15:00, Daniel Vetter wrote:
> This is a very confusingly named function, because not just does it
> init an object, it arms it and provides a point of no return for
> pushing a job into the scheduler. It would be nice if that's a bit
> clearer in the interface.
>
> But the real reason is that I want to push the dependency tracking
> helpers into the scheduler code, and that means drm_sched_job_init
> must be called a lot earlier, without arming the job.
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Lucas Stach <l.stach at pengutronix.de>
> Cc: Russell King <linux+etnaviv at armlinux.org.uk>
> Cc: Christian Gmeiner <christian.gmeiner at gmail.com>
> Cc: Qiang Yu <yuq825 at gmail.com>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Tomeu Vizoso <tomeu.vizoso at collabora.com>
> Cc: Steven Price <steven.price at arm.com>
> Cc: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Sumit Semwal <sumit.semwal at linaro.org>
> Cc: "Christian König" <christian.koenig at amd.com>
> Cc: Masahiro Yamada <masahiroy at kernel.org>
> Cc: Kees Cook <keescook at chromium.org>
> Cc: Adam Borowski <kilobyte at angband.pl>
> Cc: Nick Terrell <terrelln at fb.com>
> Cc: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>
> Cc: Paul Menzel <pmenzel at molgen.mpg.de>
> Cc: Sami Tolvanen <samitolvanen at google.com>
> Cc: Viresh Kumar <viresh.kumar at linaro.org>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Dave Airlie <airlied at redhat.com>
> Cc: Nirmoy Das <nirmoy.das at amd.com>
> Cc: Deepak R Varma <mh12gx2825 at gmail.com>
> Cc: Lee Jones <lee.jones at linaro.org>
> Cc: Kevin Wang <kevin1.wang at amd.com>
> Cc: Chen Li <chenli at uniontech.com>
> Cc: Luben Tuikov <luben.tuikov at amd.com>
> Cc: "Marek Olšák" <marek.olsak at amd.com>
> Cc: Dennis Li <Dennis.Li at amd.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> Cc: Sonny Jiang <sonny.jiang at amd.com>
> Cc: Boris Brezillon <boris.brezillon at collabora.com>
> Cc: Tian Tao <tiantao6 at hisilicon.com>
> Cc: Jack Zhang <Jack.Zhang1 at amd.com>
> Cc: etnaviv at lists.freedesktop.org
> Cc: lima at lists.freedesktop.org
> Cc: linux-media at vger.kernel.org
> Cc: linaro-mm-sig at lists.linaro.org
> ---
> .gitignore | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 ++
> drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 ++
> drivers/gpu/drm/lima/lima_sched.c | 2 ++
> drivers/gpu/drm/panfrost/panfrost_job.c | 2 ++
> drivers/gpu/drm/scheduler/sched_entity.c | 6 +++---
> drivers/gpu/drm/scheduler/sched_fence.c | 15 ++++++++++-----
> drivers/gpu/drm/scheduler/sched_main.c | 23 ++++++++++++++++++++++-
> include/drm/gpu_scheduler.h | 6 +++++-
> 10 files changed, 51 insertions(+), 10 deletions(-)
>
> diff --git a/.gitignore b/.gitignore
> index 7afd412dadd2..52433a930299 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -66,6 +66,7 @@ modules.order
> /modules.builtin
> /modules.builtin.modinfo
> /modules.nsdeps
> +*.builtin
I don't think this belongs in this patch!
[...]
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index beb62c8fc851..1e950534b9b0 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -244,6 +244,8 @@ int panfrost_job_push(struct panfrost_job *job)
> goto unlock;
> }
>
> + drm_sched_job_arm(&job->base);
> +
> job->render_done_fence = dma_fence_get(&job->base.s_fence->finished);
>
> ret = panfrost_acquire_object_fences(job->bos, job->bo_count,
Acked-by: Steven Price <steven.price at arm.com>
More information about the lima
mailing list