Skip to content

Commit 4b5581f

Browse files
committed
accel/ivpu: Disable PLL after VPU IP reset during FLR
IP reset has to followed by ivpu_pll_disable() to properly enter reset state. Fixes: 828d630 ("accel/ivpu: Don't enter d0i3 during FLR") Signed-off-by: Jacek Lawrynowicz <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b246271 commit 4b5581f

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

drivers/accel/ivpu/ivpu_hw_40xx.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ static int ivpu_hw_40xx_info_init(struct ivpu_device *vdev)
746746
return 0;
747747
}
748748

749-
static int ivpu_hw_40xx_reset(struct ivpu_device *vdev)
749+
static int ivpu_hw_40xx_ip_reset(struct ivpu_device *vdev)
750750
{
751751
int ret;
752752
u32 val;
@@ -768,6 +768,23 @@ static int ivpu_hw_40xx_reset(struct ivpu_device *vdev)
768768
return ret;
769769
}
770770

771+
static int ivpu_hw_40xx_reset(struct ivpu_device *vdev)
772+
{
773+
int ret = 0;
774+
775+
if (ivpu_hw_40xx_ip_reset(vdev)) {
776+
ivpu_err(vdev, "Failed to reset VPU IP\n");
777+
ret = -EIO;
778+
}
779+
780+
if (ivpu_pll_disable(vdev)) {
781+
ivpu_err(vdev, "Failed to disable PLL\n");
782+
ret = -EIO;
783+
}
784+
785+
return ret;
786+
}
787+
771788
static int ivpu_hw_40xx_d0i3_enable(struct ivpu_device *vdev)
772789
{
773790
int ret;
@@ -913,7 +930,7 @@ static int ivpu_hw_40xx_power_down(struct ivpu_device *vdev)
913930

914931
ivpu_hw_40xx_save_d0i3_entry_timestamp(vdev);
915932

916-
if (!ivpu_hw_40xx_is_idle(vdev) && ivpu_hw_40xx_reset(vdev))
933+
if (!ivpu_hw_40xx_is_idle(vdev) && ivpu_hw_40xx_ip_reset(vdev))
917934
ivpu_warn(vdev, "Failed to reset the VPU\n");
918935

919936
if (ivpu_pll_disable(vdev)) {

0 commit comments

Comments
 (0)