summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2017-10-03 02:52:20 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-24 13:36:22 -0400
commit018429530cb873da7ca65c4da3d6b44f8544ac48 (patch)
tree771b230e9f68f926a4a5449063034c2113c9fdbc
parent11de7460dad6fa71e181888b74f24d197808bbb4 (diff)
video: tegra: host: Use correct device for clamps
Currently the CV cluster clamp functions use the client device aperture while accessing the clamp registers thereby causing an invalid register access to the device aperture. This change fixes the issue by making the CV cluster clamp functions fetch the parent of the client device. Change-Id: I77e0f5f60dca2494cc316366273b8b7a11daefc9 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1572426 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--drivers/video/tegra/host/nvhost_cv_pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/nvhost_cv_pm.c b/drivers/video/tegra/host/nvhost_cv_pm.c
index 78f56fa02..b61b7ab9e 100644
--- a/drivers/video/tegra/host/nvhost_cv_pm.c
+++ b/drivers/video/tegra/host/nvhost_cv_pm.c
@@ -32,6 +32,9 @@ static DEFINE_MUTEX(cv_cluster_lock);
32/* Must be called BEFORE CV modules power on (reset asserted) */ 32/* Must be called BEFORE CV modules power on (reset asserted) */
33void cv_cluster_unclamp(struct platform_device *pdev) 33void cv_cluster_unclamp(struct platform_device *pdev)
34{ 34{
35 if (pdev->dev.parent && pdev->dev.parent != &platform_bus)
36 pdev = to_platform_device(pdev->dev.parent);
37
35 mutex_lock(&cv_cluster_lock); 38 mutex_lock(&cv_cluster_lock);
36 39
37 /* Unclamp */ 40 /* Unclamp */
@@ -45,6 +48,9 @@ void cv_cluster_unclamp(struct platform_device *pdev)
45/* Must be called AFTER CV modules power down */ 48/* Must be called AFTER CV modules power down */
46void cv_cluster_clamp(struct platform_device *pdev) 49void cv_cluster_clamp(struct platform_device *pdev)
47{ 50{
51 if (pdev->dev.parent && pdev->dev.parent != &platform_bus)
52 pdev = to_platform_device(pdev->dev.parent);
53
48 mutex_lock(&cv_cluster_lock); 54 mutex_lock(&cv_cluster_lock);
49 55
50 /* Clamp */ 56 /* Clamp */