From a1220b49ae94a2781c5a0ad11f504520e2aa11ca Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 25 May 2017 15:59:24 -0700 Subject: gpu: nvgpu : GPC MMU ECC support Adding support for handling of GPC MMU errors JIRA: GPUT19X-112 Change-Id: Iadeef017587e5dce3698026eef4ad94676c3c02b Signed-off-by: David Nieto Reviewed-on: http://git-master/r/1490771 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 ++ drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 899c1d6a..89b414be 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -313,6 +313,8 @@ struct gpu_ops { bool *post_event); int (*handle_gpc_gpccs_exception)(struct gk20a *g, u32 gpc, u32 gpc_exception); + int (*handle_gpc_gpcmmu_exception)(struct gk20a *g, u32 gpc, + u32 gpc_exception); void (*enable_gpc_exceptions)(struct gk20a *g); void (*enable_exceptions)(struct gk20a *g); void (*create_gr_sysfs)(struct device *dev); diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 982cfac8..3b46b807 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -6378,6 +6378,16 @@ static int gk20a_gr_handle_gpc_exception(struct gk20a *g, bool *post_event, gpc_exception); ret = ret ? ret : ret_ecc; } + + /* Handle GPCMMU exceptions */ + if (g->ops.gr.handle_gpc_gpcmmu_exception) { + int ret_mmu = 0; + + ret_mmu = g->ops.gr.handle_gpc_gpcmmu_exception(g, gpc, + gpc_exception); + ret = ret ? ret : ret_mmu; + } + } return ret; -- cgit v1.2.2