On Thu, Jun 24, 2021 at 09:59:08AM -0700, Emma Anholt wrote:
On Thu, Jun 24, 2021 at 7:00 AM Daniel Vetter daniel.vetter@ffwll.ch wrote:
Prep work for using the scheduler dependency handling.
I'll add "We need to call drm_sched_job_init earlier so we can use the new drm_sched_job_await* functions for dependency handling here. That gives a bit more context on what's going on here.
Signed-off-by: Daniel Vetter daniel.vetter@intel.com Cc: Emma Anholt emma@anholt.net
Back when I wrote this, I think there were rules that there had to be no failure paths between a job_init and a push. Has that changed?
I really don't have the context to evaluate this, I'm not sure what new "scheduler dependency handling" is given that there was already something that I considered to be dependency handling!
Full patch series link:
https://lore.kernel.org/dri-devel/20210624140025.438303-1-daniel.vetter@ffwl...
The job_init vs push_job is addressed here:
https://lore.kernel.org/dri-devel/20210624140025.438303-1-daniel.vetter@ffwl...
I split job_init into job_init (which can fail, and be done earlier) and job_arm (which can't fail, and must be atomic with the push_job).
The entire goal of this is to lift the dependency handling from "everyone copypastes v3d" to "drm_sched has it for you already", which is this patch here:
https://lore.kernel.org/dri-devel/20210624140025.438303-1-daniel.vetter@ffwl...
Cheers, Daniel