tegra: nvadsp: disable suspend when adsp usage log

Prevents adsp os from getting suspended when adsp_usage is being logged
Checks whether usage app is running and skips suspend accordingly

Bug 1727014

Change-Id: Iafd800d3d18d6292bee5d3376cec59dbb4557f2e
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: http://git-master/r/1142669
(cherry picked from commit 04660b149f1455f1e5e77f75aeb652a9dceae55f)
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1564184
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Hariharan Sivaraman
2016-05-06 15:22:20 +05:30
committed by Laxman Dewangan
parent f9f361c265
commit d593fa42f0
3 changed files with 57 additions and 98 deletions

View File

@@ -1507,7 +1507,6 @@ int nvadsp_os_start(void)
#ifdef CONFIG_TEGRA_ADSP_LPTHREAD
adsp_lpthread_debugfs_set_suspend(drv_data->adsp_os_suspended);
adsp_lpthread_debugfs_callback();
#endif
unlock:
@@ -1685,6 +1684,14 @@ int nvadsp_os_suspend(void)
goto end;
}
#ifdef CONFIG_TEGRA_ADSP_LPTHREAD
if (adsp_lpthread_get_state()) {
dev_err(&priv.pdev->dev, "Adsp usage being calculated. Not suspending adsp\n");
ret = 0;
goto end;
}
#endif
drv_data = platform_get_drvdata(priv.pdev);
mutex_lock(&priv.os_run_lock);