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 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 drivers/gpu/nvgpu/gk20a/ecc_gk20a.h (limited to 'drivers/gpu/nvgpu/gk20a/ecc_gk20a.h') 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__*/ -- cgit v1.2.2