diff options
author | 2024-06-11 14:04:23 +0200 | |
---|---|---|
committer | 2024-06-14 09:13:32 +0200 | |
commit | a19bffb10c46744760e3c91cf6b5b58a998a4ba9 (patch) | |
tree | ebfcdc0f54fa0366fc0d045a938a7cb9b56446ff /drivers/accel/ivpu/ivpu_pm.h | |
parent | accel/ivpu: Disable clock relinquish for MMIO reset (diff) | |
download | wireguard-linux-a19bffb10c46744760e3c91cf6b5b58a998a4ba9.tar.xz wireguard-linux-a19bffb10c46744760e3c91cf6b5b58a998a4ba9.zip |
accel/ivpu: Implement DCT handling
When host system is under heavy load and the NPU is already running
on the lowest frequency, PUNIT may request Duty Cycle Throttling (DCT).
This will further reduce NPU power usage.
PUNIT requests DCT mode using Survabilty IRQ and mailbox register.
The driver then issues a JSM message to the FW that enables
the DCT mode. If the NPU resets while in DCT mode, the driver request
DCT mode during FW boot.
Also add debugfs "dct" file that allows to set arbitrary DCT percentage,
which is used by driver tests.
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Wachowski, Karol <karol.wachowski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-7-jacek.lawrynowicz@linux.intel.com
Diffstat (limited to '')
-rw-r--r-- | drivers/accel/ivpu/ivpu_pm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/accel/ivpu/ivpu_pm.h b/drivers/accel/ivpu/ivpu_pm.h index e524412765be..c08a3ddf09c1 100644 --- a/drivers/accel/ivpu/ivpu_pm.h +++ b/drivers/accel/ivpu/ivpu_pm.h @@ -19,6 +19,7 @@ struct ivpu_pm_info { atomic_t reset_counter; atomic_t reset_pending; bool is_warmboot; + u8 dct_active_percent; }; void ivpu_pm_init(struct ivpu_device *vdev); @@ -42,4 +43,9 @@ void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason); void ivpu_start_job_timeout_detection(struct ivpu_device *vdev); void ivpu_stop_job_timeout_detection(struct ivpu_device *vdev); +int ivpu_pm_dct_init(struct ivpu_device *vdev); +int ivpu_pm_dct_enable(struct ivpu_device *vdev, u8 active_percent); +int ivpu_pm_dct_disable(struct ivpu_device *vdev); +void ivpu_pm_dct_irq_thread_handler(struct ivpu_device *vdev); + #endif /* __IVPU_PM_H__ */ |