From d3bd5adfca9698db4930fd0af7dee844ea03e24c Mon Sep 17 00:00:00 2001 From: Adeel Raza Date: Wed, 17 Feb 2016 19:48:49 -0800 Subject: 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 Reviewed-on: http://git-master/r/1013164 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'drivers') 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) /* check if a gpc exception has occurred */ if (exception & gr_exception_gpc_m() && need_reset == 0) { struct channel_gk20a *fault_ch; + bool post_event = false; gk20a_dbg(gpu_dbg_intr | gpu_dbg_gpu_dbg, "GPC exception pending"); - /* if no sm debugger is present, clean up the channel */ - if (!gk20a_gr_sm_debugger_attached(g)) { - gk20a_dbg(gpu_dbg_intr | gpu_dbg_gpu_dbg, - "SM debugger not attached, clearing interrupt"); - need_reset |= -EFAULT; - } else { - bool post_event = false; - fault_ch = gk20a_fifo_channel_from_hw_chid(g, - isr_data.chid); + fault_ch = gk20a_fifo_channel_from_hw_chid(g, + isr_data.chid); - /* check if any gpc has an exception */ - need_reset |= gk20a_gr_handle_gpc_exception(g, - &post_event, fault_ch); + /* check if any gpc has an exception */ + need_reset |= gk20a_gr_handle_gpc_exception(g, + &post_event, fault_ch); - /* signal clients waiting on an event */ - if (post_event && fault_ch) - gk20a_dbg_gpu_post_events(fault_ch); - } + /* signal clients waiting on an event */ + if (gk20a_gr_sm_debugger_attached(g) && post_event && fault_ch) + gk20a_dbg_gpu_post_events(fault_ch); if (need_reset && ch) gk20a_set_error_notifier(ch, -- cgit v1.2.2