diff options
Diffstat (limited to 'include/lpwr/lpwr.h')
-rw-r--r-- | include/lpwr/lpwr.h | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/include/lpwr/lpwr.h b/include/lpwr/lpwr.h deleted file mode 100644 index c38ba62..0000000 --- a/include/lpwr/lpwr.h +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | #ifndef NVGPU_LPWR_H | ||
23 | #define NVGPU_LPWR_H | ||
24 | |||
25 | #define MAX_SWASR_MCLK_FREQ_WITHOUT_WR_TRAINING_MAXWELL_MHZ 540 | ||
26 | |||
27 | #define NV_PMU_PG_PARAM_MCLK_CHANGE_MS_SWASR_ENABLED BIT(0x1) | ||
28 | #define NV_PMU_PG_PARAM_MCLK_CHANGE_GDDR5_WR_TRAINING_ENABLED BIT(0x3) | ||
29 | |||
30 | #define LPWR_ENTRY_COUNT_MAX 0x06 | ||
31 | |||
32 | #define LPWR_VBIOS_IDX_ENTRY_COUNT_MAX (LPWR_ENTRY_COUNT_MAX) | ||
33 | |||
34 | #define LPWR_VBIOS_IDX_ENTRY_RSVD \ | ||
35 | (LPWR_VBIOS_IDX_ENTRY_COUNT_MAX - 1) | ||
36 | |||
37 | #define LPWR_VBIOS_BASE_SAMPLING_PERIOD_DEFAULT (500) | ||
38 | |||
39 | struct nvgpu_lpwr_bios_idx_entry { | ||
40 | u8 pcie_idx; | ||
41 | u8 gr_idx; | ||
42 | u8 ms_idx; | ||
43 | u8 di_idx; | ||
44 | u8 gc6_idx; | ||
45 | }; | ||
46 | |||
47 | struct nvgpu_lpwr_bios_idx_data { | ||
48 | u16 base_sampling_period; | ||
49 | struct nvgpu_lpwr_bios_idx_entry entry[LPWR_VBIOS_IDX_ENTRY_COUNT_MAX]; | ||
50 | }; | ||
51 | |||
52 | #define LPWR_VBIOS_MS_ENTRY_COUNT_MAX (LPWR_ENTRY_COUNT_MAX) | ||
53 | |||
54 | struct nvgpu_lpwr_bios_ms_entry { | ||
55 | bool ms_enabled; | ||
56 | u32 feature_mask; | ||
57 | u32 asr_efficiency_thresholdl; | ||
58 | u16 dynamic_current_logic; | ||
59 | u16 dynamic_current_sram; | ||
60 | }; | ||
61 | |||
62 | struct nvgpu_lpwr_bios_ms_data { | ||
63 | u8 default_entry_idx; | ||
64 | u32 idle_threshold_us; | ||
65 | struct nvgpu_lpwr_bios_ms_entry entry[LPWR_VBIOS_MS_ENTRY_COUNT_MAX]; | ||
66 | }; | ||
67 | |||
68 | #define LPWR_VBIOS_GR_ENTRY_COUNT_MAX (LPWR_ENTRY_COUNT_MAX) | ||
69 | |||
70 | struct nvgpu_lpwr_bios_gr_entry { | ||
71 | bool gr_enabled; | ||
72 | u32 feature_mask; | ||
73 | }; | ||
74 | |||
75 | struct nvgpu_lpwr_bios_gr_data { | ||
76 | u8 default_entry_idx; | ||
77 | u32 idle_threshold_us; | ||
78 | u8 adaptive_gr_multiplier; | ||
79 | struct nvgpu_lpwr_bios_gr_entry entry[LPWR_VBIOS_GR_ENTRY_COUNT_MAX]; | ||
80 | }; | ||
81 | |||
82 | struct nvgpu_lpwr_bios_data { | ||
83 | struct nvgpu_lpwr_bios_idx_data idx; | ||
84 | struct nvgpu_lpwr_bios_ms_data ms; | ||
85 | struct nvgpu_lpwr_bios_gr_data gr; | ||
86 | }; | ||
87 | |||
88 | struct obj_lwpr { | ||
89 | struct nvgpu_lpwr_bios_data lwpr_bios_data; | ||
90 | u32 mclk_change_cache; | ||
91 | }; | ||
92 | |||
93 | u32 nvgpu_lpwr_pg_setup(struct gk20a *g); | ||
94 | int nvgpu_lwpr_mclk_change(struct gk20a *g, u32 pstate); | ||
95 | int nvgpu_lpwr_enable_pg(struct gk20a *g, bool pstate_lock); | ||
96 | int nvgpu_lpwr_disable_pg(struct gk20a *g, bool pstate_lock); | ||
97 | u32 nvgpu_lpwr_is_mscg_supported(struct gk20a *g, u32 pstate_num); | ||
98 | u32 nvgpu_lpwr_is_rppg_supported(struct gk20a *g, u32 pstate_num); | ||
99 | u32 nvgpu_lpwr_post_init(struct gk20a *g); | ||
100 | |||
101 | #endif /* NVGPU_LPWR_H */ | ||