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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 85b77199..eae2bdae 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -978,6 +978,10 @@ unbind:
978 g->ops.fifo.unbind_channel(ch); 978 g->ops.fifo.unbind_channel(ch);
979 g->ops.fifo.free_inst(g, ch); 979 g->ops.fifo.free_inst(g, ch);
980 980
981 /* free the channel used semaphore index */
982 if (ch->hw_sema)
983 gk20a_semaphore_free_hw_sema(ch);
984
981 ch->vpr = false; 985 ch->vpr = false;
982 ch->vm = NULL; 986 ch->vm = NULL;
983 987
@@ -1006,9 +1010,6 @@ unbind:
1006 1010
1007 mutex_unlock(&g->dbg_sessions_lock); 1011 mutex_unlock(&g->dbg_sessions_lock);
1008 1012
1009 /* Make sure that when the ch is re-opened it will get a new HW sema. */
1010 ch->hw_sema = NULL;
1011
1012 /* make sure we catch accesses of unopened channels in case 1013 /* make sure we catch accesses of unopened channels in case
1013 * there's non-refcounted channel pointers hanging around */ 1014 * there's non-refcounted channel pointers hanging around */
1014 ch->g = NULL; 1015 ch->g = NULL;