From 60ad5470c2ef703b0a3730c71a2c3e6c6d6ab4f4 Mon Sep 17 00:00:00 2001 From: Alok Chauhan Date: Wed, 21 Oct 2020 17:21:39 +0530 Subject: [PATCH] msm: camera: icp: Support NRT ipe clock bump-up Whenever there are NRT request then bump-up ipe clock to max. Clock will get reduced as part of context timer expires. CRs-Fixed: 2793751 Change-Id: I28a0b32bd52b58e293439042008711ea454a64f3 Signed-off-by: Alok Chauhan --- drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c b/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c index f911901ad2..933859818b 100644 --- a/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +++ b/drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c @@ -1349,11 +1349,17 @@ static bool cam_icp_check_clk_update(struct cam_icp_hw_mgr *hw_mgr, if (!clk_info->frame_cycles) return cam_icp_default_clk_update(hw_mgr_clk_info); - /* Calculate base clk rate */ - base_clk = cam_icp_mgr_calc_base_clk( - clk_info->frame_cycles, clk_info->budget_ns); ctx_data->clk_info.rt_flag = clk_info->rt_flag; + /* Override base clock to max or calculate base clk rate */ + if (!ctx_data->clk_info.rt_flag && + (ctx_data->icp_dev_acquire_info->dev_type != + CAM_ICP_RES_TYPE_BPS)) + base_clk = ctx_data->clk_info.clk_rate[CAM_MAX_VOTE-1]; + else + base_clk = cam_icp_mgr_calc_base_clk(clk_info->frame_cycles, + clk_info->budget_ns); + if (busy) rc = cam_icp_update_clk_busy(hw_mgr, ctx_data, hw_mgr_clk_info, clk_info, base_clk);