diff options
author | Philipp Stanner <pstanner@redhat.com> | 2024-10-29 14:38:20 +0100 |
---|---|---|
committer | Philipp Stanner <pstanner@redhat.com> | 2024-10-31 12:48:49 +0100 |
commit | 2e0757012cf4f3c29a671f0981f9aa853a96def6 (patch) | |
tree | a0d5fb3ee96c498862cc5c7cdb31ea75ad8ab00d | |
parent | 766515ab5bba959fc8036e77e875a672916ba8fc (diff) |
drm/sched: Document purpose of drm_sched_{start,stop}drm-misc-next-2024-10-31
drm_sched_start()'s and drm_sched_stop()'s names suggest that those
functions might be intended for actively starting and stopping the
scheduler on initialization and teardown.
They are, however, only used on timeout handling (reset recovery). The
docstrings should reflect that to prevent confusion.
Document those functions' purpose.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241029133819.78696-2-pstanner@redhat.com
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 2f1b514ff4cf..8451f3884a46 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -593,6 +593,9 @@ static void drm_sched_job_timedout(struct work_struct *work) * callers responsibility to release it manually if it's not part of the * pending list any more. * + * This function is typically used for reset recovery (see the docu of + * drm_sched_backend_ops.timedout_job() for details). Do not call it for + * scheduler teardown, i.e., before calling drm_sched_fini(). */ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad) { @@ -665,7 +668,6 @@ void drm_sched_stop(struct drm_gpu_scheduler *sched, struct drm_sched_job *bad) */ cancel_delayed_work(&sched->work_tdr); } - EXPORT_SYMBOL(drm_sched_stop); /** @@ -674,6 +676,10 @@ EXPORT_SYMBOL(drm_sched_stop); * @sched: scheduler instance * @errno: error to set on the pending fences * + * This function is typically used for reset recovery (see the docu of + * drm_sched_backend_ops.timedout_job() for details). Do not call it for + * scheduler startup. The scheduler itself is fully operational after + * drm_sched_init() succeeded. */ void drm_sched_start(struct drm_gpu_scheduler *sched, int errno) { |