Lines Matching defs:gt

14 static inline bool intel_gt_pm_is_awake(const struct intel_gt *gt)
16 return intel_wakeref_is_active(&gt->wakeref);
19 static inline void intel_gt_pm_get_untracked(struct intel_gt *gt)
21 intel_wakeref_get(&gt->wakeref);
24 static inline intel_wakeref_t intel_gt_pm_get(struct intel_gt *gt)
26 intel_gt_pm_get_untracked(gt);
27 return intel_wakeref_track(&gt->wakeref);
30 static inline void __intel_gt_pm_get(struct intel_gt *gt)
32 __intel_wakeref_get(&gt->wakeref);
35 static inline intel_wakeref_t intel_gt_pm_get_if_awake(struct intel_gt *gt)
37 if (!intel_wakeref_get_if_active(&gt->wakeref))
40 return intel_wakeref_track(&gt->wakeref);
43 static inline void intel_gt_pm_might_get(struct intel_gt *gt)
45 intel_wakeref_might_get(&gt->wakeref);
48 static inline void intel_gt_pm_put_untracked(struct intel_gt *gt)
50 intel_wakeref_put(&gt->wakeref);
53 static inline void intel_gt_pm_put(struct intel_gt *gt, intel_wakeref_t handle)
55 intel_wakeref_untrack(&gt->wakeref, handle);
56 intel_gt_pm_put_untracked(gt);
59 static inline void intel_gt_pm_put_async_untracked(struct intel_gt *gt)
61 intel_wakeref_put_async(&gt->wakeref);
64 static inline void intel_gt_pm_might_put(struct intel_gt *gt)
66 intel_wakeref_might_put(&gt->wakeref);
69 static inline void intel_gt_pm_put_async(struct intel_gt *gt, intel_wakeref_t handle)
71 intel_wakeref_untrack(&gt->wakeref, handle);
72 intel_gt_pm_put_async_untracked(gt);
75 #define with_intel_gt_pm(gt, wf) \
76 for (wf = intel_gt_pm_get(gt); wf; intel_gt_pm_put(gt, wf), wf = 0)
83 * @gt: pointer to the gt
86 #define with_intel_gt_pm_if_awake(gt, wf) \
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)
91 return intel_wakeref_wait_for_idle(&gt->wakeref);
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)
110 return I915_SELFTEST_ONLY(gt->awake == -ENODEV);