diff options
author | Jihoon Bang <jbang@nvidia.com> | 2011-11-02 15:24:50 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-11-04 11:05:13 -0700 |
commit | 33a29b2d9e35e4a5fc73492b784b917f55e8e94b (patch) | |
tree | b02798bcb4c7f95423226f4d77a8f5e656bc5c59 | |
parent | f454987a0c15ce208c858a5753f77ceba6ce832f (diff) |
media: video: tegra: fix powergate bug in Tegra2
Tegra2 doesn't have VE powergate. VE powergate should be turned
off in probe function for Tegra2.
Bug 855758
Bug 878057
Change-Id: I96386270e41c31c16b64743fb0bec80fb9d1fecc
Reviewed-on: http://git-master/r/61944
Reviewed-on: http://git-master/r/62192
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Tested-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
-rw-r--r-- | drivers/media/video/tegra/tegra_camera.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/tegra/tegra_camera.c b/drivers/media/video/tegra/tegra_camera.c index 309ddc4a47d2..30990d252291 100644 --- a/drivers/media/video/tegra/tegra_camera.c +++ b/drivers/media/video/tegra/tegra_camera.c @@ -362,9 +362,11 @@ static int tegra_camera_release(struct inode *inode, struct file *file) /* If camera blocks are not powergated yet, do it now */ if (dev->power_refcnt > 0) { mutex_lock(&dev->tegra_camera_lock); +#ifndef CONFIG_ARCH_TEGRA_2x_SOC err = tegra_powergate_partition(TEGRA_POWERGATE_VENC); if (err) dev_err(dev->dev, "%s: powergate failed.\n", __func__); +#endif dev->power_refcnt = 0; mutex_unlock(&dev->tegra_camera_lock); } @@ -410,11 +412,13 @@ static int tegra_camera_probe(struct platform_device *pdev) mutex_init(&dev->tegra_camera_lock); /* Powergate VE when boot */ - dev->power_refcnt = 0; mutex_lock(&dev->tegra_camera_lock); + dev->power_refcnt = 0; +#ifndef CONFIG_ARCH_TEGRA_2x_SOC err = tegra_powergate_partition(TEGRA_POWERGATE_VENC); if (err) dev_err(&pdev->dev, "%s: powergate failed.\n", __func__); +#endif mutex_unlock(&dev->tegra_camera_lock); dev->dev = &pdev->dev; |