diff options
author | Jinyoung Park <jinyoungp@nvidia.com> | 2012-02-22 17:36:08 +0900 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-03-12 02:30:37 -0700 |
commit | 733d9cb29f05dbff3a77e53482413b46aec18f59 (patch) | |
tree | b035666a0c129176190ce7c52d8f6cd9adc1c6ec | |
parent | c6d3a94af5e5b481155026643e06ee6b5c030f4b (diff) |
video: tegra: host: Set rate for all clocks in nvhost device
Fixed rate setting problem what set rate for only a clock in nvhost
device, even if there are clocks more than one in nvhost device.
Bug 938580
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/85129
(cherry picked from commit 5818d42dc0ad5dfa7659dca5d7f61b572c08613d)
Change-Id: Id3a7be50541b1d93a2ed7353f3eabc71dd398773
Reviewed-on: http://git-master/r/87276
Tested-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index 496e38b962a2..d023b060db8a 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c @@ -280,17 +280,22 @@ int nvhost_module_set_rate(struct nvhost_device *dev, void *priv, unsigned long rate, int index) { struct nvhost_module_client *m; - int ret; + int i, ret = 0; mutex_lock(&client_list_lock); list_for_each_entry(m, &dev->client_list, node) { if (m->priv == priv) { - rate = clk_round_rate(dev->clk[index], rate); - m->rate[index] = rate; + for (i = 0; i < dev->num_clks; i++) + m->rate[i] = clk_round_rate(dev->clk[i], rate); break; } } - ret = nvhost_module_update_rate(dev, index); + + for (i = 0; i < dev->num_clks; i++) { + ret = nvhost_module_update_rate(dev, i); + if (ret < 0) + break; + } mutex_unlock(&client_list_lock); return ret; |