summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorCory Perry <cperry@nvidia.com>2016-07-29 01:37:09 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-01 11:03:53 -0400
commit2c6652f182d84dc7ec4218576b65ad582f05d4a6 (patch)
treeb23ef3aa6b1ad48c57dfa0f51c2d1e8b7784e5e8 /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parent7297e1401962af075b14db2fec2f95b6a80d97f6 (diff)
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 Change-Id: Ifb33b65f09f67b0e323917c7e7ea016fc3676f18 Signed-off-by: Cory Perry <cperry@nvidia.com> Reviewed-on: http://git-master/r/1194207 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 12b07d11..9d0b4ade 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -1680,21 +1680,14 @@ static int gr_gv11b_handle_fecs_error(struct gk20a *g,
1680 } 1680 }
1681 1681
1682 if (gk20a_gr_sm_debugger_attached(g)) { 1682 if (gk20a_gr_sm_debugger_attached(g)) {
1683 gk20a_dbg_gpu_post_events(ch);
1684
1683 if (gk20a_is_channel_marked_as_tsg(ch)) { 1685 if (gk20a_is_channel_marked_as_tsg(ch)) {
1684 struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid]; 1686 struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid];
1685 struct channel_gk20a *__ch;
1686
1687 mutex_lock(&tsg->ch_list_lock);
1688 list_for_each_entry(__ch, &tsg->ch_list, ch_entry) {
1689 gk20a_dbg_gpu_post_events(__ch);
1690 }
1691 mutex_unlock(&tsg->ch_list_lock);
1692 1687
1693 gk20a_tsg_event_id_post_event(tsg, 1688 gk20a_tsg_event_id_post_event(tsg,
1694 NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE); 1689 NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE);
1695 } else { 1690 } else {
1696 gk20a_dbg_gpu_post_events(ch);
1697
1698 gk20a_channel_event_id_post_event(ch, 1691 gk20a_channel_event_id_post_event(ch,
1699 NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE); 1692 NVGPU_IOCTL_CHANNEL_EVENT_ID_CILP_PREEMPTION_COMPLETE);
1700 } 1693 }