accel/ivpu/40xx: Ensure clock resource ownership Ack before Power-Up
authorKarol Wachowski <karol.wachowski@linux.intel.com>
Mon, 25 Sep 2023 12:11:34 +0000 (14:11 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Wed, 27 Sep 2023 05:40:23 +0000 (07:40 +0200)
commit6c3f2f90ccad024806f72c49740742df4ded3727
treedc303b3ec7cd57519b93409abb70244349a5f1c4
parent002652555022728c42b5517c6c11265b8c3ab827
accel/ivpu/40xx: Ensure clock resource ownership Ack before Power-Up

We need to wait for the CLOCK_RESOURCE_OWN_ACK bit to be set
after configuring the workpoint. This step ensures that the VPU
microcontroller clock is actively toggling and ready for operation.

Previously, we relied solely on the READY bit in the VPU_STATUS
register, which indicated the completion of the workpoint download.
However, this approach was insufficient, as the READY bit could be set
while the device was still running on a sideband clock until the PLL
locked. To guarantee that the PLL is locked and the device is running on
the main clock source, we now wait for the CLOCK_RESOURCE_OWN_ACK before
proceeding with the remainder of the power-up sequence.

Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4")
Signed-off-by: Karol Wachowski <karol.wachowski@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/20230925121137.872158-4-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_hw_40xx.c
drivers/accel/ivpu/ivpu_hw_40xx_reg.h