diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-10-17 01:40:54 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:08 -0500 |
commit | 95aa9b1d9738faa80c66df41d59358d5ff4c288a (patch) | |
tree | 645d3243c941228cf093ea9c0c784e42c5b8c2e5 /drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | |
parent | 2f9d4084cac96a0281522b548ca0526c1e241b75 (diff) |
drm/amdgpu:add hang_limit for sched(v2)
since gpu_scheduler source domain cannot access amdgpu variable
so need create the hang_limit membewr for sched, and it can
refer it for the upcoming GPU RESET patches
v2:
make hang_limit a parameter of sched_init()
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.h')
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h index 3f75b45ed958..3ea75a2f35d4 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | |||
@@ -144,11 +144,12 @@ struct amd_gpu_scheduler { | |||
144 | struct task_struct *thread; | 144 | struct task_struct *thread; |
145 | struct list_head ring_mirror_list; | 145 | struct list_head ring_mirror_list; |
146 | spinlock_t job_list_lock; | 146 | spinlock_t job_list_lock; |
147 | int hang_limit; | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | int amd_sched_init(struct amd_gpu_scheduler *sched, | 150 | int amd_sched_init(struct amd_gpu_scheduler *sched, |
150 | const struct amd_sched_backend_ops *ops, | 151 | const struct amd_sched_backend_ops *ops, |
151 | uint32_t hw_submission, long timeout, const char *name); | 152 | uint32_t hw_submission, unsigned hang_limit, long timeout, const char *name); |
152 | void amd_sched_fini(struct amd_gpu_scheduler *sched); | 153 | void amd_sched_fini(struct amd_gpu_scheduler *sched); |
153 | 154 | ||
154 | int amd_sched_entity_init(struct amd_gpu_scheduler *sched, | 155 | int amd_sched_entity_init(struct amd_gpu_scheduler *sched, |