diff options
Diffstat (limited to 'drivers/gpu/nvgpu/perf/perf.h')
-rw-r--r-- | drivers/gpu/nvgpu/perf/perf.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/perf/perf.h b/drivers/gpu/nvgpu/perf/perf.h new file mode 100644 index 00000000..310bde8c --- /dev/null +++ b/drivers/gpu/nvgpu/perf/perf.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, 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 _PERF_H_ | ||
23 | #define _PERF_H_ | ||
24 | |||
25 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | ||
26 | #include "vfe_equ.h" | ||
27 | #include "vfe_var.h" | ||
28 | #include "pstate/pstate.h" | ||
29 | #include "gk20a/gk20a.h" | ||
30 | #include "volt/volt.h" | ||
31 | #include "lpwr/lpwr.h" | ||
32 | #include "boardobj/boardobjgrp_e255.h" | ||
33 | |||
34 | #define CTRL_PERF_VFE_VAR_TYPE_INVALID 0x00 | ||
35 | #define CTRL_PERF_VFE_VAR_TYPE_DERIVED 0x01 | ||
36 | #define CTRL_PERF_VFE_VAR_TYPE_DERIVED_PRODUCT 0x02 | ||
37 | #define CTRL_PERF_VFE_VAR_TYPE_DERIVED_SUM 0x03 | ||
38 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE 0x04 | ||
39 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE_FREQUENCY 0x05 | ||
40 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED 0x06 | ||
41 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED_FUSE 0x07 | ||
42 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED_TEMP 0x08 | ||
43 | #define CTRL_PERF_VFE_VAR_TYPE_SINGLE_VOLTAGE 0x09 | ||
44 | |||
45 | #define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_NONE 0x00 | ||
46 | #define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_VALUE 0x01 | ||
47 | #define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_OFFSET 0x02 | ||
48 | #define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_SCALE 0x03 | ||
49 | |||
50 | #define CTRL_PERF_VFE_EQU_TYPE_INVALID 0x00 | ||
51 | #define CTRL_PERF_VFE_EQU_TYPE_COMPARE 0x01 | ||
52 | #define CTRL_PERF_VFE_EQU_TYPE_MINMAX 0x02 | ||
53 | #define CTRL_PERF_VFE_EQU_TYPE_QUADRATIC 0x03 | ||
54 | |||
55 | #define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_UNITLESS 0x00 | ||
56 | #define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_FREQ_MHZ 0x01 | ||
57 | #define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VOLT_UV 0x02 | ||
58 | #define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VF_GAIN 0x03 | ||
59 | #define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VOLT_DELTA_UV 0x04 | ||
60 | |||
61 | #define CTRL_PERF_VFE_EQU_QUADRATIC_COEFF_COUNT 0x03 | ||
62 | |||
63 | #define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_EQUAL 0x00 | ||
64 | #define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER_EQ 0x01 | ||
65 | #define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER 0x02 | ||
66 | |||
67 | struct perf_pmupstate { | ||
68 | struct vfe_vars vfe_varobjs; | ||
69 | struct vfe_equs vfe_equobjs; | ||
70 | struct pstates pstatesobjs; | ||
71 | struct obj_volt volt; | ||
72 | struct obj_lwpr lpwr; | ||
73 | }; | ||
74 | |||
75 | u32 perf_pmu_vfe_load(struct gk20a *g); | ||
76 | |||
77 | #endif | ||