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