summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiawei Gu <Jiawei.Gu@amd.com>2022-02-22 17:42:52 +0800
committerChristian König <christian.koenig@amd.com>2022-02-23 10:04:14 +0100
commit8ab62eda177bc350f34fea4fcea23603b8184bfd (patch)
tree085585306c1f039bce738c5a75f42aeb7588a64b /include
parent95ee2a8b4b3cd1fb25f7e14e2202da4045030173 (diff)
downloadlinux-stable-8ab62eda177bc350f34fea4fcea23603b8184bfd.tar.gz
linux-stable-8ab62eda177bc350f34fea4fcea23603b8184bfd.tar.bz2
linux-stable-8ab62eda177bc350f34fea4fcea23603b8184bfd.zip
drm/sched: Add device pointer to drm_gpu_scheduler
Add device pointer so scheduler's printing can use DRM_DEV_ERROR() instead, which makes life easier under multiple GPU scenario. v2: amend all calls of drm_sched_init() v3: fill dev pointer for all drm_sched_init() calls Signed-off-by: Jiawei Gu <Jiawei.Gu@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220221095705.5290-1-Jiawei.Gu@amd.com
Diffstat (limited to 'include')
-rw-r--r--include/drm/gpu_scheduler.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index bbc22fad8d80..944f83ef9f2e 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -457,13 +457,14 @@ struct drm_gpu_scheduler {
atomic_t _score;
bool ready;
bool free_guilty;
+ struct device *dev;
};
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, struct workqueue_struct *timeout_wq,
- atomic_t *score, const char *name);
+ atomic_t *score, const char *name, struct device *dev);
void drm_sched_fini(struct drm_gpu_scheduler *sched);
int drm_sched_job_init(struct drm_sched_job *job,