summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 4458430b..f60a92b4 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1142,6 +1142,7 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
1142{ 1142{
1143 struct fifo_gk20a *f = &g->fifo; 1143 struct fifo_gk20a *f = &g->fifo;
1144 struct channel_gk20a *ch; 1144 struct channel_gk20a *ch;
1145 struct gk20a_event_id_data *event_id_data, *event_id_data_temp;
1145 1146
1146 /* compatibility with existing code */ 1147 /* compatibility with existing code */
1147 if (!gk20a_fifo_is_valid_runlist_id(g, runlist_id)) { 1148 if (!gk20a_fifo_is_valid_runlist_id(g, runlist_id)) {
@@ -1182,6 +1183,15 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
1182 ch->pid = current->pid; 1183 ch->pid = current->pid;
1183 ch->tgid = current->tgid; /* process granularity for FECS traces */ 1184 ch->tgid = current->tgid; /* process granularity for FECS traces */
1184 1185
1186 /* unhook all events created on this channel */
1187 mutex_lock(&ch->event_id_list_lock);
1188 list_for_each_entry_safe(event_id_data, event_id_data_temp,
1189 &ch->event_id_list,
1190 event_id_node) {
1191 list_del_init(&event_id_data->event_id_node);
1192 }
1193 mutex_unlock(&ch->event_id_list_lock);
1194
1185 /* By default, channel is regular (non-TSG) channel */ 1195 /* By default, channel is regular (non-TSG) channel */
1186 ch->tsgid = NVGPU_INVALID_TSG_ID; 1196 ch->tsgid = NVGPU_INVALID_TSG_ID;
1187 1197