Lines Matching full:gt
14 static inline bool intel_gt_pm_is_awake(const struct intel_gt *gt) in intel_gt_pm_is_awake() argument
16 return intel_wakeref_is_active(>->wakeref); in intel_gt_pm_is_awake()
19 static inline void intel_gt_pm_get_untracked(struct intel_gt *gt) in intel_gt_pm_get_untracked() argument
21 intel_wakeref_get(>->wakeref); in intel_gt_pm_get_untracked()
24 static inline intel_wakeref_t intel_gt_pm_get(struct intel_gt *gt) in intel_gt_pm_get() argument
26 intel_gt_pm_get_untracked(gt); in intel_gt_pm_get()
27 return intel_wakeref_track(>->wakeref); in intel_gt_pm_get()
30 static inline void __intel_gt_pm_get(struct intel_gt *gt) in __intel_gt_pm_get() argument
32 __intel_wakeref_get(>->wakeref); in __intel_gt_pm_get()
35 static inline intel_wakeref_t intel_gt_pm_get_if_awake(struct intel_gt *gt) in intel_gt_pm_get_if_awake() argument
37 if (!intel_wakeref_get_if_active(>->wakeref)) in intel_gt_pm_get_if_awake()
40 return intel_wakeref_track(>->wakeref); in intel_gt_pm_get_if_awake()
43 static inline void intel_gt_pm_might_get(struct intel_gt *gt) in intel_gt_pm_might_get() argument
45 intel_wakeref_might_get(>->wakeref); in intel_gt_pm_might_get()
48 static inline void intel_gt_pm_put_untracked(struct intel_gt *gt) in intel_gt_pm_put_untracked() argument
50 intel_wakeref_put(>->wakeref); in intel_gt_pm_put_untracked()
53 static inline void intel_gt_pm_put(struct intel_gt *gt, intel_wakeref_t handle) in intel_gt_pm_put() argument
55 intel_wakeref_untrack(>->wakeref, handle); in intel_gt_pm_put()
56 intel_gt_pm_put_untracked(gt); in intel_gt_pm_put()
59 static inline void intel_gt_pm_put_async_untracked(struct intel_gt *gt) in intel_gt_pm_put_async_untracked() argument
61 intel_wakeref_put_async(>->wakeref); in intel_gt_pm_put_async_untracked()
64 static inline void intel_gt_pm_might_put(struct intel_gt *gt) in intel_gt_pm_might_put() argument
66 intel_wakeref_might_put(>->wakeref); in intel_gt_pm_might_put()
69 static inline void intel_gt_pm_put_async(struct intel_gt *gt, intel_wakeref_t handle) in intel_gt_pm_put_async() argument
71 intel_wakeref_untrack(>->wakeref, handle); in intel_gt_pm_put_async()
72 intel_gt_pm_put_async_untracked(gt); in intel_gt_pm_put_async()
75 #define with_intel_gt_pm(gt, wf) \ argument
76 for (wf = intel_gt_pm_get(gt); wf; intel_gt_pm_put(gt, wf), wf = 0)
79 * with_intel_gt_pm_if_awake - if GT is PM awake, get a reference to prevent
83 * @gt: pointer to the gt
86 #define with_intel_gt_pm_if_awake(gt, wf) \ argument
87 for (wf = intel_gt_pm_get_if_awake(gt); wf; intel_gt_pm_put_async(gt, wf), wf = 0)
89 static inline int intel_gt_pm_wait_for_idle(struct intel_gt *gt) in intel_gt_pm_wait_for_idle() argument
91 return intel_wakeref_wait_for_idle(>->wakeref); in intel_gt_pm_wait_for_idle()
94 void intel_gt_pm_init_early(struct intel_gt *gt);
95 void intel_gt_pm_init(struct intel_gt *gt);
96 void intel_gt_pm_fini(struct intel_gt *gt);
98 void intel_gt_suspend_prepare(struct intel_gt *gt);
99 void intel_gt_suspend_late(struct intel_gt *gt);
100 int intel_gt_resume(struct intel_gt *gt);
101 void intel_gt_resume_early(struct intel_gt *gt);
103 void intel_gt_runtime_suspend(struct intel_gt *gt);
104 int intel_gt_runtime_resume(struct intel_gt *gt);
106 ktime_t intel_gt_get_awake_time(const struct intel_gt *gt);
108 static inline bool is_mock_gt(const struct intel_gt *gt) in is_mock_gt() argument
110 return I915_SELFTEST_ONLY(gt->awake == -ENODEV); in is_mock_gt()