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.vet...@intel.com> > Cc: Lucas Stach <l.st...@pengutronix.de> > Cc: Russell King <linux+etna...@armlinux.org.uk> > Cc: Christian Gmeiner <christian.gmei...@gmail.com> > Cc: Qiang Yu <yuq...@gmail.com> > Cc: Rob Herring <r...@kernel.org> > Cc: Tomeu Vizoso <tomeu.viz...@collabora.com> > Cc: Steven Price <steven.pr...@arm.com> > Cc: Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com> > Cc: David Airlie <airl...@linux.ie> > Cc: Daniel Vetter <dan...@ffwll.ch> > Cc: Sumit Semwal <sumit.sem...@linaro.org> > Cc: "Christian König" <christian.koe...@amd.com> > Cc: Masahiro Yamada <masahi...@kernel.org> > Cc: Kees Cook <keesc...@chromium.org> > Cc: Adam Borowski <kilob...@angband.pl> > Cc: Nick Terrell <terre...@fb.com> > Cc: Mauro Carvalho Chehab <mchehab+hua...@kernel.org> > Cc: Paul Menzel <pmen...@molgen.mpg.de> > Cc: Sami Tolvanen <samitolva...@google.com> > Cc: Viresh Kumar <viresh.ku...@linaro.org> > Cc: Alex Deucher <alexander.deuc...@amd.com> > Cc: Dave Airlie <airl...@redhat.com> > Cc: Nirmoy Das <nirmoy....@amd.com> > Cc: Deepak R Varma <mh12gx2...@gmail.com> > Cc: Lee Jones <lee.jo...@linaro.org> > Cc: Kevin Wang <kevin1.w...@amd.com> > Cc: Chen Li <che...@uniontech.com> > Cc: Luben Tuikov <luben.tui...@amd.com> > Cc: "Marek Olšák" <marek.ol...@amd.com> > Cc: Dennis Li <dennis...@amd.com> > Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com> > Cc: Andrey Grodzovsky <andrey.grodzov...@amd.com> > Cc: Sonny Jiang <sonny.ji...@amd.com> > Cc: Boris Brezillon <boris.brezil...@collabora.com> > Cc: Tian Tao <tiant...@hisilicon.com> > Cc: Jack Zhang <jack.zha...@amd.com> > Cc: etna...@lists.freedesktop.org > Cc: l...@lists.freedesktop.org > Cc: linux-me...@vger.kernel.org > Cc: linaro-mm-...@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.pr...@arm.com>