summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-05-12 14:01:10 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-24 07:55:41 -0400
commit5570194dc4d97a857b354b706949e27663ebeee0 (patch)
tree6d5f6bfcddb80af5643f5253b640e5d5dbd75045 /drivers
parent7d6d8a7ec3ccf9656194e862d4259076cb0a84e0 (diff)
gpu: nvgpu: per-chip GPCCS exception support
Adding support for ISR handling of GPCCS exceptions JIRA: GPUT19X-83 Change-Id: Ia5550aac8f368d8915f6c94aa22478cacbb2bddc Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1480992 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h4
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index b3292ac4..3d1e0847 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -309,6 +309,8 @@ struct gpu_ops {
309 u32 *hww_global_esr); 309 u32 *hww_global_esr);
310 int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc, 310 int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc,
311 bool *post_event); 311 bool *post_event);
312 int (*handle_gpc_gpccs_exception)(struct gk20a *g, u32 gpc,
313 u32 gpc_exception);
312 void (*enable_gpc_exceptions)(struct gk20a *g); 314 void (*enable_gpc_exceptions)(struct gk20a *g);
313 void (*create_gr_sysfs)(struct device *dev); 315 void (*create_gr_sysfs)(struct device *dev);
314 u32 (*get_lrf_tex_ltc_dram_override)(struct gk20a *g); 316 u32 (*get_lrf_tex_ltc_dram_override)(struct gk20a *g);
@@ -749,6 +751,8 @@ struct gpu_ops {
749 u32 lspmuwprinitdone; 751 u32 lspmuwprinitdone;
750 u32 lsfloadedfalconid; 752 u32 lsfloadedfalconid;
751 bool fecsbootstrapdone; 753 bool fecsbootstrapdone;
754 void (*handle_ext_irq)(struct gk20a *g, u32 intr);
755 void (*set_irqmask)(struct gk20a *g);
752 } pmu; 756 } pmu;
753 struct { 757 struct {
754 void (*disable_slowboot)(struct gk20a *g); 758 void (*disable_slowboot)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 9bd07894..1891d98f 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -6350,13 +6350,21 @@ static int gk20a_gr_handle_gpc_exception(struct gk20a *g, bool *post_event,
6350 } 6350 }
6351 6351
6352 /* Handle GCC exception */ 6352 /* Handle GCC exception */
6353 if(gr_gpc0_gpccs_gpc_exception_gcc_v(gpc_exception) && 6353 if (gr_gpc0_gpccs_gpc_exception_gcc_v(gpc_exception) &&
6354 g->ops.gr.handle_gcc_exception) { 6354 g->ops.gr.handle_gcc_exception) {
6355 int gcc_ret = 0; 6355 int gcc_ret = 0;
6356 gcc_ret = g->ops.gr.handle_gcc_exception(g, gpc, tpc, 6356 gcc_ret = g->ops.gr.handle_gcc_exception(g, gpc, tpc,
6357 post_event, fault_ch, hww_global_esr); 6357 post_event, fault_ch, hww_global_esr);
6358 ret = ret ? ret : gcc_ret; 6358 ret = ret ? ret : gcc_ret;
6359 } 6359 }
6360
6361 /* Handle GPCCS exceptions */
6362 if (g->ops.gr.handle_gpc_gpccs_exception) {
6363 int ret_ecc = 0;
6364 ret_ecc = g->ops.gr.handle_gpc_gpccs_exception(g, gpc,
6365 gpc_exception);
6366 ret = ret ? ret : ret_ecc;
6367 }
6360 } 6368 }
6361 6369
6362 return ret; 6370 return ret;