accel/ivpu: Pass D0i3 residency time to the VPU firmware
authorAndrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Sat, 28 Oct 2023 13:34:12 +0000 (15:34 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Mon, 30 Oct 2023 10:06:12 +0000 (11:06 +0100)
commit3de6d9597892ef899d7e90f589e23c9298013134
tree67c62a0c7fae908907567aad1df91f4ea59c74e4
parentdb37a5bfe97588992c75c29c1f0e19c88d364ce5
accel/ivpu: Pass D0i3 residency time to the VPU firmware

The firmware needs to know the time spent in D0i3/D3 to
calculate telemetry data. The D0i3/D3 residency time is
calculated by the driver and passed to the firmware
in the boot parameters.

The driver also passes VPU perf counter value captured
right before entering D0i3 - this allows the VPU firmware
to generate monotonic timestamps for the logs.

Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-9-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_fw.c
drivers/accel/ivpu/ivpu_hw.h
drivers/accel/ivpu/ivpu_hw_37xx.c
drivers/accel/ivpu/ivpu_hw_37xx_reg.h