summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-05-26 18:32:43 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-31 15:24:08 -0400
commit97a58123e89882d2584f34fba57b7cfde387b333 (patch)
tree58555ecf4c1b56f31046fc4e26bfaeda3f7c5324
parentb0ffd2f0657a11c2fcd7470430465c77ca5c73b9 (diff)
gpu: nvgpu: Free unbound channels
If a channel cannot be allocated a GPFIFO, its status will remain unbound. We still need to free the channel when the fd gets closed. Bug 1769481 Change-Id: I8a9170f431cfa98dcf9e3cbc082393f02d2203db Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1154725
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 02de1391..64a14f8e 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -894,9 +894,6 @@ static void gk20a_free_channel(struct channel_gk20a *ch)
894 } 894 }
895 mutex_unlock(&f->deferred_reset_mutex); 895 mutex_unlock(&f->deferred_reset_mutex);
896 896
897 if (!ch->bound)
898 goto release;
899
900 if (!gk20a_channel_as_bound(ch)) 897 if (!gk20a_channel_as_bound(ch))
901 goto unbind; 898 goto unbind;
902 899
@@ -985,7 +982,6 @@ unbind:
985 982
986 mutex_unlock(&g->dbg_sessions_lock); 983 mutex_unlock(&g->dbg_sessions_lock);
987 984
988release:
989 /* make sure we catch accesses of unopened channels in case 985 /* make sure we catch accesses of unopened channels in case
990 * there's non-refcounted channel pointers hanging around */ 986 * there's non-refcounted channel pointers hanging around */
991 ch->g = NULL; 987 ch->g = NULL;