aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-10-17 13:40:54 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-12-04 16:33:08 -0500
commit95aa9b1d9738faa80c66df41d59358d5ff4c288a (patch)
tree645d3243c941228cf093ea9c0c784e42c5b8c2e5 /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
parentdrm/amdgpu:cleanup force_completion (diff)
downloadlinux-dev-95aa9b1d9738faa80c66df41d59358d5ff4c288a.tar.xz
linux-dev-95aa9b1d9738faa80c66df41d59358d5ff4c288a.zip
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.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 9061c88e3e0c..5a1ece2774b5 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -676,13 +676,17 @@ static int amd_sched_main(void *param)
*/
int amd_sched_init(struct amd_gpu_scheduler *sched,
const struct amd_sched_backend_ops *ops,
- unsigned hw_submission, long timeout, const char *name)
+ unsigned hw_submission,
+ unsigned hang_limit,
+ long timeout,
+ const char *name)
{
int i;
sched->ops = ops;
sched->hw_submission_limit = hw_submission;
sched->name = name;
sched->timeout = timeout;
+ sched->hang_limit = hang_limit;
for (i = AMD_SCHED_PRIORITY_MIN; i < AMD_SCHED_PRIORITY_MAX; i++)
amd_sched_rq_init(&sched->sched_rq[i]);