From e1ea9edec2a9d6d5eea0bb26b29eb1ba3ad19c8d Mon Sep 17 00:00:00 2001 From: Shravya Samala Date: Fri, 15 Jan 2021 12:29:26 +0530 Subject: [PATCH] msm: camera: isp: Correct assignment of clock rates If there is no change in CSID and TFE clock rates then correctly assign current clock rates to local varaibles. CRs-Fixed: 2855742 Change-Id: Ibd71274ba7a7844c3841060eb3b3b14ba80ed4b0 Signed-off-by: Shravya Samala --- drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c b/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c index 245ef46d6b7a..d3e2b3d24cf9 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +++ b/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. */ #include @@ -1984,6 +1984,12 @@ int cam_tfe_cshiphy_callback( &csid_clock_rate, &updated_tfe_clk); } } + + if (!updated_csid_clk) + updated_csid_clk = csid_clock_rate; + + if (!updated_tfe_clk) + updated_tfe_clk = tfe_clock_rate; end: /* final check */ if ((*phy_clock_rate > updated_csid_clk) ||