timeout = MAX_SCHEDULE_TIMEOUT;
}
r = amd_sched_init(&ring->sched, &amdgpu_sched_ops,
- num_hw_submission,
+ num_hw_submission, amdgpu_job_hang_limit,
timeout, ring->name);
if (r) {
DRM_ERROR("Failed to create scheduler on ring %s.\n",
*/
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]);
struct task_struct *thread;
struct list_head ring_mirror_list;
spinlock_t job_list_lock;
+ int hang_limit;
};
int amd_sched_init(struct amd_gpu_scheduler *sched,
const struct amd_sched_backend_ops *ops,
- uint32_t hw_submission, long timeout, const char *name);
+ uint32_t hw_submission, unsigned hang_limit, long timeout, const char *name);
void amd_sched_fini(struct amd_gpu_scheduler *sched);
int amd_sched_entity_init(struct amd_gpu_scheduler *sched,