mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd: add amd_sched_hw_job_reset
amd_sched_hw_job_reset will remove callback from hw fence. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
754ce0fa55
commit
e686e75dac
@@ -381,6 +381,20 @@ static void amd_sched_job_timedout(struct work_struct *work)
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user