From: Karol Wachowski Date: Thu, 2 Apr 2026 12:55:26 +0000 (+0200) Subject: accel/ivpu: Trigger recovery on TDR with OS scheduling X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c636ae346d196b71e972188f91b3260ae522ade6;p=thirdparty%2Fkernel%2Flinux.git 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") Reviewed-by: Jeff Hugo Reviewed-by: Lizhi Hou Signed-off-by: Karol Wachowski Link: https://patch.msgid.link/20260402125526.845210-1-karol.wachowski@linux.intel.com --- diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 83da9b297f378..c1ce8329790e0 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -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);