| 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* |
| 3 | * Copyright © 2022 Intel Corporation |
| 4 | */ |
| 5 | |
| 6 | #ifndef _XE_GUC_PC_H_ |
| 7 | #define _XE_GUC_PC_H_ |
| 8 | |
| 9 | #include <linux/types.h> |
| 10 | |
| 11 | struct xe_guc_pc; |
| 12 | enum slpc_gucrc_mode; |
| 13 | struct drm_printer; |
| 14 | |
| 15 | int xe_guc_pc_init(struct xe_guc_pc *pc); |
| 16 | int xe_guc_pc_start(struct xe_guc_pc *pc); |
| 17 | int xe_guc_pc_stop(struct xe_guc_pc *pc); |
| 18 | int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc); |
| 19 | int xe_guc_pc_override_gucrc_mode(struct xe_guc_pc *pc, enum slpc_gucrc_mode mode); |
| 20 | int xe_guc_pc_unset_gucrc_mode(struct xe_guc_pc *pc); |
| 21 | void xe_guc_pc_print(struct xe_guc_pc *pc, struct drm_printer *p); |
| 22 | |
| 23 | u32 xe_guc_pc_get_act_freq(struct xe_guc_pc *pc); |
| 24 | int xe_guc_pc_get_cur_freq(struct xe_guc_pc *pc, u32 *freq); |
| 25 | u32 xe_guc_pc_get_cur_freq_fw(struct xe_guc_pc *pc); |
| 26 | u32 xe_guc_pc_get_rp0_freq(struct xe_guc_pc *pc); |
| 27 | u32 xe_guc_pc_get_rpa_freq(struct xe_guc_pc *pc); |
| 28 | u32 xe_guc_pc_get_rpe_freq(struct xe_guc_pc *pc); |
| 29 | u32 xe_guc_pc_get_rpn_freq(struct xe_guc_pc *pc); |
| 30 | int xe_guc_pc_get_min_freq(struct xe_guc_pc *pc, u32 *freq); |
| 31 | int xe_guc_pc_set_min_freq(struct xe_guc_pc *pc, u32 freq); |
| 32 | int xe_guc_pc_get_max_freq(struct xe_guc_pc *pc, u32 *freq); |
| 33 | int xe_guc_pc_set_max_freq(struct xe_guc_pc *pc, u32 freq); |
| 34 | int xe_guc_pc_set_power_profile(struct xe_guc_pc *pc, const char *buf); |
| 35 | void xe_guc_pc_get_power_profile(struct xe_guc_pc *pc, char *profile); |
| 36 | |
| 37 | enum xe_gt_idle_state xe_guc_pc_c_status(struct xe_guc_pc *pc); |
| 38 | u64 xe_guc_pc_rc6_residency(struct xe_guc_pc *pc); |
| 39 | u64 xe_guc_pc_mc6_residency(struct xe_guc_pc *pc); |
| 40 | void xe_guc_pc_init_early(struct xe_guc_pc *pc); |
| 41 | int xe_guc_pc_restore_stashed_freq(struct xe_guc_pc *pc); |
| 42 | void xe_guc_pc_raise_unslice(struct xe_guc_pc *pc); |
| 43 | void xe_guc_pc_apply_flush_freq_limit(struct xe_guc_pc *pc); |
| 44 | void xe_guc_pc_remove_flush_freq_limit(struct xe_guc_pc *pc); |
| 45 | |
| 46 | #endif /* _XE_GUC_PC_H_ */ |
| 47 | |