Commit 8fe159b0 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/sched: add drm_sched_fault

Add a helper to immediately start timeout handling in case of a hardware
fault.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 19067e52
...@@ -196,6 +196,19 @@ static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched) ...@@ -196,6 +196,19 @@ static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched)
schedule_delayed_work(&sched->work_tdr, sched->timeout); schedule_delayed_work(&sched->work_tdr, sched->timeout);
} }
/**
* drm_sched_fault - immediately start timeout handler
*
* @sched: scheduler where the timeout handling should be started.
*
* Start timeout handling immediately when the driver detects a hardware fault.
*/
void drm_sched_fault(struct drm_gpu_scheduler *sched)
{
mod_delayed_work(system_wq, &sched->work_tdr, 0);
}
EXPORT_SYMBOL(drm_sched_fault);
/* job_finish is called after hw fence signaled /* job_finish is called after hw fence signaled
*/ */
static void drm_sched_job_finish(struct work_struct *work) static void drm_sched_job_finish(struct work_struct *work)
......
...@@ -299,6 +299,7 @@ void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched, ...@@ -299,6 +299,7 @@ void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched,
void drm_sched_job_recovery(struct drm_gpu_scheduler *sched); void drm_sched_job_recovery(struct drm_gpu_scheduler *sched);
bool drm_sched_dependency_optimized(struct dma_fence* fence, bool drm_sched_dependency_optimized(struct dma_fence* fence,
struct drm_sched_entity *entity); struct drm_sched_entity *entity);
void drm_sched_fault(struct drm_gpu_scheduler *sched);
void drm_sched_job_kickout(struct drm_sched_job *s_job); void drm_sched_job_kickout(struct drm_sched_job *s_job);
void drm_sched_rq_add_entity(struct drm_sched_rq *rq, void drm_sched_rq_add_entity(struct drm_sched_rq *rq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment