diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 25 |
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, |