summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/perf/vfe_equ.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/vfe_equ.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/vfe_equ.h')
-rw-r--r--drivers/gpu/nvgpu/perf/vfe_equ.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/perf/vfe_equ.h b/drivers/gpu/nvgpu/perf/vfe_equ.h
new file mode 100644
index 00000000..8aaddccd
--- /dev/null
+++ b/drivers/gpu/nvgpu/perf/vfe_equ.h
@@ -0,0 +1,76 @@
1/*
2 * general perf structures & definitions
3 *
4 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 */
15#ifndef _VFE_EQU_H_
16#define _VFE_EQU_H_
17
18#include "boardobj/boardobjgrp.h"
19#include "perf/vfe_var.h"
20#include "pmuif/gpmuifperf.h"
21#include "pmuif/gpmuifperfvfe.h"
22
23u32 vfe_equ_sw_setup(struct gk20a *g);
24u32 vfe_equ_pmu_setup(struct gk20a *g);
25
26#define VFE_EQU_GET(_pperf, _idx) \
27 ((struct vfe_equ *)BOARDOBJGRP_OBJ_GET_BY_IDX( \
28 &((_pperf)->vfe.equs.super.super), (_idx)))
29
30#define VFE_EQU_IDX_IS_VALID(_pperf, _idx) \
31 boardobjgrp_idxisvalid(&((_pperf)->vfe.equs.super.super), (_idx))
32
33#define VFE_EQU_OUTPUT_TYPE_IS_VALID(_pperf, _idx, _outputtype) \
34 (VFE_EQU_IDX_IS_VALID((_pperf), (_idx)) && \
35 ((_outputtype) != CTRL_PERF_VFE_EQU_OUTPUT_TYPE_UNITLESS) && \
36 ((VFE_EQU_GET((_pperf), (_idx))->outputtype == (_outputtype)) || \
37 (VFE_EQU_GET((_pperf), (_idx))->outputtype == \
38 CTRL_PERF_VFE_EQU_OUTPUT_TYPE_UNITLESS)))
39
40struct vfe_equ {
41 struct boardobj super;
42 u8 var_idx;
43 u8 equ_idx_next;
44 u8 output_type;
45 u32 out_range_min;
46 u32 out_range_max;
47
48 bool b_is_dynamic_valid;
49 bool b_is_dynamic;
50};
51
52struct vfe_equs {
53 struct boardobjgrp_e255 super;
54};
55
56struct vfe_equ_compare {
57 struct vfe_equ super;
58 u8 func_id;
59 u8 equ_idx_true;
60 u8 equ_idx_false;
61 u32 criteria;
62};
63
64struct vfe_equ_minmax {
65 struct vfe_equ super;
66 bool b_max;
67 u8 equ_idx0;
68 u8 equ_idx1;
69};
70
71struct vfe_equ_quadratic {
72 struct vfe_equ super;
73 u32 coeffs[CTRL_PERF_VFE_EQU_QUADRATIC_COEFF_COUNT];
74};
75
76#endif