From f2f12eb9c32bc7a714276d8862efac2e7c41bcbe Mon Sep 17 00:00:00 2001 From: Christian König Date: Tue, 2 Feb 2021 12:40:01 +0100 Subject: drm/scheduler: provide scheduler score externally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow multiple schedulers to share the load balancing score. This is useful when one engine has different hw rings. Signed-off-by: Christian König Reviewed-and-Tested-by: Leo Liu Link: https://patchwork.freedesktop.org/patch/msgid/20210204144405.2737-1-christian.koenig@amd.com --- include/drm/gpu_scheduler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h index ce6a383ed99f..1c815e0a14ed 100644 --- a/include/drm/gpu_scheduler.h +++ b/include/drm/gpu_scheduler.h @@ -297,7 +297,8 @@ struct drm_gpu_scheduler { struct list_head pending_list; spinlock_t job_list_lock; int hang_limit; - atomic_t score; + atomic_t *score; + atomic_t _score; bool ready; bool free_guilty; }; @@ -305,7 +306,7 @@ struct drm_gpu_scheduler { int drm_sched_init(struct drm_gpu_scheduler *sched, const struct drm_sched_backend_ops *ops, uint32_t hw_submission, unsigned hang_limit, long timeout, - const char *name); + atomic_t *score, const char *name); void drm_sched_fini(struct drm_gpu_scheduler *sched); int drm_sched_job_init(struct drm_sched_job *job, -- cgit v1.3