1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2021 Intel Corporation 4 */ 5 6 #ifndef _INTEL_GUC_SLPC_TYPES_H_ 7 #define _INTEL_GUC_SLPC_TYPES_H_ 8 9 #include <linux/atomic.h> 10 #include <linux/workqueue.h> 11 #include <linux/mutex.h> 12 #include <linux/types.h> 13 14 #define SLPC_RESET_TIMEOUT_MS 5 15 16 struct intel_guc_slpc { 17 struct i915_vma *vma; 18 struct slpc_shared_data *vaddr; 19 bool supported; 20 bool selected; 21 22 /* platform frequency limits */ 23 u32 min_freq; 24 u32 rp0_freq; 25 u32 rp1_freq; 26 u32 boost_freq; 27 28 /* frequency softlimits */ 29 u32 min_freq_softlimit; 30 u32 max_freq_softlimit; 31 32 /* cached media ratio mode */ 33 u32 media_ratio_mode; 34 35 /* Protects set/reset of boost freq 36 * and value of num_waiters 37 */ 38 struct mutex lock; 39 40 struct work_struct boost_work; 41 atomic_t num_waiters; 42 u32 num_boosts; 43 }; 44 45 #endif 46