Skip to content

Commit f3be8a9

Browse files
committed
accel/ivpu: Fix error handling in ivpu_boot()
Ensure IRQs and IPC are properly disabled if HW sched or DCT initialization fails. Fixes: cc3c72c ("accel/ivpu: Refactor failure diagnostics during boot") Cc: [email protected] # v6.13+ Reviewed-by: Karol Wachowski <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 79fc672 commit f3be8a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,19 @@ int ivpu_boot(struct ivpu_device *vdev)
397397
if (ivpu_fw_is_cold_boot(vdev)) {
398398
ret = ivpu_pm_dct_init(vdev);
399399
if (ret)
400-
goto err_diagnose_failure;
400+
goto err_disable_ipc;
401401

402402
ret = ivpu_hw_sched_init(vdev);
403403
if (ret)
404-
goto err_diagnose_failure;
404+
goto err_disable_ipc;
405405
}
406406

407407
return 0;
408408

409+
err_disable_ipc:
410+
ivpu_ipc_disable(vdev);
411+
ivpu_hw_irq_disable(vdev);
412+
disable_irq(vdev->irq);
409413
err_diagnose_failure:
410414
ivpu_hw_diagnose_failure(vdev);
411415
ivpu_mmu_evtq_dump(vdev);

0 commit comments

Comments
 (0)