提交 e686e75d 编写于 作者: C Chunming Zhou 提交者: Alex Deucher

drm/amd: add amd_sched_hw_job_reset

amd_sched_hw_job_reset will remove callback from hw fence.
Signed-off-by: NChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 754ce0fa
...@@ -381,6 +381,20 @@ static void amd_sched_job_timedout(struct work_struct *work) ...@@ -381,6 +381,20 @@ static void amd_sched_job_timedout(struct work_struct *work)
job->sched->ops->timedout_job(job); job->sched->ops->timedout_job(job);
} }
void amd_sched_hw_job_reset(struct amd_gpu_scheduler *sched)
{
struct amd_sched_job *s_job;
spin_lock(&sched->job_list_lock);
list_for_each_entry_reverse(s_job, &sched->ring_mirror_list, node) {
if (fence_remove_callback(s_job->s_fence->parent, &s_job->s_fence->cb)) {
fence_put(s_job->s_fence->parent);
s_job->s_fence->parent = NULL;
}
}
spin_unlock(&sched->job_list_lock);
}
/** /**
* Submit a job to the job queue * Submit a job to the job queue
* *
......
...@@ -153,4 +153,5 @@ int amd_sched_job_init(struct amd_sched_job *job, ...@@ -153,4 +153,5 @@ int amd_sched_job_init(struct amd_sched_job *job,
struct amd_gpu_scheduler *sched, struct amd_gpu_scheduler *sched,
struct amd_sched_entity *entity, struct amd_sched_entity *entity,
void *owner); void *owner);
void amd_sched_hw_job_reset(struct amd_gpu_scheduler *sched);
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册