drm/sched: Document drm_sched_job_arm()'s effect on fences
Subsystems (3)
PATCH 1/1 drm/sched: Document drm_sched_job_arm()'s effect on fences
The GPU Scheduler's job initialization is split into two steps, drm_sched_job_init() and drm_sched_job_arm(). One reason for this is that actually arming a job results in the job's fences getting initialized (armed).
Currently, the documentation does not explicitly state what drm_sched_job_arm() does in this regard and which rules the API-User has to follow once the function has been called.
Add a section to drm_sched_job_arm()'s docstring which details the function's consequences regarding the job's fences.
--- drivers/gpu/drm/scheduler/sched_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/scheduler/sched_main.c +6 -0
@@ -831,6 +831,12 @@ EXPORT_SYMBOL(drm_sched_job_init);* Refer to drm_sched_entity_push_job() documentation for locking * considerations. * +* drm_sched_job_cleanup() can be used to disarm the job again - but only +* _before_ the job's fences have been published. Once a drm_sched_fence was +* published, the associated job needs to be submitted to and processed by the +* scheduler to avoid potential deadlocks on the DMA fences encapsulated by +* drm_sched_fence. +* * This can only be called if drm_sched_job_init() succeeded. */ void drm_sched_job_arm (struct drm_sched_job *job)
Signature · 1 line
2.46.0
Quoted 22 lines · Philipp Stanner
The GPU Scheduler's job initialization is split into two steps,
drm_sched_job_init()anddrm_sched_job_arm(). One reason for this is that actually arming a job results in the job's fences getting initialized (armed).Currently, the documentation does not explicitly state what
drm_sched_job_arm()does in this regard and which rules the API-User has to follow once the function has been called.Add a section to drm_sched_job_arm()'s docstring which details the function's consequences regarding the job's fences.
Signed-off-by Philipp Stanner <[email protected]>--- drivers/gpu/drm/scheduler/sched_main.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/scheduler/sched_main.c +0
-0
drivers/gpu/drm/scheduler/sched_main.c EXPORT_SYMBOL(drm_sched_job_init); · line 838
Quoted 8 lines
drivers/gpu/drm/scheduler/sched_main.c +5
-0@@ -831,6 +831,12 @@ EXPORT_SYMBOL(drm_sched_job_init);* Refer to drm_sched_entity_push_job() documentation for locking * considerations. * +* drm_sched_job_cleanup() can be used to disarm the job again - but only +* _before_ the job's fences have been published. Once a drm_sched_fence was +* published, the associated job needs to be submitted to and processed by the +* scheduler to avoid potential deadlocks on the DMA fences encapsulated by +* drm_sched_fence.
Quoted 7 lines
drivers/gpu/drm/scheduler/sched_main.c +1
-0+* * This can only be called if drm_sched_job_init() succeeded. */ void drm_sched_job_arm (struct drm_sched_job *job)Signature · 1 line
2.46.0
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch