mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +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 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
a54e34fd74
commit
89ec2afbd4
@@ -311,11 +311,27 @@ fail:
|
||||
ch->chid, tsg->tsgid);
|
||||
|
||||
nvgpu_tsg_abort(g, tsg, true);
|
||||
|
||||
if (g->ops.channel.clear != NULL) {
|
||||
g->ops.channel.clear(ch);
|
||||
}
|
||||
|
||||
/* If channel unbind fails, channel is still part of runlist */
|
||||
if (nvgpu_channel_update_runlist(ch, false) != 0) {
|
||||
nvgpu_err(g, "remove ch %u from runlist failed", ch->chid);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_DEBUGGER
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
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