summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp.c6
-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
3 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp.c
index fa5aee08c37d..c0bf239e0a35 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.c
@@ -35,6 +35,7 @@
#include "msm_isp44.h"
#include "msm_isp40.h"
#include "msm_isp32.h"
+#include "msm_cam_cx_ipeak.h"
static struct msm_sd_req_vb2_q vfe_vb2_ops;
static struct msm_isp_buf_mgr vfe_buf_mgr;
@@ -675,6 +676,11 @@ int vfe_hw_probe(struct platform_device *pdev)
"qcom,vfe-cx-ipeak", NULL)) {
vfe_dev->vfe_cx_ipeak = cx_ipeak_register(
pdev->dev.of_node, "qcom,vfe-cx-ipeak");
+ if (vfe_dev->vfe_cx_ipeak)
+ cam_cx_ipeak_register_cx_ipeak(
+ vfe_dev->vfe_cx_ipeak, &vfe_dev->cx_ipeak_bit);
+ pr_debug("%s: register cx_ipeak received bit %d\n",
+ __func__, vfe_dev->cx_ipeak_bit);
}
} else {
vfe_dev->hw_info = (struct msm_vfe_hardware_info *)
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 0c18bfe55842..9bc6fde36774 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
@@ -791,6 +791,7 @@ struct vfe_device {
enum cam_ahb_clk_vote ahb_vote;
enum cam_ahb_clk_vote user_requested_ahb_vote;
struct cx_ipeak_client *vfe_cx_ipeak;
+ int cx_ipeak_bit;
/* Sync variables*/
struct completion reset_complete;
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 0daf2d914be5..a8341a7ff3e6 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp47.c
@@ -25,6 +25,7 @@
#include "cam_soc_api.h"
#include "msm_isp48.h"
#include "linux/iopoll.h"
+#include "msm_cam_cx_ipeak.h"
#undef CDBG
#define CDBG(fmt, args...) pr_debug(fmt, ##args)
@@ -2680,7 +2681,9 @@ int msm_vfe47_set_clk_rate(struct vfe_device *vfe_dev, long *rate)
prev_clk_rate <
vfe_dev->vfe_clk_rates[MSM_VFE_CLK_RATE_NOMINAL]
[vfe_dev->hw_info->vfe_clk_idx]) {
- ret = cx_ipeak_update(vfe_dev->vfe_cx_ipeak, true);
+ pr_debug("%s: clk is more than Nominal vfe %d, ipeak bit %d\n",
+ __func__, vfe_dev->pdev->id, vfe_dev->cx_ipeak_bit);
+ ret = cam_cx_ipeak_update_vote_cx_ipeak(vfe_dev->cx_ipeak_bit);
if (ret) {
pr_err("%s: cx_ipeak_update failed %d\n",
__func__, ret);
@@ -2703,7 +2706,9 @@ int msm_vfe47_set_clk_rate(struct vfe_device *vfe_dev, long *rate)
prev_clk_rate >=
vfe_dev->vfe_clk_rates[MSM_VFE_CLK_RATE_NOMINAL]
[vfe_dev->hw_info->vfe_clk_idx]) {
- ret = cx_ipeak_update(vfe_dev->vfe_cx_ipeak, false);
+ pr_debug("%s:clk is less than Nominal vfe %d, ipeak bit %d\n",
+ __func__, vfe_dev->pdev->id, vfe_dev->cx_ipeak_bit);
+ ret = cam_cx_ipeak_unvote_cx_ipeak(vfe_dev->cx_ipeak_bit);
if (ret) {
pr_err("%s: cx_ipeak_update failed %d\n",
__func__, ret);