mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
The flag pmu->pg->golden_image_initialized is set to true during initial GPU context creation and is not cleared while the GPU goes into pm_suspend (during railgate). Hence, when the GPU resumes after un-railgate it retains the previous value which can cause ELPG to kick in immediately. Due to this, when ELPG and Railgating are enabled, IDLE_SNAP is seen for read access of gr_gpc0_tpc0_sm_arch_r reg. To resolve this, if golden image is ready set the pmu->pg->golden_image_initialized to suspend state during railgate, to delay the early enable of ELPG. Add a new pmu_init_golden_img_state hal in the NVGPU_INIT_TABLE_ENTRY. This will be called after all the GR access is done and GPU resumes completely after un-railgate. This hal will then check if golden_image_initialized flag is in suspend state, it will set it to ready state and then re-enable ELPG. Bug 3431798 Change-Id: I1fee83e66e09b6b78d385bbe60529d0724f79e79 Signed-off-by: Divya <dsinghatwari@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2639188 Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit