gpu: nvgpu: allow powergating during bind_context ioctl

Do not check for powergate disablement for bind and unbind of the context
ioctls. As bind and unbind of context is just a sw statemachine related
ops we can ignore even if the power gating is still on. No need to print
the error message.

Bug 4397568

Change-Id: Idc71e12a4188cbc1c94c38032a2f1ed435d278ce
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3034385
(cherry picked from commit 5f1dfe20366637f59b04b8968a527dbc3fac0d9f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3035549
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Tested-by: Tushar Kashalikar <tkashalikar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Ramalingam C
2023-12-14 05:41:13 +00:00
committed by mobile promotions
parent c655a5e058
commit 4a95d2b7ea

View File

@@ -896,7 +896,9 @@ long nvgpu_prof_fops_ioctl(struct file *filp, unsigned int cmd,
#ifdef CONFIG_NVGPU_DEBUGGER
nvgpu_mutex_acquire(&g->dbg_sessions_lock);
if (g->dbg_powergating_disabled_refcount == 0) {
if (g->dbg_powergating_disabled_refcount == 0 &&
cmd != NVGPU_PROFILER_IOCTL_BIND_CONTEXT &&
cmd != NVGPU_PROFILER_IOCTL_UNBIND_CONTEXT) {
nvgpu_err(g, "powergate is not disabled");
}
nvgpu_mutex_release(&g->dbg_sessions_lock);