summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubhraprakash Das <sadas@codeaurora.org>2017-04-19 18:33:00 -0700
committerShubhraprakash Das <sadas@codeaurora.org>2017-04-21 11:45:16 -0700
commit769997d7d8f763ffa668ad4057077220ac596f97 (patch)
tree935dee9694aa36f265bcd159a4a5956742017e82
parent4e6f40f24c5a6824b8e0970539b363b25c3dd8d6 (diff)
msm: camera: isp: Store the user ahb vote
Store the ahb vote requested by user and before voting for ahb check if the user vote is higher and use the higher vote. Change-Id: I63798719b8504add75b941884d678882b7bac5cb Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp.h1
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp47.c9
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
index b283f6277b87..85ac0b39dad0 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
@@ -784,6 +784,7 @@ struct vfe_device {
size_t num_norm_clk;
bool hvx_clk_state;
enum cam_ahb_clk_vote ahb_vote;
+ enum cam_ahb_clk_vote user_requested_ahb_vote;
struct cx_ipeak_client *vfe_cx_ipeak;
/* Sync variables*/
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c
index a66ca7e93537..de36215391ac 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c
@@ -274,10 +274,12 @@ int msm_isp47_ahb_clk_cfg(struct vfe_device *vfe_dev,
enum cam_ahb_clk_vote src_clk_vote;
struct msm_isp_clk_rates clk_rates;
- if (ahb_cfg)
+ if (ahb_cfg) {
vote = msm_isp47_get_cam_clk_vote(ahb_cfg->vote);
- else
- vote = CAM_AHB_SVS_VOTE;
+ vfe_dev->user_requested_ahb_vote = vote;
+ } else {
+ vote = vfe_dev->user_requested_ahb_vote;
+ }
vfe_dev->hw_info->vfe_ops.platform_ops.get_clk_rates(vfe_dev,
&clk_rates);
@@ -327,6 +329,7 @@ int msm_vfe47_init_hardware(struct vfe_device *vfe_dev)
if (rc)
goto clk_enable_failed;
+ vfe_dev->user_requested_ahb_vote = CAM_AHB_SVS_VOTE;
rc = cam_config_ahb_clk(NULL, 0, id, CAM_AHB_SVS_VOTE);
if (rc < 0) {
pr_err("%s: failed to vote for AHB\n", __func__);