mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: Destroy channel sync before releasing vm
The semaphore backend of gk20a_channel_sync uses the channel vm. We must destroy the channel sync before freeing the channel vm. Bug 1450122 Change-Id: I578567b7500672534d53facc58643df49df8b305 Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com> Reviewed-on: http://git-master/r/422159 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
dbde063bf6
commit
664ce15717
@@ -648,6 +648,12 @@ void gk20a_free_channel(struct channel_gk20a *ch, bool finish)
|
||||
|
||||
channel_gk20a_free_priv_cmdbuf(ch);
|
||||
|
||||
/* sync must be destroyed before releasing channel vm */
|
||||
if (ch->sync) {
|
||||
ch->sync->destroy(ch->sync);
|
||||
ch->sync = NULL;
|
||||
}
|
||||
|
||||
/* release channel binding to the as_share */
|
||||
gk20a_as_release_share(ch_vm->as_share);
|
||||
|
||||
@@ -660,10 +666,6 @@ unbind:
|
||||
|
||||
gk20a_channel_fence_close(&ch->last_submit.pre_fence);
|
||||
gk20a_channel_fence_close(&ch->last_submit.post_fence);
|
||||
if (ch->sync) {
|
||||
ch->sync->destroy(ch->sync);
|
||||
ch->sync = NULL;
|
||||
}
|
||||
WARN_ON(ch->sync);
|
||||
|
||||
/* unlink all debug sessions */
|
||||
|
||||
Reference in New Issue
Block a user