1 /* 2 * SPDX-License-Identifier: MIT 3 * 4 * Copyright © 2019 Intel Corporation 5 */ 6 7 #ifndef INTEL_GT_PM_H 8 #define INTEL_GT_PM_H 9 10 #include <linux/types.h> 11 12 #include "intel_gt_types.h" 13 #include "intel_wakeref.h" 14 15 enum { 16 INTEL_GT_UNPARK, 17 INTEL_GT_PARK, 18 }; 19 20 void intel_gt_pm_get(struct intel_gt *gt); 21 void intel_gt_pm_put(struct intel_gt *gt); 22 23 static inline bool intel_gt_pm_get_if_awake(struct intel_gt *gt) 24 { 25 return intel_wakeref_get_if_active(>->wakeref); 26 } 27 28 void intel_gt_pm_init_early(struct intel_gt *gt); 29 30 void intel_gt_sanitize(struct intel_gt *gt, bool force); 31 int intel_gt_resume(struct intel_gt *gt); 32 void intel_gt_runtime_suspend(struct intel_gt *gt); 33 int intel_gt_runtime_resume(struct intel_gt *gt); 34 35 #endif /* INTEL_GT_PM_H */ 36