diff options
author | Allen Yu <alleny@nvidia.com> | 2014-04-24 01:39:37 +0800 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-04-28 15:20:53 -0700 |
commit | 4ab8a6b383e49040a849ff26b2518f1c269ebd79 (patch) | |
tree | 428bef28756d53af86d865f38e257ad07e936973 /drivers/media | |
parent | 2174623265342629ebc3d47c2faccf8ac6b791e7 (diff) |
media: tegra: nvavp: Fix corruption in secure playback after lp0
If vde partition is powergated before suspend, access to BSEV registers
that happens immediately after lp0 exit will go wrong. This WAR unpowergate
vde partition in suspend callback and powergate it again in the first place
of resume callback so that we won't keep vde powergate always on. Resume of
vde if needed will be taken care of afterwards.
Bug 1502013
Bug 1507043
Change-Id: Iaf4c36ac377c64e8d09d56f79e6e946ec47c686b
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/401252
(cherry picked from commit a2b4b1f96d6c4b7b4b244b1d36b279fcdcc3199d)
Reviewed-on: http://git-master/r/401982
Tested-by: Praveen Kumar Reddy M.V. <pkreddy@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/tegra/nvavp/nvavp_dev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/platform/tegra/nvavp/nvavp_dev.c b/drivers/media/platform/tegra/nvavp/nvavp_dev.c index 2e51c8737767..a9ee09ed0a29 100644 --- a/drivers/media/platform/tegra/nvavp/nvavp_dev.c +++ b/drivers/media/platform/tegra/nvavp/nvavp_dev.c @@ -2572,6 +2572,9 @@ static int tegra_nvavp_resume(struct device *dev) mutex_lock(&nvavp->open_lock); + /* To balance the unpowergate in suspend routine */ + nvavp_powergate_vde(nvavp); + tegra_nvavp_runtime_resume(dev); mutex_unlock(&nvavp->open_lock); @@ -2588,6 +2591,11 @@ static int tegra_nvavp_suspend(struct device *dev) tegra_nvavp_runtime_suspend(dev); + /* WAR: Leave partition vde on before suspend so that access + * to BSEV registers immediatly after LP0 exit won't fail. + */ + nvavp_unpowergate_vde(nvavp); + mutex_unlock(&nvavp->open_lock); return 0; |