accel/ivpu: Improve IVPU_TEST_MODE_FW_TEST handling
Andrzej Kacprowski
maintainerPATCH v3 1/1 accel/ivpu: Improve IVPU_TEST_MODE_FW_TEST handling
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.
--- drivers/accel/ivpu/ivpu_drv.c | 3 +++ drivers/accel/ivpu/ivpu_hw.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_drv.c +3 -0
@@ -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)
drivers/accel/ivpu/ivpu_hw.c +1 -1
@@ -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 ;
Signature · 1 line
2.43.0
Quoted 32 lines · Andrzej Kacprowski
In
FW_TESTmode, 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(-)drivers/accel/ivpu/ivpu_drv.c +3
-0@@ -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)drivers/accel/ivpu/ivpu_hw.c +0
-0
drivers/accel/ivpu/ivpu_hw.c static void wa_init(struct ivpu_device *vdev) · line 100
Quoted 8 lines
drivers/accel/ivpu/ivpu_hw.c +1
-1@@ -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 ;
Quoted 8 lines · Andrzej Kacprowski
In
FW_TESTmode, 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]>
Quoted 11 lines · Jeff Hugo
Quoted 8 lines · Andrzej Kacprowski
In
FW_TESTmode, 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]>Reviewed-by Jeff Hugo <[email protected]>
Thanks, applied to drm-misc-next.