summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/perf/perf.h
diff options
context:
space:
mode:
authorVijayakumar Subbu <vsubbu@nvidia.com>2016-07-30 13:44:30 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:49 -0500
commit432017248e432df0619dc2df30f915a52634338f (patch)
tree40bb7a77983fb2753271bc46b346a44ebd6121cf /drivers/gpu/nvgpu/perf/perf.h
parent38ad90b4840434df4650c617a236e1b01f8a43c6 (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/perf.h')
-rw-r--r--drivers/gpu/nvgpu/perf/perf.h60
1 files changed, 60 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..02aed7a6
--- /dev/null
+++ b/drivers/gpu/nvgpu/perf/perf.h
@@ -0,0 +1,60 @@
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#ifndef _PERF_H_
14#define _PERF_H_
15
16#include "vfe_equ.h"
17#include "vfe_var.h"
18#include "gk20a/gk20a.h"
19
20#define CTRL_PERF_VFE_VAR_TYPE_INVALID 0x00
21#define CTRL_PERF_VFE_VAR_TYPE_DERIVED 0x01
22#define CTRL_PERF_VFE_VAR_TYPE_DERIVED_PRODUCT 0x02
23#define CTRL_PERF_VFE_VAR_TYPE_DERIVED_SUM 0x03
24#define CTRL_PERF_VFE_VAR_TYPE_SINGLE 0x04
25#define CTRL_PERF_VFE_VAR_TYPE_SINGLE_FREQUENCY 0x05
26#define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED 0x06
27#define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED_FUSE 0x07
28#define CTRL_PERF_VFE_VAR_TYPE_SINGLE_SENSED_TEMP 0x08
29#define CTRL_PERF_VFE_VAR_TYPE_SINGLE_VOLTAGE 0x09
30
31#define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_NONE 0x00
32#define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_VALUE 0x01
33#define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_OFFSET 0x02
34#define CTRL_PERF_VFE_VAR_SINGLE_OVERRIDE_TYPE_SCALE 0x03
35
36#define CTRL_PERF_VFE_EQU_TYPE_INVALID 0x00
37#define CTRL_PERF_VFE_EQU_TYPE_COMPARE 0x01
38#define CTRL_PERF_VFE_EQU_TYPE_MINMAX 0x02
39#define CTRL_PERF_VFE_EQU_TYPE_QUADRATIC 0x03
40
41#define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_UNITLESS 0x00
42#define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_FREQ_MHZ 0x01
43#define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VOLT_UV 0x02
44#define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VF_GAIN 0x03
45#define CTRL_PERF_VFE_EQU_OUTPUT_TYPE_VOLT_DELTA_UV 0x04
46
47#define CTRL_PERF_VFE_EQU_QUADRATIC_COEFF_COUNT 0x03
48
49#define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_EQUAL 0x00
50#define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER_EQ 0x01
51#define CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER 0x02
52
53struct perf_pmupstate {
54 struct vfe_vars vfe_varobjs;
55 struct vfe_equs vfe_equobjs;
56};
57
58u32 perf_pmu_vfe_load(struct gk20a *g);
59
60#endif