ivpu_pm.h (cf79f291f985662150363b4a93d16f88f12643bc) ivpu_pm.h (27d19268cf394f2c78db732be0cb31852eeadb0a)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2020-2023 Intel Corporation
4 */
5
6#ifndef __IVPU_PM_H__
7#define __IVPU_PM_H__
8
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2020-2023 Intel Corporation
4 */
5
6#ifndef __IVPU_PM_H__
7#define __IVPU_PM_H__
8
9#include <linux/rwsem.h>
9#include <linux/types.h>
10
11struct ivpu_device;
12
13struct ivpu_pm_info {
14 struct ivpu_device *vdev;
15 struct delayed_work job_timeout_work;
16 struct work_struct recovery_work;
10#include <linux/types.h>
11
12struct ivpu_device;
13
14struct ivpu_pm_info {
15 struct ivpu_device *vdev;
16 struct delayed_work job_timeout_work;
17 struct work_struct recovery_work;
17 atomic_t in_reset;
18 struct rw_semaphore reset_lock;
18 atomic_t reset_counter;
19 atomic_t reset_counter;
20 atomic_t reset_pending;
19 bool is_warmboot;
20 u32 suspend_reschedule_counter;
21};
22
23void ivpu_pm_init(struct ivpu_device *vdev);
24void ivpu_pm_enable(struct ivpu_device *vdev);
25void ivpu_pm_disable(struct ivpu_device *vdev);
26void ivpu_pm_cancel_recovery(struct ivpu_device *vdev);

--- 5 unchanged lines hidden (view full) ---

32
33void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev);
34void ivpu_pm_reset_done_cb(struct pci_dev *pdev);
35
36int __must_check ivpu_rpm_get(struct ivpu_device *vdev);
37int __must_check ivpu_rpm_get_if_active(struct ivpu_device *vdev);
38void ivpu_rpm_put(struct ivpu_device *vdev);
39
21 bool is_warmboot;
22 u32 suspend_reschedule_counter;
23};
24
25void ivpu_pm_init(struct ivpu_device *vdev);
26void ivpu_pm_enable(struct ivpu_device *vdev);
27void ivpu_pm_disable(struct ivpu_device *vdev);
28void ivpu_pm_cancel_recovery(struct ivpu_device *vdev);

--- 5 unchanged lines hidden (view full) ---

34
35void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev);
36void ivpu_pm_reset_done_cb(struct pci_dev *pdev);
37
38int __must_check ivpu_rpm_get(struct ivpu_device *vdev);
39int __must_check ivpu_rpm_get_if_active(struct ivpu_device *vdev);
40void ivpu_rpm_put(struct ivpu_device *vdev);
41
40void ivpu_pm_schedule_recovery(struct ivpu_device *vdev);
42void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason);
41void ivpu_start_job_timeout_detection(struct ivpu_device *vdev);
42void ivpu_stop_job_timeout_detection(struct ivpu_device *vdev);
43
44#endif /* __IVPU_PM_H__ */
43void ivpu_start_job_timeout_detection(struct ivpu_device *vdev);
44void ivpu_stop_job_timeout_detection(struct ivpu_device *vdev);
45
46#endif /* __IVPU_PM_H__ */