Skip to content

Commit 9f7e361

Browse files
Andrzej Kacprowskisgruszka
authored andcommitted
accel/ivpu: Do not trigger extra VPU reset if the VPU is idle
Turning off the PLL and entering D0i3 will reset the VPU so an explicit IP reset is redundant. But if the VPU is active, it may interfere with PLL disabling and to avoid that, we have to issue an additional IP reset to silence the VPU before turning off the PLL. Fixes: a8fed6d ("accel/ivpu: Fix power down sequence") Cc: [email protected] # 6.3.x Signed-off-by: Andrzej Kacprowski <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6eea63c commit 9f7e361

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/accel/ivpu/ivpu_hw_mtl.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,18 +754,19 @@ static int ivpu_hw_mtl_power_down(struct ivpu_device *vdev)
754754
{
755755
int ret = 0;
756756

757-
if (ivpu_hw_mtl_reset(vdev)) {
757+
if (!ivpu_hw_mtl_is_idle(vdev) && ivpu_hw_mtl_reset(vdev)) {
758758
ivpu_err(vdev, "Failed to reset the VPU\n");
759-
ret = -EIO;
760759
}
761760

762761
if (ivpu_pll_disable(vdev)) {
763762
ivpu_err(vdev, "Failed to disable PLL\n");
764763
ret = -EIO;
765764
}
766765

767-
if (ivpu_hw_mtl_d0i3_enable(vdev))
768-
ivpu_warn(vdev, "Failed to enable D0I3\n");
766+
if (ivpu_hw_mtl_d0i3_enable(vdev)) {
767+
ivpu_err(vdev, "Failed to enter D0I3\n");
768+
ret = -EIO;
769+
}
769770

770771
return ret;
771772
}

0 commit comments

Comments
 (0)