Loading drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +18 −6 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -36,6 +36,7 @@ #include "msm_camera_io_util.h" #include <linux/debugfs.h> #include "cam_smmu_api.h" #include "msm_cam_cx_ipeak.h" #define MSM_CPP_DRV_NAME "msm_cpp" Loading Loading @@ -1537,7 +1538,9 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) } if (cpp_dev->turbo_vote == 1) { rc = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, false); pr_debug("%s:cx_ipeak_update unvote. ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); rc = cam_cx_ipeak_unvote_cx_ipeak(cpp_dev->cx_ipeak_bit); if (rc) pr_err("cx_ipeak_update failed"); else Loading Loading @@ -3109,7 +3112,9 @@ unsigned long cpp_cx_ipeak_update(struct cpp_device *cpp_dev, if ((clock >= cpp_dev->hw_info.freq_tbl [(cpp_dev->hw_info.freq_tbl_count) - 1]) && (cpp_dev->turbo_vote == 0)) { ret = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, true); pr_debug("%s: clk is more than Nominal cpp, ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); ret = cam_cx_ipeak_update_vote_cx_ipeak(cpp_dev->cx_ipeak_bit); if (ret) { pr_err("cx_ipeak voting failed setting clock below turbo"); clock = cpp_dev->hw_info.freq_tbl Loading @@ -3122,7 +3127,10 @@ unsigned long cpp_cx_ipeak_update(struct cpp_device *cpp_dev, [(cpp_dev->hw_info.freq_tbl_count) - 1]) { clock_rate = msm_cpp_set_core_clk(cpp_dev, clock, idx); if (cpp_dev->turbo_vote == 1) { ret = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, false); pr_debug("%s:clk is less than Nominal, ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); ret = cam_cx_ipeak_unvote_cx_ipeak( cpp_dev->cx_ipeak_bit); if (ret) pr_err("cx_ipeak unvoting failed"); else Loading Loading @@ -4605,8 +4613,12 @@ static int cpp_probe(struct platform_device *pdev) if (of_find_property(pdev->dev.of_node, "qcom,cpp-cx-ipeak", NULL)) { cpp_dev->cpp_cx_ipeak = cx_ipeak_register( pdev->dev.of_node, "qcom,cpp-cx-ipeak"); if (cpp_dev->cpp_cx_ipeak) CPP_DBG("Cx ipeak Registration Successful "); if (cpp_dev->cpp_cx_ipeak) { cam_cx_ipeak_register_cx_ipeak(cpp_dev->cpp_cx_ipeak, &cpp_dev->cx_ipeak_bit); pr_err("%s register cx_ipeak received bit %d\n", __func__, cpp_dev->cx_ipeak_bit); } else pr_err("Cx ipeak Registration Unsuccessful"); } Loading drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -293,6 +293,7 @@ struct cpp_device { struct msm_cpp_vbif_data *vbif_data; bool turbo_vote; struct cx_ipeak_client *cpp_cx_ipeak; int cx_ipeak_bit; enum cpp_iommu_fault_state fault_status; }; Loading Loading
drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +18 −6 Original line number Diff line number Diff line /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -36,6 +36,7 @@ #include "msm_camera_io_util.h" #include <linux/debugfs.h> #include "cam_smmu_api.h" #include "msm_cam_cx_ipeak.h" #define MSM_CPP_DRV_NAME "msm_cpp" Loading Loading @@ -1537,7 +1538,9 @@ static int cpp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) } if (cpp_dev->turbo_vote == 1) { rc = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, false); pr_debug("%s:cx_ipeak_update unvote. ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); rc = cam_cx_ipeak_unvote_cx_ipeak(cpp_dev->cx_ipeak_bit); if (rc) pr_err("cx_ipeak_update failed"); else Loading Loading @@ -3109,7 +3112,9 @@ unsigned long cpp_cx_ipeak_update(struct cpp_device *cpp_dev, if ((clock >= cpp_dev->hw_info.freq_tbl [(cpp_dev->hw_info.freq_tbl_count) - 1]) && (cpp_dev->turbo_vote == 0)) { ret = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, true); pr_debug("%s: clk is more than Nominal cpp, ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); ret = cam_cx_ipeak_update_vote_cx_ipeak(cpp_dev->cx_ipeak_bit); if (ret) { pr_err("cx_ipeak voting failed setting clock below turbo"); clock = cpp_dev->hw_info.freq_tbl Loading @@ -3122,7 +3127,10 @@ unsigned long cpp_cx_ipeak_update(struct cpp_device *cpp_dev, [(cpp_dev->hw_info.freq_tbl_count) - 1]) { clock_rate = msm_cpp_set_core_clk(cpp_dev, clock, idx); if (cpp_dev->turbo_vote == 1) { ret = cx_ipeak_update(cpp_dev->cpp_cx_ipeak, false); pr_debug("%s:clk is less than Nominal, ipeak bit %d\n", __func__, cpp_dev->cx_ipeak_bit); ret = cam_cx_ipeak_unvote_cx_ipeak( cpp_dev->cx_ipeak_bit); if (ret) pr_err("cx_ipeak unvoting failed"); else Loading Loading @@ -4605,8 +4613,12 @@ static int cpp_probe(struct platform_device *pdev) if (of_find_property(pdev->dev.of_node, "qcom,cpp-cx-ipeak", NULL)) { cpp_dev->cpp_cx_ipeak = cx_ipeak_register( pdev->dev.of_node, "qcom,cpp-cx-ipeak"); if (cpp_dev->cpp_cx_ipeak) CPP_DBG("Cx ipeak Registration Successful "); if (cpp_dev->cpp_cx_ipeak) { cam_cx_ipeak_register_cx_ipeak(cpp_dev->cpp_cx_ipeak, &cpp_dev->cx_ipeak_bit); pr_err("%s register cx_ipeak received bit %d\n", __func__, cpp_dev->cx_ipeak_bit); } else pr_err("Cx ipeak Registration Unsuccessful"); } Loading
drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 2019 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -293,6 +293,7 @@ struct cpp_device { struct msm_cpp_vbif_data *vbif_data; bool turbo_vote; struct cx_ipeak_client *cpp_cx_ipeak; int cx_ipeak_bit; enum cpp_iommu_fault_state fault_status; }; Loading