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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user