mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
tsec: add support for s2idle state
TSEC from t26x onwards is booted by PSC. Since s2idle PSC never resets tsec, there is no need to handle streamid programming form KMD side. Moreover this change also fixes a bug wherein tsec KMD would poweroff the clocks of TSEC in suspend case. Bug 5407465 Change-Id: Idb648e2f0e7226bb779bd1a801796fa28c415419 Signed-off-by: spatki <spatki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420250 Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
97c57036d7
commit
4a68689610
@@ -338,14 +338,31 @@ int tsec_poweroff(struct device *dev)
|
||||
|
||||
static int tsec_module_suspend(struct device *dev)
|
||||
{
|
||||
struct tsec_device_data *pdata = dev_get_drvdata(dev);
|
||||
|
||||
switch (pdata->soc) {
|
||||
case TSEC_ON_T26x:
|
||||
/*
|
||||
* If TSEC is on T26x, we don't need to power off TSEC.
|
||||
*/
|
||||
return 0;
|
||||
default:
|
||||
return tsec_poweroff(dev);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int tsec_module_resume(struct device *dev)
|
||||
{
|
||||
struct tsec_device_data *pdata = dev_get_drvdata(dev);
|
||||
switch (pdata->soc) {
|
||||
case TSEC_ON_T26x:
|
||||
/*
|
||||
* If the system resumed from suspend to idle, we don't need to resume TSEC.
|
||||
* This is because TSEC is already powered on and running.
|
||||
*/
|
||||
if (pm_suspend_target_state == PM_SUSPEND_TO_IDLE)
|
||||
return 0;
|
||||
return tsec_t264_init(to_platform_device(dev));
|
||||
default:
|
||||
return tsec_poweron(dev);
|
||||
|
||||
@@ -34,5 +34,6 @@
|
||||
#endif
|
||||
#include <linux/sizes.h> /* for SZ_* size macros */
|
||||
#include <vdso/bits.h> /* for BIT(x) macro */
|
||||
#include <linux/suspend.h> /* for suspend APIs */
|
||||
|
||||
#endif /* TSEC_LINUX_H */
|
||||
|
||||
Reference in New Issue
Block a user