diff options
Diffstat (limited to 'drivers/gpu/nvgpu/volt/volt_policy.h')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_policy.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_policy.h b/drivers/gpu/nvgpu/volt/volt_policy.h new file mode 100644 index 00000000..6adbfd43 --- /dev/null +++ b/drivers/gpu/nvgpu/volt/volt_policy.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | */ | ||
13 | |||
14 | #ifndef _VOLT_POLICY_H_ | ||
15 | #define _VOLT_POLICY_H_ | ||
16 | |||
17 | #define VOLT_POLICY_INDEX_IS_VALID(pvolt, policy_idx) \ | ||
18 | (boardobjgrp_idxisvalid( \ | ||
19 | &((pvolt)->volt_policy_metadata.volt_policies.super), \ | ||
20 | (policy_idx))) | ||
21 | |||
22 | /*! | ||
23 | * extends boardobj providing attributes common to all voltage_policies. | ||
24 | */ | ||
25 | struct voltage_policy { | ||
26 | struct boardobj super; | ||
27 | }; | ||
28 | |||
29 | struct voltage_policy_metadata { | ||
30 | u8 perf_core_vf_seq_policy_idx; | ||
31 | struct boardobjgrp_e32 volt_policies; | ||
32 | }; | ||
33 | |||
34 | /*! | ||
35 | * extends voltage_policy providing attributes | ||
36 | * common to all voltage_policy_split_rail. | ||
37 | */ | ||
38 | struct voltage_policy_split_rail { | ||
39 | struct voltage_policy super; | ||
40 | u8 rail_idx_master; | ||
41 | u8 rail_idx_slave; | ||
42 | u8 delta_min_vfe_equ_idx; | ||
43 | u8 delta_max_vfe_equ_idx; | ||
44 | s32 offset_delta_min_uv; | ||
45 | s32 offset_delta_max_uv; | ||
46 | }; | ||
47 | |||
48 | struct voltage_policy_split_rail_single_step { | ||
49 | struct voltage_policy_split_rail super; | ||
50 | }; | ||
51 | |||
52 | struct voltage_policy_split_rail_multi_step { | ||
53 | struct voltage_policy_split_rail super; | ||
54 | u16 inter_switch_delay_us; | ||
55 | }; | ||
56 | |||
57 | struct voltage_policy_single_rail { | ||
58 | struct voltage_policy super; | ||
59 | u8 rail_idx; | ||
60 | }; | ||
61 | |||
62 | u32 volt_policy_sw_setup(struct gk20a *g); | ||
63 | u32 volt_policy_pmu_setup(struct gk20a *g); | ||
64 | #endif | ||