diff options
author | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2023-01-17 12:27:23 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2023-01-19 13:12:08 +0300 |
commit | 852be13f3bd32c1eab808840cfac41b1fea25991 (patch) | |
tree | 4ad314eea23481fea7a534e5b2805b72879a7554 /drivers/accel/ivpu/ivpu_fw.c | |
parent | cd7272215c44676dba236491941c6c406701cc5e (diff) | |
download | linux-852be13f3bd32c1eab808840cfac41b1fea25991.tar.xz |
accel/ivpu: Add PM support
- Implement cold and warm firmware boot flows
- Add hang recovery support
- Add runtime power management support
Co-developed-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Signed-off-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230117092723.60441-8-jacek.lawrynowicz@linux.intel.com
Diffstat (limited to 'drivers/accel/ivpu/ivpu_fw.c')
-rw-r--r-- | drivers/accel/ivpu/ivpu_fw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c index 4baa0767a10d..b463c24adb70 100644 --- a/drivers/accel/ivpu/ivpu_fw.c +++ b/drivers/accel/ivpu/ivpu_fw.c @@ -14,6 +14,7 @@ #include "ivpu_gem.h" #include "ivpu_hw.h" #include "ivpu_ipc.h" +#include "ivpu_pm.h" #define FW_GLOBAL_MEM_START (2ull * SZ_1G) #define FW_GLOBAL_MEM_END (3ull * SZ_1G) @@ -361,9 +362,12 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params /* In case of warm boot we only have to reset the entrypoint addr */ if (!ivpu_fw_is_cold_boot(vdev)) { boot_params->save_restore_ret_address = 0; + vdev->pm->is_warmboot = true; return; } + vdev->pm->is_warmboot = false; + boot_params->magic = VPU_BOOT_PARAMS_MAGIC; boot_params->vpu_id = to_pci_dev(vdev->drm.dev)->bus->number; boot_params->frequency = ivpu_hw_reg_pll_freq_get(vdev); |