accel/ivpu: Trigger recovery on TDR with OS scheduling
Karol Wachowski
maintainerPATCH 1/1 accel/ivpu: Trigger recovery on TDR with OS scheduling
With OS scheduling mode the driver cannot determine which context caused the timeout, so context abort cannot be used. Instead of queuing context_abort_work, directly trigger full device recovery when a job timeout (TDR) occurs in OS scheduling mode.
--- drivers/accel/ivpu/ivpu_pm.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/accel/ivpu/ivpu_pm.c +6 -0
@@ -221,6 +221,12 @@ static void ivpu_job_timeout_work(struct work_struct *work) abort:atomic_set (&vdev->job_timeout_counter,0 ); + +if (vdev->fw->sched_mode ==VPU_SCHEDULING_MODE_OS ) { +ivpu_pm_trigger_recovery (vdev,"Job timeout" ); +return ; + } +ivpu_jsm_state_dump (vdev);ivpu_dev_coredump (vdev);queue_work (system_percpu_wq, &vdev->context_abort_work);
Signature · 1 line
2.43.0
Quoted 28 lines · Karol Wachowski
With OS scheduling mode the driver cannot determine which context caused the timeout, so context abort cannot be used. Instead of queuing
context_abort_work, directly trigger full device recovery when a job timeout (TDR) occurs in OS scheduling mode.Fixes ade00a6c903f ("accel/ivpu: Perform engine reset instead of device recovery on TDR")Signed-off-by Karol Wachowski <[email protected]>--- drivers/accel/ivpu/ivpu_pm.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/accel/ivpu/ivpu_pm.c +6
-0@@ -221,6 +221,12 @@ static void ivpu_job_timeout_work(struct work_struct *work) abort:atomic_set (&vdev->job_timeout_counter,0 ); + +if (vdev->fw->sched_mode ==VPU_SCHEDULING_MODE_OS ) { +ivpu_pm_trigger_recovery (vdev,"Job timeout" ); +return ; + } +ivpu_jsm_state_dump (vdev);ivpu_dev_coredump (vdev);queue_work (system_percpu_wq, &vdev->context_abort_work);
Quoted 7 lines · Karol Wachowski
With OS scheduling mode the driver cannot determine which context caused the timeout, so context abort cannot be used. Instead of queuing
context_abort_work, directly trigger full device recovery when a job timeout (TDR) occurs in OS scheduling mode.Fixes ade00a6c903f ("accel/ivpu: Perform engine reset instead of device recovery on TDR")Signed-off-by Karol Wachowski <[email protected]>
Quoted 11 lines · Jeff Hugo
Quoted 8 lines · Karol Wachowski
With OS scheduling mode the driver cannot determine which context caused the timeout, so context abort cannot be used. Instead of queuing
context_abort_work, directly trigger full device recovery when a job timeout (TDR) occurs in OS scheduling mode.Fixes ade00a6c903f ("accel/ivpu: Perform engine reset instead ofdevice recovery on TDR")
Signed-off-by Karol Wachowski <[email protected]>Reviewed-by Jeff Hugo <[email protected]>
Thanks, applied to drm-misc-next-fixes.
Karol