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 <cperry@nvidia.com>
Change-Id: I4efb83b0593bd1af38f2342c80793d9db56e42b1
Reviewed-on: http://git-master/r/1194203
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Cory Perry
2016-07-28 21:56:30 -07:00
committed by mobile promotions
parent 0ea97181f2
commit c38cc24e1a

View File

@@ -6260,19 +6260,8 @@ int gk20a_gr_isr(struct gk20a *g)
/* signal clients waiting on an event */ /* signal clients waiting on an event */
if (gk20a_gr_sm_debugger_attached(g) && post_event && fault_ch) { 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) if (need_reset && ch)
gk20a_set_error_notifier(ch, gk20a_set_error_notifier(ch,