diff options
author | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-30 13:44:30 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:49 -0500 |
commit | 432017248e432df0619dc2df30f915a52634338f (patch) | |
tree | 40bb7a77983fb2753271bc46b346a44ebd6121cf /drivers/gpu/nvgpu/perf/vfe_var.h | |
parent | 38ad90b4840434df4650c617a236e1b01f8a43c6 (diff) |
gpu: nvgpu: Add dGPU clocks support
JIRA DNVGPU-42
Change-Id: Ic2fca9d0cf82f2823654ac5e8f0772a1eec7b3b5
Signed-off-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1205850
(cherry picked from commit b9f5c6bc4e649162d63e33d65b725872340ca114)
Reviewed-on: http://git-master/r/1227257
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/perf/vfe_var.h')
-rw-r--r-- | drivers/gpu/nvgpu/perf/vfe_var.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/perf/vfe_var.h b/drivers/gpu/nvgpu/perf/vfe_var.h new file mode 100644 index 00000000..fc43311b --- /dev/null +++ b/drivers/gpu/nvgpu/perf/vfe_var.h | |||
@@ -0,0 +1,97 @@ | |||
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 _VFE_VAR_H_ | ||
15 | #define _VFE_VAR_H_ | ||
16 | |||
17 | #include "boardobj/boardobjgrp.h" | ||
18 | #include "pmuif/gpmuifperf.h" | ||
19 | #include "pmuif/gpmuifperfvfe.h" | ||
20 | |||
21 | u32 vfe_var_sw_setup(struct gk20a *g); | ||
22 | u32 vfe_var_pmu_setup(struct gk20a *g); | ||
23 | |||
24 | #define VFE_VAR_GET(_pperf, _idx) \ | ||
25 | ((struct vfe_var)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | ||
26 | &((_pperf)->vfe.vars.super.super), (_idx))) | ||
27 | |||
28 | #define VFE_VAR_IDX_IS_VALID(_pperf, _idx) \ | ||
29 | boardobjgrp_idxisvalid(&((_pperf)->vfe.vars.super.super), (_idx)) | ||
30 | |||
31 | struct vfe_var { | ||
32 | struct boardobj super; | ||
33 | u32 out_range_min; | ||
34 | u32 out_range_max; | ||
35 | bool b_is_dynamic_valid; | ||
36 | bool b_is_dynamic; | ||
37 | }; | ||
38 | |||
39 | struct vfe_vars { | ||
40 | struct boardobjgrp_e32 super; | ||
41 | u8 polling_periodms; | ||
42 | }; | ||
43 | |||
44 | struct vfe_var_derived { | ||
45 | struct vfe_var super; | ||
46 | }; | ||
47 | |||
48 | struct vfe_var_derived_product { | ||
49 | struct vfe_var_derived super; | ||
50 | u8 var_idx0; | ||
51 | u8 var_idx1; | ||
52 | }; | ||
53 | |||
54 | struct vfe_var_derived_sum { | ||
55 | struct vfe_var_derived super; | ||
56 | u8 var_idx0; | ||
57 | u8 var_idx1; | ||
58 | }; | ||
59 | |||
60 | struct vfe_var_single { | ||
61 | struct vfe_var super; | ||
62 | u8 override_type; | ||
63 | u32 override_value; | ||
64 | }; | ||
65 | |||
66 | struct vfe_var_single_frequency { | ||
67 | struct vfe_var_single super; | ||
68 | }; | ||
69 | |||
70 | struct vfe_var_single_voltage { | ||
71 | struct vfe_var_single super; | ||
72 | }; | ||
73 | |||
74 | struct vfe_var_single_sensed { | ||
75 | struct vfe_var_single super; | ||
76 | }; | ||
77 | |||
78 | struct vfe_var_single_sensed_fuse { | ||
79 | struct vfe_var_single_sensed super; | ||
80 | struct nv_pmu_vfe_var_single_sensed_fuse_override_info override_info; | ||
81 | struct nv_pmu_vfe_var_single_sensed_fuse_vfield_info vfield_info; | ||
82 | struct nv_pmu_vfe_var_single_sensed_fuse_ver_vfield_info vfield_ver_info; | ||
83 | u32 fuse_value_integer; | ||
84 | u32 fuse_value_hw_integer; | ||
85 | u8 fuse_version; | ||
86 | bool b_version_check_done; | ||
87 | }; | ||
88 | |||
89 | struct vfe_var_single_sensed_temp { | ||
90 | struct vfe_var_single_sensed super; | ||
91 | u8 therm_channel_index; | ||
92 | int temp_hysteresis_positive; | ||
93 | int temp_hysteresis_negative; | ||
94 | int temp_default; | ||
95 | }; | ||
96 | |||
97 | #endif | ||