xref: /linux/drivers/gpu/drm/xe/xe_guc_pc_types.h (revision 021bc4b9)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_GUC_PC_TYPES_H_
7 #define _XE_GUC_PC_TYPES_H_
8 
9 #include <linux/mutex.h>
10 #include <linux/types.h>
11 
12 /**
13  * struct xe_guc_pc - GuC Power Conservation (PC)
14  */
15 struct xe_guc_pc {
16 	/** @bo: GGTT buffer object that is shared with GuC PC */
17 	struct xe_bo *bo;
18 	/** @rp0_freq: HW RP0 frequency - The Maximum one */
19 	u32 rp0_freq;
20 	/** @rpe_freq: HW RPe frequency - The Efficient one */
21 	u32 rpe_freq;
22 	/** @rpn_freq: HW RPN frequency - The Minimum one */
23 	u32 rpn_freq;
24 	/** @user_requested_min: Stash the minimum requested freq by user */
25 	u32 user_requested_min;
26 	/** @user_requested_max: Stash the maximum requested freq by user */
27 	u32 user_requested_max;
28 	/** @freq_lock: Let's protect the frequencies */
29 	struct mutex freq_lock;
30 	/** @freq_ready: Only handle freq changes, if they are really ready */
31 	bool freq_ready;
32 };
33 
34 #endif	/* _XE_GUC_PC_TYPES_H_ */
35