In FW_TEST mode, boot the firmware but skip the ready wait and all subsequent firmware communication. The firmware test reports its results through the firmware log.
Disable driver timeouts in this mode so timeout handling does not interrupt the firmware test. Signed-off-by: Andrzej Kacprowski <[email protected]> --- drivers/accel/ivpu/ivpu_drv.c | 3 +++ drivers/accel/ivpu/ivpu_hw.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index 6b71edf566e7..8c3fb0f01a31 100644 --- a/drivers/accel/ivpu/ivpu_drv.c +++ b/drivers/accel/ivpu/ivpu_drv.c @@ -539,6 +539,9 @@ int ivpu_boot(struct ivpu_device *vdev) ivpu_hw_irq_enable(vdev); ivpu_ipc_enable(vdev); + if (ivpu_test_mode & IVPU_TEST_MODE_FW_TEST) + return 0; + if (!ivpu_fw_is_warm_boot(vdev)) { ret = ivpu_pm_dct_init(vdev); if (ret) diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c index 59a5de8d9270..8b63140e3160 100644 --- a/drivers/accel/ivpu/ivpu_hw.c +++ b/drivers/accel/ivpu/ivpu_hw.c @@ -94,7 +94,7 @@ static void wa_init(struct ivpu_device *vdev) static void timeouts_init(struct ivpu_device *vdev) { - if (ivpu_test_mode & IVPU_TEST_MODE_DISABLE_TIMEOUTS) { + if (ivpu_test_mode & (IVPU_TEST_MODE_DISABLE_TIMEOUTS | IVPU_TEST_MODE_FW_TEST)) { /* in milliseconds, negative value disables the timeout */ vdev->timeout.boot = -1; vdev->timeout.jsm = -1; -- 2.43.0
