msm: camera: utils: Add option to not set src clk rate
Clients like cpas scale some clocks like slow_ahb, fast_ahb through vote level based on other hw's src clk freq while the actual src clock (camnoc) is calculated and set directly through set_src_clk API. This will overwrite freq of camnoc_axi with the same level as AHB when ahb clocks are set. Do not set src clk rate while setting rate for other clocks using level. CRs-Fixed: 2793673 Change-Id: I5538a5cebf4e47c407a2bf9778136500b1162b4a Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This commit is contained in:
@@ -907,7 +907,7 @@ end:
|
||||
}
|
||||
|
||||
int cam_soc_util_set_clk_rate_level(struct cam_hw_soc_info *soc_info,
|
||||
enum cam_vote_level clk_level)
|
||||
enum cam_vote_level clk_level, bool do_not_set_src_clk)
|
||||
{
|
||||
int i, rc = 0;
|
||||
enum cam_vote_level apply_level;
|
||||
@@ -928,6 +928,16 @@ int cam_soc_util_set_clk_rate_level(struct cam_hw_soc_info *soc_info,
|
||||
cam_cx_ipeak_update_vote_cx_ipeak(soc_info, apply_level);
|
||||
|
||||
for (i = 0; i < soc_info->num_clk; i++) {
|
||||
if (do_not_set_src_clk && (i == soc_info->src_clk_idx)) {
|
||||
CAM_DBG(CAM_UTIL, "Skipping set rate for src clk %s",
|
||||
soc_info->clk_name[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
CAM_DBG(CAM_UTIL, "Set rate for clk %s rate %d",
|
||||
soc_info->clk_name[i],
|
||||
soc_info->clk_rate[apply_level][i]);
|
||||
|
||||
rc = cam_soc_util_set_clk_rate(soc_info->clk[i],
|
||||
soc_info->clk_name[i],
|
||||
soc_info->clk_rate[apply_level][i]);
|
||||
|
Reference in New Issue
Block a user