summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/perf/vfe_var.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/perf/vfe_var.h')
-rw-r--r--drivers/gpu/nvgpu/perf/vfe_var.h97
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
21u32 vfe_var_sw_setup(struct gk20a *g);
22u32 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
31struct 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
39struct vfe_vars {
40 struct boardobjgrp_e32 super;
41 u8 polling_periodms;
42};
43
44struct vfe_var_derived {
45 struct vfe_var super;
46};
47
48struct vfe_var_derived_product {
49 struct vfe_var_derived super;
50 u8 var_idx0;
51 u8 var_idx1;
52};
53
54struct vfe_var_derived_sum {
55 struct vfe_var_derived super;
56 u8 var_idx0;
57 u8 var_idx1;
58};
59
60struct vfe_var_single {
61 struct vfe_var super;
62 u8 override_type;
63 u32 override_value;
64};
65
66struct vfe_var_single_frequency {
67 struct vfe_var_single super;
68};
69
70struct vfe_var_single_voltage {
71 struct vfe_var_single super;
72};
73
74struct vfe_var_single_sensed {
75 struct vfe_var_single super;
76};
77
78struct 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
89struct 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