Skip to contentSkip to conversation

accel/ivpu: Trigger recovery on TDR with OS scheduling

PATCH In review Karol Wachowski 3 participants 4 messages Apr 2

Subsystems (2)
lore
Share & tools
lore

Karol Wachowski

author maintainer
#0 lore raw

PATCH 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.

Fixes ade00a6c903f ("accel/ivpu: Perform engine reset instead of device recovery on TDR")
---
 drivers/accel/ivpu/ivpu_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/accel/ivpu/ivpu_pm.c +6 -0
index 83da9b297f37..c1ce8329790e 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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")
---
  drivers/accel/ivpu/ivpu_pm.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/accel/ivpu/ivpu_pm.c +6 -0
index 83da9b297f37..c1ce8329790e 100644
@@ -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);
Reviewed-by on v1 1/1
#2 lore raw
In reply to Karol Wachowski
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")
author maintainer Applied
#3 lore raw
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 of

device recovery on TDR")

Thanks, applied to drm-misc-next-fixes.

Karol