summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdeel Raza <araza@nvidia.com>2016-02-17 22:48:49 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-02-19 15:51:30 -0500
commitd3bd5adfca9698db4930fd0af7dee844ea03e24c (patch)
treef705d2cbeacef57f3f7b3c0595cd3c7620b8c383 /drivers
parent21605d09a58d0755e0e76c146a7d241fe0bb3517 (diff)
gpu: nvgpu: always handle gr exception
Always handle gr exception regardless of whether the SM debugger is attached or not. Bug 1699676 Change-Id: If98ab6948c42d3fb1e4f02d54db12745485b0607 Signed-off-by: Adeel Raza <araza@nvidia.com> Reviewed-on: http://git-master/r/1013164 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 9cf094db..7856f9fb 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5571,28 +5571,21 @@ int gk20a_gr_isr(struct gk20a *g)
5571 /* check if a gpc exception has occurred */ 5571 /* check if a gpc exception has occurred */
5572 if (exception & gr_exception_gpc_m() && need_reset == 0) { 5572 if (exception & gr_exception_gpc_m() && need_reset == 0) {
5573 struct channel_gk20a *fault_ch; 5573 struct channel_gk20a *fault_ch;
5574 bool post_event = false;
5574 5575
5575 gk20a_dbg(gpu_dbg_intr | gpu_dbg_gpu_dbg, "GPC exception pending"); 5576 gk20a_dbg(gpu_dbg_intr | gpu_dbg_gpu_dbg, "GPC exception pending");
5576 5577
5577 /* if no sm debugger is present, clean up the channel */
5578 if (!gk20a_gr_sm_debugger_attached(g)) {
5579 gk20a_dbg(gpu_dbg_intr | gpu_dbg_gpu_dbg,
5580 "SM debugger not attached, clearing interrupt");
5581 need_reset |= -EFAULT;
5582 } else {
5583 bool post_event = false;
5584 5578
5585 fault_ch = gk20a_fifo_channel_from_hw_chid(g, 5579 fault_ch = gk20a_fifo_channel_from_hw_chid(g,
5586 isr_data.chid); 5580 isr_data.chid);
5587 5581
5588 /* check if any gpc has an exception */ 5582 /* check if any gpc has an exception */
5589 need_reset |= gk20a_gr_handle_gpc_exception(g, 5583 need_reset |= gk20a_gr_handle_gpc_exception(g,
5590 &post_event, fault_ch); 5584 &post_event, fault_ch);
5591 5585
5592 /* signal clients waiting on an event */ 5586 /* signal clients waiting on an event */
5593 if (post_event && fault_ch) 5587 if (gk20a_gr_sm_debugger_attached(g) && post_event && fault_ch)
5594 gk20a_dbg_gpu_post_events(fault_ch); 5588 gk20a_dbg_gpu_post_events(fault_ch);
5595 }
5596 5589
5597 if (need_reset && ch) 5590 if (need_reset && ch)
5598 gk20a_set_error_notifier(ch, 5591 gk20a_set_error_notifier(ch,