mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
tegra: nvadsp: Include adsp usage functionality
Adds functionality to calculate adsp cpu usage Inits, loads, starts and resume adsp_lpthread app Bug 1727014 Change-Id: Icaf7a1ba9e91bff19d7fbc894bfdd0f884971d6c Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com> Reviewed-on: http://git-master/r/1134173 (cherry picked from commit 256bd7180cefa523a9e480be315fbf47b9c8de4f) Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1564162 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com> 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:
committed by
Laxman Dewangan
parent
12dc199ff3
commit
b3a66c2476
@@ -1489,10 +1489,27 @@ int nvadsp_os_start(void)
|
||||
drv_data->adspff_init = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEGRA_ADSP_LPTHREAD
|
||||
if (drv_data->adsp_os_suspended == false) {
|
||||
ret = adsp_lpthread_debugfs_init(priv.pdev);
|
||||
if (ret)
|
||||
dev_err(dev, "adsp_lpthread_debugfs_init() failed with ret = %d\n", ret);
|
||||
else
|
||||
dev_err(dev, "adsp_lpthread_debugfs_init() success with ret = %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
drv_data->adsp_os_suspended = false;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
wake_up(&priv.logger.wait_queue);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEGRA_ADSP_LPTHREAD
|
||||
adsp_lpthread_debugfs_set_suspend(drv_data->adsp_os_suspended);
|
||||
adsp_lpthread_debugfs_callback();
|
||||
#endif
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&priv.os_run_lock);
|
||||
end:
|
||||
@@ -1540,6 +1557,10 @@ static int __nvadsp_os_suspend(void)
|
||||
|
||||
drv_data->adsp_os_suspended = true;
|
||||
|
||||
#ifdef CONFIG_TEGRA_ADSP_LPTHREAD
|
||||
adsp_lpthread_debugfs_set_suspend(drv_data->adsp_os_suspended);
|
||||
#endif
|
||||
|
||||
nvadsp_assert_adsp(drv_data);
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user