summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-02-02 12:40:01 +0100
committerChristian König <christian.koenig@amd.com>2021-02-05 10:47:11 +0100
commitf2f12eb9c32bc7a714276d8862efac2e7c41bcbe (patch)
tree255ef8e8adf963deb610ee7140fafa94d151fa52 /include/drm
parentf4a84e165e6d58606097dd07b5b78767a94b870c (diff)
drm/scheduler: provide scheduler score externally
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 <christian.koenig@amd.com> Reviewed-and-Tested-by: Leo Liu <leo.liu@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210204144405.2737-1-christian.koenig@amd.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/gpu_scheduler.h5
1 files changed, 3 insertions, 2 deletions
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,