drm/i915/guc/slpc: Define and initialize boost frequency
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / gt / uc / intel_guc_slpc_types.h
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         /* Protects set/reset of boost freq
33          * and value of num_waiters
34          */
35         struct mutex lock;
36
37         struct work_struct boost_work;
38         atomic_t num_waiters;
39         u32 num_boosts;
40 };
41
42 #endif