From a085cf0e51360ccd82c75c3581c8a7913422cc18 Mon Sep 17 00:00:00 2001 From: Vishalsingh Hajeri Date: Thu, 16 Apr 2020 22:05:26 -0700 Subject: [PATCH] msm: camera: isp: Fix per req reg dump for Single IFE usecase In dual ife usecase we get two cdm callbacks from respective internal cdm's. This change makes sure per req reg dump function is called only once when two cdm callbacks are received. CRs-Fixed: 2666317 Change-Id: I766dbe471cbee0fd2d26e7618ebc06a9f185a873 Signed-off-by: Vishalsingh Hajeri --- drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c index d1cf9fd3eb50..72010cb5d024 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +++ b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c @@ -2606,6 +2606,7 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata, struct cam_ife_hw_mgr_ctx *ctx = NULL; int i; uint32_t idx = 0; + int reg_dump_done; if (!userdata) { CAM_ERR(CAM_ISP, "Invalid args"); @@ -2633,9 +2634,10 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata, if (status == CAM_CDM_CB_STATUS_BL_SUCCESS) { complete_all(&ctx->config_done_complete[idx]); + reg_dump_done = atomic_read(&ctx->cdm_done); atomic_set(&ctx->cdm_done, 1); if ((g_ife_hw_mgr.debug_cfg.per_req_reg_dump) && - (idx == ctx->master_hw_idx)) + (!reg_dump_done)) cam_ife_mgr_handle_reg_dump(ctx, hw_update_data->reg_dump_buf_desc, hw_update_data->num_reg_dump_buf,