mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Disable TSG before unbinding channel
Disable TSG before unbinding channel to fix the ap_systemsw nvgpu_ctxsw_trace_twod test failure with AELPG power feature enabled. Bug 3695626 Change-Id: I55939b6b352da5f3f38b31440366a17d89ff7c20 Signed-off-by: mkumbar <mkumbar@nvidia.com> Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2740027 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Ankur Kishore <ankkishore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
42beb7f4db
commit
d00a8fd09a
@@ -1498,7 +1498,31 @@ long gk20a_channel_ioctl(struct file *filp,
|
||||
__func__, cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Disable TSG and examine status before unbinding channel */
|
||||
err = nvgpu_channel_disable_tsg(ch->g, ch);
|
||||
if (err) {
|
||||
dev_err(dev,
|
||||
"%s: failed to disable channel/TSG for ioctl cmd: 0x%x",
|
||||
__func__, cmd);
|
||||
|
||||
gk20a_idle(ch->g);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
err = nvgpu_preempt_channel(ch->g, ch);
|
||||
if (err)
|
||||
dev_err(dev,
|
||||
"%s: failed to preempt channel for ioctl cmd: 0x%x",
|
||||
__func__, cmd);
|
||||
|
||||
err = nvgpu_channel_enable_tsg(ch->g, ch);
|
||||
if (err)
|
||||
dev_err(dev,
|
||||
"%s: failed to re-enable channel/TSG for ioctl cmd: 0x%x",
|
||||
__func__, cmd);
|
||||
|
||||
gk20a_idle(ch->g);
|
||||
break;
|
||||
case NVGPU_IOCTL_CHANNEL_RESCHEDULE_RUNLIST:
|
||||
|
||||
Reference in New Issue
Block a user