summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
authorKevin Huang <kevinh@nvidia.com>2012-03-09 02:05:56 -0800
committerVarun Colbert <vcolbert@nvidia.com>2012-03-14 16:36:00 -0700
commit769ea5a0361eaba66047f9c9a1b5664659d03cf5 (patch)
tree70bf4e975c932e37445fcbcc7d24c2c4bac248a5 /drivers/video/tegra/dc/dc.c
parentf4bc69bbe822d1481a03bbf6477d90186c47ebbb (diff)
video: tegra: dc: Fix the EMC bandwidth clear.
Bug 951626 Change-Id: Ia7c7474aa0f066cba8bd1519a98e302c4b3992e0 Signed-off-by: Kevin Huang <kevinh@nvidia.com> Reviewed-on: http://git-master/r/89076 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 1a4a6cd..080438b 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -980,7 +980,7 @@ unsigned long tegra_dc_get_bandwidth(struct tegra_dc_win *windows[], int n)
/* to save power, call when display memory clients would be idle */
static void tegra_dc_clear_bandwidth(struct tegra_dc *dc)
{
- if (dc->emc_clk_rate)
+ if (tegra_is_clk_enabled(dc->emc_clk))
clk_disable(dc->emc_clk);
dc->emc_clk_rate = 0;
}
@@ -990,7 +990,8 @@ static void tegra_dc_program_bandwidth(struct tegra_dc *dc)
unsigned i;
if (dc->emc_clk_rate != dc->new_emc_clk_rate) {
- if (!dc->emc_clk_rate) /* going from 0 to non-zero */
+ /* going from 0 to non-zero */
+ if (!dc->emc_clk_rate && !tegra_is_clk_enabled(dc->emc_clk))
clk_enable(dc->emc_clk);
dc->emc_clk_rate = dc->new_emc_clk_rate;
clk_set_rate(dc->emc_clk, dc->emc_clk_rate);