summaryrefslogtreecommitdiff
path: root/drivers/media/platform/tegra/nvavp/nvavp_dev.c
diff options
context:
space:
mode:
authorPraveen Kumar Reddy M V <pkreddy@nvidia.com>2014-04-30 15:09:28 +0530
committerMandar Padmawar <mpadmawar@nvidia.com>2014-05-09 06:39:47 -0700
commit749746c73692c03919678c632286c36df99c87d7 (patch)
tree649c125aea7f49e4435efd228ed7f1c5bde35eeb /drivers/media/platform/tegra/nvavp/nvavp_dev.c
parent4209e19ad0f3c8991448f20f29a6f8e912f6689b (diff)
media: tegra: nvavp:Close avp properly for secure playback
1.For secure content playback clock_disable_work() is cancelled in nvavp_force_clock_stay_on_ioctl() call when clock.state is true and clock_disable_work() is not getting scheduled again after the playback is completed. 2.Because of this nvavp->clk_enabled is true even after playback is completed and now if we allow system to enter LP0 state, system will not enter LP0 state due to nvavp device suspend failure. 3.To fix the issue, clock_disable_work() is scheduled again in nvavp_force_clock_stay_on_ioctl() call when clientctx->clk_reqs becomes zero. Bug 1505948 Bug 1500665 Bug 1503852 Change-Id: I5c6d1a4a7cac3cf369424dde884558e86c4b8e05 Signed-off-by: Praveen Kumar Reddy M.V. <pkreddy@nvidia.com> Reviewed-on: http://git-master/r/403575 (cherry picked from commit 96fe09b2abd786a2e7c442f373559bcc2651acec) Reviewed-on: http://git-master/r/405695 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'drivers/media/platform/tegra/nvavp/nvavp_dev.c')
-rw-r--r--drivers/media/platform/tegra/nvavp/nvavp_dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/tegra/nvavp/nvavp_dev.c b/drivers/media/platform/tegra/nvavp/nvavp_dev.c
index 10f62059edb8..4593816c6f05 100644
--- a/drivers/media/platform/tegra/nvavp/nvavp_dev.c
+++ b/drivers/media/platform/tegra/nvavp/nvavp_dev.c
@@ -1753,6 +1753,8 @@ static int nvavp_force_clock_stay_on_ioctl(struct file *filp, unsigned int cmd,
nvavp_clks_disable(nvavp);
}
mutex_unlock(&nvavp->open_lock);
+ if (!nvavp->stay_on)
+ schedule_work(&nvavp->clock_disable_work);
}
return 0;
}