xref: /linux/drivers/gpu/drm/xe/xe_guc_pc_types.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
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 	/** @stashed_min_freq: Stash the current minimum freq */
29 	u32 stashed_min_freq;
30 	/** @stashed_max_freq: Stash the current maximum freq */
31 	u32 stashed_max_freq;
32 	/** @freq_lock: Let's protect the frequencies */
33 	struct mutex freq_lock;
34 	/** @freq_ready: Only handle freq changes, if they are really ready */
35 	bool freq_ready;
36 };
37 
38 #endif	/* _XE_GUC_PC_TYPES_H_ */
39