mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: fix tsg unbind failure paths
nvgpu_tsg_unbind_channel_common failure handling missed
channel.clear & nvgpu_tsg_set_mmu_debug_mode calls.
Bug 200711183
Change-Id: I19fd53be55db9df725b7cf467b2673e4cd29deb5
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2521972
(cherry picked from commit 89ec2afbd4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2524251
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
0d088ad70c
commit
bb8bf1c76c
@@ -172,6 +172,15 @@ int gk20a_tsg_unbind_channel(struct channel_gk20a *ch, bool force)
|
||||
/* If channel unbind fails, channel is still part of runlist */
|
||||
channel_gk20a_update_runlist(ch, false);
|
||||
|
||||
while (ch->mmu_debug_mode_refcnt > 0U) {
|
||||
err = nvgpu_tsg_set_mmu_debug_mode(ch, false);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "disable mmu debug mode failed ch:%u",
|
||||
ch->chid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
nvgpu_rwsem_down_write(&tsg->ch_list_lock);
|
||||
nvgpu_list_del(&ch->ch_entry);
|
||||
ch->tsgid = NVGPU_INVALID_TSG_ID;
|
||||
|
||||
Reference in New Issue
Block a user