On 2026-09-15 10:36 AM, Karol Wachowski wrote:
From: Tomasz Rusinowicz <[email protected]>
Use the vdev->timeout structure for register poll timeouts. This allows
adjusting those timeouts depending on the platform type.
For FPGA set MMU timeouts to 10x.
Register poll timeouts are expressed in microseconds and are passed to
read_poll_timeout(), which disables a timeout when it is 0, unlike the
millisecond timeouts that are disabled with a negative value.
Also initialize state_dump_msg in the IVPU_TEST_MODE_DISABLE_TIMEOUTS
branch, which was missed when the field was added. Unlike the other
fields, it is a fixed delay passed to msleep() rather than a timeout, so
it has to keep a finite value. It is only reachable with this debug test
mode enabled, so there is no need for backporting.
Reviewed-by: Dawid Osuchowski <[email protected]>
Signed-off-by: Tomasz Rusinowicz <[email protected]>
Signed-off-by: Karol Wachowski <[email protected]>
---
Changes in v3:
- Address Sashiko AI review comment: disable the microsecond register
poll timeouts with 0 instead of -1. read_poll_timeout() treats 0 as
"never timeout", while -1 is converted to 0xffffffff and results in
a finite ~71.6 minute timeout
Review:
https://sashiko.dev/#/patchset/[email protected]?part=1
- Initialize state_dump_msg in the IVPU_TEST_MODE_DISABLE_TIMEOUTS
branch, it is a fixed msleep() delay and has to remain finite
- Explain the timeout semantics in the commit message
- Link to v2:
https://lore.kernel.org/dri-devel/[email protected]/T/#u
Changes in v2:
- Add Signed-off-by: Karol Wachowski
- Link to v1:
https://lore.kernel.org/dri-devel/[email protected]/T/#u
---
drivers/accel/ivpu/ivpu_drv.h | 3 +++
drivers/accel/ivpu/ivpu_hw.c | 22 ++++++++++++++++++++++
drivers/accel/ivpu/ivpu_hw_ip.c | 6 ++----
drivers/accel/ivpu/ivpu_mmu.c | 12 ++++--------
4 files changed, 31 insertions(+), 12 deletions(-)