From 05388ad24a61c43a110e3d235622c23a356b5df7 Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 18 May 2017 16:50:57 -0700 Subject: 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 Reviewed-on: http://git-master/r/1485276 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ecc_gk20a.h | 48 +++++++++++++++++++++++++++++++++++++ drivers/gpu/nvgpu/gk20a/gk20a.h | 3 +++ drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 3 --- 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/nvgpu/gk20a/ecc_gk20a.h (limited to 'drivers/gpu/nvgpu/gk20a') 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 @@ +/* + * GK20A ECC + * + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef ECC_GK20A_H +#define ECC_GK20A_H + +#include + +struct gk20a_ecc_stat { + char **names; + u32 *counters; + struct hlist_node hash_node; +}; + +#ifdef CONFIG_ARCH_TEGRA_18x_SOC +#include "ecc_t18x.h" +#endif +#ifdef CONFIG_TEGRA_19x_GPU +#include "ecc_t19x.h" +#endif + +struct ecc_gk20a { + /* Stats per engine */ + struct { +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + struct ecc_gr_t18x t18x; +#endif +#ifdef CONFIG_TEGRA_19x_GPU + struct ecc_gr_t19x t19x; +#endif + } gr; +}; + +#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; struct acr_desc; struct nvgpu_mem_alloc_tracker; struct dbg_profiler_object_data; +struct ecc_gk20a; #include #include @@ -69,6 +70,7 @@ struct dbg_profiler_object_data; #include "pmgr/pmgr.h" #include "therm/thrm.h" #endif +#include "ecc_gk20a.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) #define WRITE_ONCE(x, val) \ @@ -991,6 +993,7 @@ struct gk20a { struct mm_gk20a mm; struct pmu_gk20a pmu; struct acr_desc acr; + struct ecc_gk20a ecc; struct cooling_device_gk20a gk20a_cdev; #ifdef CONFIG_ARCH_TEGRA_18x_SOC 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 { #ifdef CONFIG_ARCH_TEGRA_18x_SOC struct gr_t18x t18x; #endif -#ifdef CONFIG_TEGRA_19x_GPU - struct gr_t19x t19x; -#endif u32 fbp_en_mask; u32 *fbp_rop_l2_en_mask; -- cgit v1.2.2