accel/ivpu: Add FW state dump on TDR
authorTomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Mon, 30 Sep 2024 19:52:59 +0000 (21:52 +0200)
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Fri, 11 Oct 2024 10:44:38 +0000 (12:44 +0200)
commit5e162f872d7af8f041b143536617ab2563ea7de5
treeca4116eda6c90eecb9404d0bf2ff7f0c422765d5
parentbade0340526827d03d9c293450c0422beba77f04
accel/ivpu: Add FW state dump on TDR

Send JSM state dump message at the beginning of TDR handler. This allows
FW to collect debug info in the FW log before the state of the NPU is
lost allowing to analyze the cause of a TDR.

Wait a predefined timeout (10 ms) so the FW has a chance to write debug
logs. We cannot wait for JSM response at this point because IRQs are
already disabled before TDR handler is invoked.

Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-9-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
drivers/accel/ivpu/ivpu_drv.h
drivers/accel/ivpu/ivpu_hw.c
drivers/accel/ivpu/ivpu_ipc.c
drivers/accel/ivpu/ivpu_ipc.h
drivers/accel/ivpu/ivpu_jsm_msg.c
drivers/accel/ivpu/ivpu_jsm_msg.h
drivers/accel/ivpu/ivpu_pm.c