From e9b03e903c10e1fce9daf5fa7e51b8c4a0b65c95 Mon Sep 17 00:00:00 2001 From: Adeel Raza Date: Fri, 11 Dec 2015 16:16:21 -0800 Subject: gpu: nvgpu: gp10b: add ECC stats sysfs nodes Add sysfs nodes for querying ECC single/double bit error counts. Bug 1699676 Change-Id: I6d5219facadaa17207ac759b88fe19077207d8f1 Signed-off-by: Adeel Raza Reviewed-on: http://git-master/r/935363 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/gr_gp10b.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.h') diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h index c35fb384..bd4b5879 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.h @@ -35,6 +35,13 @@ enum { void gp10b_init_gr(struct gpu_ops *ops); int gr_gp10b_alloc_buffer(struct vm_gk20a *vm, size_t size, struct mem_desc *mem); +void gr_gp10b_create_sysfs(struct platform_device *dev); + +struct ecc_stat { + char **names; + u32 *counters; + struct hlist_node hash_node; +}; struct gr_t18x { struct { @@ -47,6 +54,27 @@ struct gr_t18x { struct dentry *debugfs_dump_ctxsw_stats; } ctx_vars; + struct { + struct ecc_stat sm_lrf_single_err_count; + struct ecc_stat sm_lrf_double_err_count; + + struct ecc_stat sm_shm_sec_count; + struct ecc_stat sm_shm_sed_count; + struct ecc_stat sm_shm_ded_count; + + struct ecc_stat tex_total_sec_pipe0_count; + struct ecc_stat tex_total_ded_pipe0_count; + struct ecc_stat tex_unique_sec_pipe0_count; + struct ecc_stat tex_unique_ded_pipe0_count; + struct ecc_stat tex_total_sec_pipe1_count; + struct ecc_stat tex_total_ded_pipe1_count; + struct ecc_stat tex_unique_sec_pipe1_count; + struct ecc_stat tex_unique_ded_pipe1_count; + + struct ecc_stat l2_sec_count; + struct ecc_stat l2_ded_count; + } ecc_stats; + int cilp_preempt_pending_chid; }; -- cgit v1.2.2