xref: /linux/drivers/gpu/drm/xe/xe_guc_pc.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
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 "xe_guc_pc_types.h"
10 
11 int xe_guc_pc_init(struct xe_guc_pc *pc);
12 int xe_guc_pc_start(struct xe_guc_pc *pc);
13 int xe_guc_pc_stop(struct xe_guc_pc *pc);
14 int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc);
15 
16 u32 xe_guc_pc_get_act_freq(struct xe_guc_pc *pc);
17 int xe_guc_pc_get_cur_freq(struct xe_guc_pc *pc, u32 *freq);
18 u32 xe_guc_pc_get_rp0_freq(struct xe_guc_pc *pc);
19 u32 xe_guc_pc_get_rpe_freq(struct xe_guc_pc *pc);
20 u32 xe_guc_pc_get_rpn_freq(struct xe_guc_pc *pc);
21 int xe_guc_pc_get_min_freq(struct xe_guc_pc *pc, u32 *freq);
22 int xe_guc_pc_set_min_freq(struct xe_guc_pc *pc, u32 freq);
23 int xe_guc_pc_get_max_freq(struct xe_guc_pc *pc, u32 *freq);
24 int xe_guc_pc_set_max_freq(struct xe_guc_pc *pc, u32 freq);
25 
26 enum xe_gt_idle_state xe_guc_pc_c_status(struct xe_guc_pc *pc);
27 u64 xe_guc_pc_rc6_residency(struct xe_guc_pc *pc);
28 u64 xe_guc_pc_mc6_residency(struct xe_guc_pc *pc);
29 void xe_guc_pc_init_early(struct xe_guc_pc *pc);
30 #endif /* _XE_GUC_PC_H_ */
31