summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2011-01-10 14:50:08 +0530
committerNitin Kumbhar <nkumbhar@nvidia.com>2011-01-10 14:50:08 +0530
commitbf5a56deb588e201d95f21c00257e88ac721f90b (patch)
treed418c01fea425ea8063a6c0fb6f7119b301e135a /drivers/video/tegra/dc
parent3cfc0c8843cbc3f2c859d9eea1003834af6119e7 (diff)
parentb99662a653ac3d90bfada1bfc326d3138229860c (diff)
merging android-tegra-2.6.36 into git-master/linux-2.6/android-tegra-2.6.36
Conflicts: arch/arm/mach-tegra/fuse.c drivers/misc/Makefile Change-Id: I300b925d78b31efe00c342190d8dbd50e2e81230
Diffstat (limited to 'drivers/video/tegra/dc')
-rw-r--r--drivers/video/tegra/dc/dc.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index a766558fd8c5..3cee56e8b412 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -119,6 +119,7 @@ static void _dump_regs(struct tegra_dc *dc, void *data,
char buff[256];
tegra_dc_io_start(dc);
+ clk_enable(dc->clk);
DUMP_REG(DC_CMD_DISPLAY_COMMAND_OPTION0);
DUMP_REG(DC_CMD_DISPLAY_COMMAND);
@@ -256,6 +257,7 @@ static void _dump_regs(struct tegra_dc *dc, void *data,
DUMP_REG(DC_WIN_CSC_KVB);
}
+ clk_disable(dc->clk);
tegra_dc_io_end(dc);
}
@@ -1115,6 +1117,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
void __iomem *base;
int irq;
int i;
+ unsigned long emc_clk_rate;
if (!ndev->dev.platform_data) {
dev_err(&ndev->dev, "no platform data\n");
@@ -1171,13 +1174,6 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
goto err_put_clk;
}
- /*
- * The emc is a shared clock, it will be set to the highest
- * requested rate from any user. Set the rate to ULONG_MAX to
- * always request the max rate whenever this request is enabled
- */
- clk_set_rate(emc_clk, ULONG_MAX);
-
dc->clk = clk;
dc->emc_clk = emc_clk;
dc->base_res = base_res;
@@ -1186,6 +1182,13 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
dc->ndev = ndev;
dc->pdata = ndev->dev.platform_data;
+ /*
+ * The emc is a shared clock, it will be set based on
+ * the requirements for each user on the bus.
+ */
+ emc_clk_rate = dc->pdata->emc_clk_rate;
+ clk_set_rate(emc_clk, emc_clk_rate ? emc_clk_rate : ULONG_MAX);
+
if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED)
dc->enabled = true;