gpu: nvgpu: add elpg protection for tpc_enabled_exceptions

- DeviceGetTpcExceptionEnMask test calls ioctl
  NVGPU_GPU_IOCTL_GET_TPC_EXCEPTION_EN_STATUS which reads
  register gr_gpc0_tpc0_tpccs_tpc_exception_en_r(). This causes
  IDLE_SNAP and further disengages ELPG.
- Add elpg protected call for the tpc_enabled_exceptions HAL.

Bug 3522086

Change-Id: I137ac2c643c693b596b6ce3e879da9c786ee3a85
Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2674509
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Divya Singhatwaria
2022-02-23 18:09:59 +05:30
committed by mobile promotions
parent a06b5ff2d2
commit 7ff977063b

View File

@@ -1004,7 +1004,8 @@ static int nvgpu_gpu_ioctl_has_any_exception(
} }
nvgpu_mutex_acquire(&g->dbg_sessions_lock); nvgpu_mutex_acquire(&g->dbg_sessions_lock);
tpc_exception_en = g->ops.gr.intr.tpc_enabled_exceptions(g); tpc_exception_en = nvgpu_pg_elpg_protected_call(g,
g->ops.gr.intr.tpc_enabled_exceptions(g));
nvgpu_mutex_release(&g->dbg_sessions_lock); nvgpu_mutex_release(&g->dbg_sessions_lock);
args->tpc_exception_en_sm_mask = tpc_exception_en; args->tpc_exception_en_sm_mask = tpc_exception_en;