summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-05-18 19:50:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-24 07:55:59 -0400
commit05388ad24a61c43a110e3d235622c23a356b5df7 (patch)
tree98e4eacd09571d8575a49977e268c3410a0e6834 /drivers/gpu/nvgpu/gk20a
parent94226c9c1ed67be2dd146648b0460ef7346a2900 (diff)
gpu: nvgpu: re-arrange parity counters
(1) Re-arrange the structure for parity counters reporting so multiple units can be managed JIRA: GPUT19X-84 Change-Id: If59a883dfe22d5a1d91a6d0ed2f5a6254434ffcb Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1485276 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ecc_gk20a.h48
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h3
3 files changed, 51 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ecc_gk20a.h b/drivers/gpu/nvgpu/gk20a/ecc_gk20a.h
new file mode 100644
index 00000000..8ba01226
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/ecc_gk20a.h
@@ -0,0 +1,48 @@
1/*
2 * GK20A ECC
3 *
4 * Copyright (c) 2017, 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 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef ECC_GK20A_H
19#define ECC_GK20A_H
20
21#include <uapi/linux/nvgpu.h>
22
23struct gk20a_ecc_stat {
24 char **names;
25 u32 *counters;
26 struct hlist_node hash_node;
27};
28
29#ifdef CONFIG_ARCH_TEGRA_18x_SOC
30#include "ecc_t18x.h"
31#endif
32#ifdef CONFIG_TEGRA_19x_GPU
33#include "ecc_t19x.h"
34#endif
35
36struct ecc_gk20a {
37 /* Stats per engine */
38 struct {
39#ifdef CONFIG_ARCH_TEGRA_18x_SOC
40 struct ecc_gr_t18x t18x;
41#endif
42#ifdef CONFIG_TEGRA_19x_GPU
43 struct ecc_gr_t19x t19x;
44#endif
45 } gr;
46};
47
48#endif /*__ECC_GK20A_H__*/
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index cca414a2..68c10284 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -29,6 +29,7 @@ struct gk20a_ctxsw_trace;
29struct acr_desc; 29struct acr_desc;
30struct nvgpu_mem_alloc_tracker; 30struct nvgpu_mem_alloc_tracker;
31struct dbg_profiler_object_data; 31struct dbg_profiler_object_data;
32struct ecc_gk20a;
32 33
33#include <linux/sched.h> 34#include <linux/sched.h>
34#include <nvgpu/lock.h> 35#include <nvgpu/lock.h>
@@ -69,6 +70,7 @@ struct dbg_profiler_object_data;
69#include "pmgr/pmgr.h" 70#include "pmgr/pmgr.h"
70#include "therm/thrm.h" 71#include "therm/thrm.h"
71#endif 72#endif
73#include "ecc_gk20a.h"
72 74
73#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) 75#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
74#define WRITE_ONCE(x, val) \ 76#define WRITE_ONCE(x, val) \
@@ -991,6 +993,7 @@ struct gk20a {
991 struct mm_gk20a mm; 993 struct mm_gk20a mm;
992 struct pmu_gk20a pmu; 994 struct pmu_gk20a pmu;
993 struct acr_desc acr; 995 struct acr_desc acr;
996 struct ecc_gk20a ecc;
994 struct cooling_device_gk20a gk20a_cdev; 997 struct cooling_device_gk20a gk20a_cdev;
995#ifdef CONFIG_ARCH_TEGRA_18x_SOC 998#ifdef CONFIG_ARCH_TEGRA_18x_SOC
996 struct clk_pmupstate clk_pmu; 999 struct clk_pmupstate clk_pmu;
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 5e49edb8..bf936418 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -374,9 +374,6 @@ struct gr_gk20a {
374#ifdef CONFIG_ARCH_TEGRA_18x_SOC 374#ifdef CONFIG_ARCH_TEGRA_18x_SOC
375 struct gr_t18x t18x; 375 struct gr_t18x t18x;
376#endif 376#endif
377#ifdef CONFIG_TEGRA_19x_GPU
378 struct gr_t19x t19x;
379#endif
380 377
381 u32 fbp_en_mask; 378 u32 fbp_en_mask;
382 u32 *fbp_rop_l2_en_mask; 379 u32 *fbp_rop_l2_en_mask;