We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b5cec3 commit db37a5bCopy full SHA for db37a5b
drivers/accel/ivpu/ivpu_hw_40xx.c
@@ -879,10 +879,18 @@ static bool ivpu_hw_40xx_is_idle(struct ivpu_device *vdev)
879
REG_TEST_FLD(VPU_40XX_BUTTRESS_VPU_STATUS, IDLE, val);
880
}
881
882
+static void ivpu_hw_40xx_save_d0i3_entry_timestamp(struct ivpu_device *vdev)
883
+{
884
+ vdev->hw->d0i3_entry_host_ts = ktime_get_boottime();
885
+ vdev->hw->d0i3_entry_vpu_ts = REGV_RD64(VPU_40XX_CPU_SS_TIM_PERF_EXT_FREE_CNT);
886
+}
887
+
888
static int ivpu_hw_40xx_power_down(struct ivpu_device *vdev)
889
{
890
int ret = 0;
891
892
+ ivpu_hw_40xx_save_d0i3_entry_timestamp(vdev);
893
894
if (!ivpu_hw_40xx_is_idle(vdev) && ivpu_hw_40xx_reset(vdev))
895
ivpu_warn(vdev, "Failed to reset the VPU\n");
896
0 commit comments