summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_acm.c
diff options
context:
space:
mode:
authorMandar Potdar <mpotdar@nvidia.com>2011-07-07 15:08:32 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:52 -0800
commit178182b3359adb8652abe4d5d4c9f069c77796c6 (patch)
treeeb4dbbe2c9bd2721dfe3c620f6e71b3e1713da94 /drivers/video/tegra/host/nvhost_acm.c
parent2caf1ddf1a97e06817c0aeb379b217add1454fd2 (diff)
nvhost: Set gr2d clocks to minimum and set timeout=0
Set gr2d and related clocks (epp, emc) to minimum. Set Timeout for 2D only to 0. bug: 845598 bug: 843716 Original-Change-Id: I1367274469ef290a08c3fb1f348664b3a38fecd7 Reviewed-on: http://git-master/r/39992 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R5436a0af9c1ef813d06e4201e18d853488fb85ef
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.c')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index 1df7dbc1330b..6bc5f7105a6e 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -145,17 +145,18 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name,
mod->clk[i] = clk_get(dev, get_module_clk_id(name, i));
if (IS_ERR_OR_NULL(mod->clk[i]))
break;
- rate = clk_round_rate(mod->clk[i], UINT_MAX);
+ if (strcmp(name, "gr2d") == 0)
+ rate = clk_round_rate(mod->clk[i], 0);
+ else
+ rate = clk_round_rate(mod->clk[i], UINT_MAX);
if (rate < 0) {
pr_err("%s: can't get maximum rate for %s\n",
__func__, name);
break;
}
- if (rate != clk_get_rate(mod->clk[i])) {
- clk_enable(mod->clk[i]);
- clk_set_rate(mod->clk[i], rate);
- clk_disable(mod->clk[i]);
- }
+ clk_enable(mod->clk[i]);
+ clk_set_rate(mod->clk[i], rate);
+ clk_disable(mod->clk[i]);
i++;
}
@@ -165,7 +166,10 @@ int nvhost_module_init(struct nvhost_module *mod, const char *name,
mod->powered = false;
mod->powergate_id = -1;
mod->powergate_id2 = -1;
- mod->powerdown_delay = ACM_POWERDOWN_HANDLER_DELAY_MSEC;
+ if (strcmp(name, "gr2d") == 0)
+ mod->powerdown_delay = 0;
+ else
+ mod->powerdown_delay = ACM_POWERDOWN_HANDLER_DELAY_MSEC;
if (strcmp(name, "gr3d") == 0) {
mod->powergate_id = TEGRA_POWERGATE_3D;