summaryrefslogtreecommitdiff
path: root/drivers/accel/ivpu/ivpu_pm.h
diff options
context:
space:
mode:
authorKarol Wachowski <karol.wachowski@linux.intel.com>2023-10-20 12:44:58 +0200
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>2023-10-23 08:59:20 +0200
commitc39dc15191c4d40c58ce986e5f0daf94c84b7324 (patch)
tree06836709fea6989bae0ee4d9ef22dd00ad0c00e8 /drivers/accel/ivpu/ivpu_pm.h
parent74ce0f3873821f12391bcf5469d81583d34f4c6c (diff)
accel/ivpu: Read clock rate only if device is up
Do not unnecessarily wake up device to read clock rate. Return 0 as clk_rate if device is suspended. Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231020104501.697763-4-stanislaw.gruszka@linux.intel.com
Diffstat (limited to 'drivers/accel/ivpu/ivpu_pm.h')
-rw-r--r--drivers/accel/ivpu/ivpu_pm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/accel/ivpu/ivpu_pm.h b/drivers/accel/ivpu/ivpu_pm.h
index f41c30a14a40..044db150be07 100644
--- a/drivers/accel/ivpu/ivpu_pm.h
+++ b/drivers/accel/ivpu/ivpu_pm.h
@@ -33,6 +33,7 @@ void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev);
void ivpu_pm_reset_done_cb(struct pci_dev *pdev);
int __must_check ivpu_rpm_get(struct ivpu_device *vdev);
+int __must_check ivpu_rpm_get_if_active(struct ivpu_device *vdev);
void ivpu_rpm_put(struct ivpu_device *vdev);
void ivpu_pm_schedule_recovery(struct ivpu_device *vdev);