Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -1059,7 +1059,7 @@ static int cam_ife_csid_enable_hw(struct cam_ife_csid_hw *csid_hw) CAM_DBG(CAM_ISP, "CSID:%d init CSID HW", csid_hw->hw_intf->hw_idx); clk_lvl = cam_ife_csid_get_vote_level(soc_info, csid_hw->clk_rate); clk_lvl = cam_soc_util_get_vote_level(soc_info, csid_hw->clk_rate); CAM_DBG(CAM_ISP, "CSID clock lvl %u", clk_lvl); rc = cam_ife_csid_enable_soc_resources(soc_info, clk_lvl); Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_soc.c +3 −24 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 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 @@ -117,7 +117,7 @@ int cam_ife_csid_deinit_soc_resources( } int cam_ife_csid_enable_soc_resources( struct cam_hw_soc_info *soc_info, uint32_t clk_lvl) struct cam_hw_soc_info *soc_info, enum cam_vote_level clk_level) { int rc = 0; struct cam_csid_soc_private *soc_private; Loading @@ -142,7 +142,7 @@ int cam_ife_csid_enable_soc_resources( } rc = cam_soc_util_enable_platform_resource(soc_info, true, clk_lvl, true); clk_level, true); if (rc) { CAM_ERR(CAM_ISP, "enable platform failed"); goto stop_cpas; Loading Loading @@ -235,24 +235,3 @@ int cam_ife_csid_disable_ife_force_clock_on(struct cam_hw_soc_info *soc_info, return rc; } uint32_t cam_ife_csid_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate) { int i = 0; if (!clock_rate) return CAM_SVS_VOTE; for (i = 0; i < CAM_MAX_VOTE; i++) { if (soc_info->clk_rate[i][soc_info->num_clk - 1] >= clock_rate) { CAM_DBG(CAM_ISP, "Clock rate %lld, selected clock level %d", clock_rate, i); return i; } } return CAM_TURBO_VOTE; } drivers/media/platform/msm/camera/cam_utils/cam_soc_util.c +22 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-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 @@ -1718,3 +1718,24 @@ int cam_soc_util_reg_dump(struct cam_hw_soc_info *soc_info, return 0; } uint32_t cam_soc_util_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate) { int i = 0; if (!clock_rate) return CAM_SVS_VOTE; for (i = 0; i < CAM_MAX_VOTE; i++) { if (soc_info->clk_level_valid[i] && soc_info->clk_rate[i][soc_info->src_clk_idx] >= clock_rate) { CAM_DBG(CAM_UTIL, "Clock rate %lld, selected clock level %d", clock_rate, i); return i; } } return CAM_TURBO_VOTE; } drivers/media/platform/msm/camera/cam_utils/cam_soc_util.h +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-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 @@ -631,4 +631,7 @@ void cam_soc_util_clk_disable_default(struct cam_hw_soc_info *soc_info); int cam_soc_util_clk_enable_default(struct cam_hw_soc_info *soc_info, enum cam_vote_level clk_level); uint32_t cam_soc_util_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate); #endif /* _CAM_SOC_UTIL_H_ */ Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -1059,7 +1059,7 @@ static int cam_ife_csid_enable_hw(struct cam_ife_csid_hw *csid_hw) CAM_DBG(CAM_ISP, "CSID:%d init CSID HW", csid_hw->hw_intf->hw_idx); clk_lvl = cam_ife_csid_get_vote_level(soc_info, csid_hw->clk_rate); clk_lvl = cam_soc_util_get_vote_level(soc_info, csid_hw->clk_rate); CAM_DBG(CAM_ISP, "CSID clock lvl %u", clk_lvl); rc = cam_ife_csid_enable_soc_resources(soc_info, clk_lvl); Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_soc.c +3 −24 Original line number Diff line number Diff line /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 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 @@ -117,7 +117,7 @@ int cam_ife_csid_deinit_soc_resources( } int cam_ife_csid_enable_soc_resources( struct cam_hw_soc_info *soc_info, uint32_t clk_lvl) struct cam_hw_soc_info *soc_info, enum cam_vote_level clk_level) { int rc = 0; struct cam_csid_soc_private *soc_private; Loading @@ -142,7 +142,7 @@ int cam_ife_csid_enable_soc_resources( } rc = cam_soc_util_enable_platform_resource(soc_info, true, clk_lvl, true); clk_level, true); if (rc) { CAM_ERR(CAM_ISP, "enable platform failed"); goto stop_cpas; Loading Loading @@ -235,24 +235,3 @@ int cam_ife_csid_disable_ife_force_clock_on(struct cam_hw_soc_info *soc_info, return rc; } uint32_t cam_ife_csid_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate) { int i = 0; if (!clock_rate) return CAM_SVS_VOTE; for (i = 0; i < CAM_MAX_VOTE; i++) { if (soc_info->clk_rate[i][soc_info->num_clk - 1] >= clock_rate) { CAM_DBG(CAM_ISP, "Clock rate %lld, selected clock level %d", clock_rate, i); return i; } } return CAM_TURBO_VOTE; }
drivers/media/platform/msm/camera/cam_utils/cam_soc_util.c +22 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-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 @@ -1718,3 +1718,24 @@ int cam_soc_util_reg_dump(struct cam_hw_soc_info *soc_info, return 0; } uint32_t cam_soc_util_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate) { int i = 0; if (!clock_rate) return CAM_SVS_VOTE; for (i = 0; i < CAM_MAX_VOTE; i++) { if (soc_info->clk_level_valid[i] && soc_info->clk_rate[i][soc_info->src_clk_idx] >= clock_rate) { CAM_DBG(CAM_UTIL, "Clock rate %lld, selected clock level %d", clock_rate, i); return i; } } return CAM_TURBO_VOTE; }
drivers/media/platform/msm/camera/cam_utils/cam_soc_util.h +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-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 @@ -631,4 +631,7 @@ void cam_soc_util_clk_disable_default(struct cam_hw_soc_info *soc_info); int cam_soc_util_clk_enable_default(struct cam_hw_soc_info *soc_info, enum cam_vote_level clk_level); uint32_t cam_soc_util_get_vote_level(struct cam_hw_soc_info *soc_info, uint64_t clock_rate); #endif /* _CAM_SOC_UTIL_H_ */