summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index a9aec435..f5d5e467 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -648,6 +648,12 @@ void gk20a_free_channel(struct channel_gk20a *ch, bool finish)
648 648
649 channel_gk20a_free_priv_cmdbuf(ch); 649 channel_gk20a_free_priv_cmdbuf(ch);
650 650
651 /* sync must be destroyed before releasing channel vm */
652 if (ch->sync) {
653 ch->sync->destroy(ch->sync);
654 ch->sync = NULL;
655 }
656
651 /* release channel binding to the as_share */ 657 /* release channel binding to the as_share */
652 gk20a_as_release_share(ch_vm->as_share); 658 gk20a_as_release_share(ch_vm->as_share);
653 659
@@ -660,10 +666,6 @@ unbind:
660 666
661 gk20a_channel_fence_close(&ch->last_submit.pre_fence); 667 gk20a_channel_fence_close(&ch->last_submit.pre_fence);
662 gk20a_channel_fence_close(&ch->last_submit.post_fence); 668 gk20a_channel_fence_close(&ch->last_submit.post_fence);
663 if (ch->sync) {
664 ch->sync->destroy(ch->sync);
665 ch->sync = NULL;
666 }
667 WARN_ON(ch->sync); 669 WARN_ON(ch->sync);
668 670
669 /* unlink all debug sessions */ 671 /* unlink all debug sessions */