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

Commit d618fc8a authored by Shubhraprakash Das's avatar Shubhraprakash Das Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Vote bandwidth with clock enabled



Vote for bandwidth after clocks are enabled. For bandwidth
voting clocks need to be on.

Change-Id: I9be1ee26419c082cda6351ef6d5aeedc6e17de55
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 558d13ea
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -297,13 +297,6 @@ int msm_vfe47_init_hardware(struct vfe_device *vfe_dev)
	else
		id = CAM_AHB_CLIENT_VFE1;

	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__);
		goto ahb_vote_fail;
	}
	vfe_dev->ahb_vote = CAM_AHB_SVS_VOTE;

	rc = vfe_dev->hw_info->vfe_ops.platform_ops.enable_regulators(
								vfe_dev, 1);
	if (rc)
@@ -314,6 +307,13 @@ int msm_vfe47_init_hardware(struct vfe_device *vfe_dev)
	if (rc)
		goto clk_enable_failed;

	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__);
		goto ahb_vote_fail;
	}
	vfe_dev->ahb_vote = CAM_AHB_SVS_VOTE;

	vfe_dev->common_data->dual_vfe_res->vfe_base[vfe_dev->pdev->id] =
		vfe_dev->vfe_base;

@@ -324,14 +324,14 @@ int msm_vfe47_init_hardware(struct vfe_device *vfe_dev)
	return rc;
irq_enable_fail:
	vfe_dev->common_data->dual_vfe_res->vfe_base[vfe_dev->pdev->id] = NULL;
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_clks(vfe_dev, 0);
clk_enable_failed:
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_regulators(vfe_dev, 0);
enable_regulators_failed:
	if (cam_config_ahb_clk(NULL, 0, id, CAM_AHB_SUSPEND_VOTE) < 0)
		pr_err("%s: failed to remove vote for AHB\n", __func__);
	vfe_dev->ahb_vote = CAM_AHB_SUSPEND_VOTE;
ahb_vote_fail:
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_clks(vfe_dev, 0);
clk_enable_failed:
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_regulators(vfe_dev, 0);
enable_regulators_failed:
	return rc;
}

@@ -350,9 +350,6 @@ void msm_vfe47_release_hardware(struct vfe_device *vfe_dev)
	msm_isp_flush_tasklet(vfe_dev);

	vfe_dev->common_data->dual_vfe_res->vfe_base[vfe_dev->pdev->id] = NULL;
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_clks(
							vfe_dev, 0);
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_regulators(vfe_dev, 0);

	msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, 0, 0);

@@ -363,7 +360,12 @@ void msm_vfe47_release_hardware(struct vfe_device *vfe_dev)

	if (cam_config_ahb_clk(NULL, 0, id, CAM_AHB_SUSPEND_VOTE) < 0)
		pr_err("%s: failed to vote for AHB\n", __func__);

	vfe_dev->ahb_vote = CAM_AHB_SUSPEND_VOTE;

	vfe_dev->hw_info->vfe_ops.platform_ops.enable_clks(
							vfe_dev, 0);
	vfe_dev->hw_info->vfe_ops.platform_ops.enable_regulators(vfe_dev, 0);
}

void msm_vfe47_init_hardware_reg(struct vfe_device *vfe_dev)