diff options
author | Sachin Nikam <snikam@nvidia.com> | 2011-07-06 13:57:31 +0530 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-07-29 16:59:43 -0700 |
commit | 0831dc5712dba609127e3e16a476fa895a668bef (patch) | |
tree | 7e113932bcb6288987727a960acedb9a73d33fe1 | |
parent | 28cb087ca265df07eb8b17e981d15dac5591d78e (diff) |
media: video: tegra: set_clk_rate for avp
set_clk_rate for sclk which is parent of avp clock.
Bug 843725
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/39772
(cherry picked from commit 7ca01f6ae2071c5adac467552bdedb54d158d51b)
Reviewed-on: http://git-master/r/40598
(cherry picked from commit 52ee27d112691171bbf6bab00329701288944f1e)
Change-Id: I8ac5a238b78d4112521453fd985cccfd18b43468
Reviewed-on: http://git-master/r/42798
Tested-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | drivers/media/video/tegra/avp/avp_svc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/video/tegra/avp/avp_svc.c b/drivers/media/video/tegra/avp/avp_svc.c index 1edcec32c9c1..38c8baf2c0ed 100644 --- a/drivers/media/video/tegra/avp/avp_svc.c +++ b/drivers/media/video/tegra/avp/avp_svc.c @@ -458,9 +458,12 @@ static void do_svc_module_clock_set(struct avp_svc_info *avp_svc, } mutex_lock(&avp_svc->clk_lock); - - aclk = &avp_svc->clks[mod->clk_req]; - ret = clk_set_rate(aclk->clk, msg->clk_freq); + if (msg->module_id == AVP_MODULE_ID_AVP) { + ret = clk_set_rate(avp_svc->sclk, msg->clk_freq); + } else { + aclk = &avp_svc->clks[mod->clk_req]; + ret = clk_set_rate(aclk->clk, msg->clk_freq); + } if (ret) { pr_err("avp_svc: Failed to set module (id = %d) frequency to %d Hz\n", msg->module_id, msg->clk_freq); @@ -470,7 +473,10 @@ static void do_svc_module_clock_set(struct avp_svc_info *avp_svc, goto send_response; } - resp.act_freq = clk_get_rate(aclk->clk); + if (msg->module_id == AVP_MODULE_ID_AVP) + resp.act_freq = clk_get_rate(avp_svc->sclk); + else + resp.act_freq = clk_get_rate(aclk->clk); mutex_unlock(&avp_svc->clk_lock); resp.err = 0; |