diff options
author | Bharat Nihalani <bnihalani@nvidia.com> | 2012-02-24 19:09:11 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-28 21:06:00 -0800 |
commit | eb4ffeb3a543b504cd9e9309d4bb1547e506f70d (patch) | |
tree | 87cf45f958494672a194f517b68a87985ba20375 /drivers/media/video/tegra/avp/avp_svc.c | |
parent | f6408893291a49955656c0408c1de039399775a1 (diff) |
media: tegra: avp: set emc to max for video only
emc should be set to MAX only in case of video and not otherwise
Bug 941448
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/85766
(cherry picked from commit 736072f72b468449246f5c943f87ce83092579c4)
Change-Id: I8bda6c47a07534ef35305795449835364a129864
Reviewed-on: http://git-master/r/86306
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/media/video/tegra/avp/avp_svc.c')
-rw-r--r-- | drivers/media/video/tegra/avp/avp_svc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/video/tegra/avp/avp_svc.c b/drivers/media/video/tegra/avp/avp_svc.c index f74173a107c0..17c8b8535a62 100644 --- a/drivers/media/video/tegra/avp/avp_svc.c +++ b/drivers/media/video/tegra/avp/avp_svc.c @@ -102,6 +102,9 @@ struct avp_svc_info { struct trpc_node *rpc_node; unsigned long max_avp_rate; unsigned long emc_rate; + + /* variable to check if video is present */ + bool is_vde_on; }; static void do_svc_nvmap_create(struct avp_svc_info *avp_svc, @@ -350,7 +353,7 @@ static void do_svc_module_clock(struct avp_svc_info *avp_svc, struct svc_common_resp resp; struct avp_module *mod; struct avp_clk *aclk; - unsigned long emc_rate; + unsigned long emc_rate = 0; mod = find_avp_module(avp_svc, msg->module_id); if (!mod) { @@ -361,6 +364,9 @@ static void do_svc_module_clock(struct avp_svc_info *avp_svc, } if (msg->module_id == AVP_MODULE_ID_VDE) + avp_svc->is_vde_on = msg->enable; + + if (avp_svc->is_vde_on == true) emc_rate = ULONG_MAX; mutex_lock(&avp_svc->clk_lock); @@ -848,8 +854,9 @@ struct avp_svc_info *avp_svc_init(struct platform_device *pdev, clk_set_rate(avp_svc->emcclk, pdata->emc_clk_rate); avp_svc->emc_rate = pdata->emc_clk_rate; } - else + else { clk_set_rate(avp_svc->emcclk, ULONG_MAX); + } avp_svc->rpc_node = rpc_node; |