Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 769997d7 authored by Shubhraprakash Das's avatar Shubhraprakash Das
Browse files

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: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 4e6f40f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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*/
+6 −3
Original line number Diff line number Diff line
@@ -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__);