accel/ivpu: Trigger engine reset for additional job status codes
Karol Wachowski
maintainerPATCH 1/1 accel/ivpu: Trigger engine reset for additional job status codes
From: Andrzej Kacprowski <[email protected]>
Trigger engine reset for any status code in the range. This allows to add additional status codes in the future without breaking compatibility between the firmware and the driver.
--- drivers/accel/ivpu/ivpu_job.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_job.c +9 -1
@@ -574,7 +574,11 @@ static int ivpu_job_signal_and_destroy(struct ivpu_device *vdev, u32 job_id, u32if (!job)return -ENOENT ; -if (job_status ==VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW ) { +switch (job_status) { +case VPU_JSM_STATUS_PROCESSING_ERR : + case VPU_JSM_STATUS_ENGINE_RESET_REQUIRED_MIN ... VPU_JSM_STATUS_ENGINE_RESET_REQUIRED_MAX: + { +/* Trigger an engine reset */ guard (mutex)(&job->file_priv->lock);if (job->file_priv->has_mmu_faults)
@@ -589,6 +593,10 @@ static int ivpu_job_signal_and_destroy(struct ivpu_device *vdev, u32 job_id, u32queue_work (system_wq, &vdev->context_abort_work);return 0 ; } +default : +/* Complete job with error status, engine reset not required */ +break ; + } job =ivpu_job_remove_from_submitted_jobs (vdev, job_id);if (!job)
Signature · 1 line
2.43.0
Quoted 8 lines · Karol Wachowski
From: Andrzej Kacprowski <[email protected]>
Trigger engine reset for any status code in the range. This allows to add additional status codes in the future without breaking compatibility between the firmware and the driver.
Signed-off-by Andrzej Kacprowski <[email protected]>Signed-off-by Karol Wachowski <[email protected]>
Applied to drm-misc-next.
Quoted 11 lines · Jeff Hugo
Quoted 8 lines · Karol Wachowski
From: Andrzej Kacprowski <[email protected]>
Trigger engine reset for any status code in the range. This allows to add additional status codes in the future without breaking compatibility between the firmware and the driver.
Signed-off-by Andrzej Kacprowski <[email protected]>Signed-off-by Karol Wachowski <[email protected]>Reviewed-by Jeff Hugo <[email protected]>