accel/ivpu: Add support for delayed D0i3 entry message
authorAndrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Sat, 28 Oct 2023 13:34:15 +0000 (15:34 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Mon, 30 Oct 2023 10:06:13 +0000 (11:06 +0100)
commit3198a62eb8f8411b605501cb78c2298c67ecee91
treedee56a851acfd7688dec75dcd7b4e8a6d416e987
parentcc19fedab8bdbe0f81d320ff9a6fdb3b5b01be83
accel/ivpu: Add support for delayed D0i3 entry message

Currently the VPU firmware prepares for D0i3 every time the VPU
is entering D0i2 Idle state. This is not optimal as we might not
enter D0i3 every time we enter D0i2 Idle and this preparation
is quite costly.

This optimization moves D0i3 preparation to a dedicated
message sent from the host driver only when the driver is about
to enter D0i3 - this reduces power consumption and latency for
certain workloads, for example audio workloads that submit
inference every 10 ms.

The VPU needs non zero time to enter IDLE state after responding to
D0i3 entry message. If the driver does not wait for the VPU to enter
IDLE state it could cause warm boot failures.

Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-12-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_drv.h
drivers/accel/ivpu/ivpu_fw.c
drivers/accel/ivpu/ivpu_hw.h
drivers/accel/ivpu/ivpu_hw_37xx.c
drivers/accel/ivpu/ivpu_hw_40xx.c
drivers/accel/ivpu/ivpu_jsm_msg.c
drivers/accel/ivpu/ivpu_jsm_msg.h
drivers/accel/ivpu/ivpu_pm.c