gpu: nvgpu: poweron for manual mode scheduling

Manual mode scheduling is incompatible with Runtime PM,
Added busy() and idle() calls during open/close of
control-fifo nodes.

Also, added functions to handle for the extra ref during
SC7 suspend/resume.

Jira NVGPU-8619

Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Change-Id: Ic8003c90a4535c2db3aef8f8d78b9dc4a6590b1f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2766058
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2022-08-26 10:54:08 +05:30
committed by mobile promotions
parent e4d1a739da
commit 1e2817e022
4 changed files with 58 additions and 2 deletions

View File

@@ -1429,6 +1429,11 @@ static int gk20a_pm_suspend(struct device *dev)
*/
nvgpu_channel_deterministic_idle(g);
#ifdef CONFIG_NVS_PRESENT
/* Release the busy() lock taken here if control-fifo is enabled */
nvgpu_nvs_ctrl_fifo_idle(g);
#endif
/* check and wait until GPU is idle (with a timeout) */
do {
nvgpu_usleep_range(1000, 1100);
@@ -1467,6 +1472,10 @@ static int gk20a_pm_suspend(struct device *dev)
fail_suspend:
gk20a_pm_runtime_resume(dev);
fail_idle:
#ifdef CONFIG_NVS_PRESENT
/* Re-Acquire the busy() lock taken here if control-fifo is enabled */
nvgpu_nvs_ctrl_fifo_unidle(g);
#endif
nvgpu_channel_deterministic_unidle(g);
return ret;
}
@@ -1509,6 +1518,10 @@ static int gk20a_pm_resume(struct device *dev)
g->suspended = false;
#ifdef CONFIG_NVS_PRESENT
/* Re-Acquire the busy() lock taken here if control-fifo is enabled */
nvgpu_nvs_ctrl_fifo_unidle(g);
#endif
nvgpu_channel_deterministic_unidle(g);
return ret;