diff options
author | Mandar Potdar <mpotdar@nvidia.com> | 2011-07-07 15:08:32 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-25 18:51:28 -0700 |
commit | f439e9cb52581754666d34bb71d78d0db422d13f (patch) | |
tree | 7e9fd32821009110cea54d7c6b6c75db761bae15 | |
parent | 4392e8a699c52b7a1a8120a8f05bbd649cbd57f8 (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
Change-Id: I1367274469ef290a08c3fb1f348664b3a38fecd7
Reviewed-on: http://git-master/r/39992
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 18 |
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; |