diff options
author | Lakshmanan M <lm@nvidia.com> | 2017-05-19 06:13:13 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-19 12:44:30 -0400 |
commit | dcb744acfbbc11e66cac2d0a674a42e62d908b9d (patch) | |
tree | d8f0cf97fbbe4acd8e68a79669588b5457faa1db /drivers/gpu/nvgpu/gk20a | |
parent | d85aa0064b3e9e1de3f2583499963977286b0d25 (diff) |
gpu: nvgpu: Add GCC exception handling support
Add support for per-chip handling of GCC exception.
JIRA GPUT19X-86
Change-Id: I76ea588dc76b5c821ae5b53529db6dd64b3a856a
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1485836
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/gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index af40c969..9ab0d202 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -304,6 +304,9 @@ struct gpu_ops { | |||
304 | int (*handle_sm_exception)(struct gk20a *g, u32 gpc, u32 tpc, | 304 | int (*handle_sm_exception)(struct gk20a *g, u32 gpc, u32 tpc, |
305 | bool *post_event, struct channel_gk20a *fault_ch, | 305 | bool *post_event, struct channel_gk20a *fault_ch, |
306 | u32 *hww_global_esr); | 306 | u32 *hww_global_esr); |
307 | int (*handle_gcc_exception)(struct gk20a *g, u32 gpc, u32 tpc, | ||
308 | bool *post_event, struct channel_gk20a *fault_ch, | ||
309 | u32 *hww_global_esr); | ||
307 | int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc, | 310 | int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc, |
308 | bool *post_event); | 311 | bool *post_event); |
309 | void (*enable_gpc_exceptions)(struct gk20a *g); | 312 | void (*enable_gpc_exceptions)(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 3486076e..4d41f9ff 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -6348,6 +6348,15 @@ static int gk20a_gr_handle_gpc_exception(struct gk20a *g, bool *post_event, | |||
6348 | * exceptions to be cleared */ | 6348 | * exceptions to be cleared */ |
6349 | gk20a_gr_clear_sm_hww(g, gpc, tpc, global_esr); | 6349 | gk20a_gr_clear_sm_hww(g, gpc, tpc, global_esr); |
6350 | } | 6350 | } |
6351 | |||
6352 | /* Handle GCC exception */ | ||
6353 | if(gr_gpc0_gpccs_gpc_exception_gcc_v(gpc_exception) && | ||
6354 | g->ops.gr.handle_gcc_exception) { | ||
6355 | int gcc_ret = 0; | ||
6356 | gcc_ret = g->ops.gr.handle_gcc_exception(g, gpc, tpc, | ||
6357 | post_event, fault_ch, hww_global_esr); | ||
6358 | ret = ret ? ret : gcc_ret; | ||
6359 | } | ||
6351 | } | 6360 | } |
6352 | 6361 | ||
6353 | return ret; | 6362 | return ret; |