From c38cc24e1a752d6eb5b07d771ddbf6ab700f695d Mon Sep 17 00:00:00 2001 From: Cory Perry Date: Thu, 28 Jul 2016 21:56:30 -0700 Subject: gpu: nvgpu: send only one event to the debugger Event notifications on TSGs should only be sent to the channel that caused the event to happen in the first place, not evey channel in the tsg. Any more and the debugger will not be able to tell what channel actually got the event. Worse yet, if all the channels in a tsg are bound to the same debug session (as is the case with cuda-gdb), then multiple nvgpu events for the same gpu event will be triggered, causing events to be buffered and the client to get out of sync. One gpu exception, one nvgpu event per tsg. Bug 1793988 Signed-off-by: Cory Perry Change-Id: I4efb83b0593bd1af38f2342c80793d9db56e42b1 Reviewed-on: http://git-master/r/1194203 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 271c384a..57a02622 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -6260,18 +6260,7 @@ int gk20a_gr_isr(struct gk20a *g) /* signal clients waiting on an event */ if (gk20a_gr_sm_debugger_attached(g) && post_event && fault_ch) { - if (gk20a_is_channel_marked_as_tsg(fault_ch)) { - struct tsg_gk20a *tsg = &g->fifo.tsg[fault_ch->tsgid]; - struct channel_gk20a *__ch; - - mutex_lock(&tsg->ch_list_lock); - list_for_each_entry(__ch, &tsg->ch_list, ch_entry) { - gk20a_dbg_gpu_post_events(__ch); - } - mutex_unlock(&tsg->ch_list_lock); - } else { - gk20a_dbg_gpu_post_events(fault_ch); - } + gk20a_dbg_gpu_post_events(fault_ch); } if (need_reset && ch) -- cgit v1.2.2