From 10b575f21e305accf667b891305bc8876b65654f Mon Sep 17 00:00:00 2001 From: chengxue Date: Sun, 26 Sep 2021 19:44:23 +0800 Subject: [PATCH] msm: camera: isp: shdr enable pdaf occur overflow If we config stream in order like IMAGE/IMAGE_SHORT/ PDAF, while PDAF stream reserve, it will override sfe_inline_shdr flag to false on csid_hw, and we can not configure the master/slave register correctly, so we move the common sfe_inline_shdr flag to path cfg. CRs-Fixed: 3047943 Change-Id: Ie4a863e9aa24a142c5c4b3c90553e4a2bd92d7f3 Signed-off-by: chengxue --- .../isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.h | 2 -- .../isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c | 6 +++--- .../isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.h index 8b5f76aeaa..5ba9592038 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_common.h @@ -281,7 +281,6 @@ struct cam_ife_csid_debug_info { * @fatal_err_detected: flag to indicate if fatal err detected * @rx_enabled: flag to indicate if rx is enabled * @tpg_configured: flag to indicate if internal_tpg is configured - * @sfe_inline_shdr: flag to indicate if sfe is inline shdr * @reset_awaited: flag to indicate if reset is awaited * @offline_mode: flag to indicate if csid in offline mode */ @@ -294,7 +293,6 @@ struct cam_ife_csid_hw_flags { bool rx_enabled; bool tpg_enabled; bool tpg_configured; - bool sfe_inline_shdr; bool reset_awaited; bool offline_mode; }; diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c index f1f1f2c404..4022894f77 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c @@ -2497,7 +2497,7 @@ int cam_ife_csid_ver2_reserve(void *hw_priv, csid_hw->token = reserve->cb_priv; reserve->buf_done_controller = csid_hw->buf_done_irq_controller; res->cdm_ops = reserve->cdm_ops; - csid_hw->flags.sfe_inline_shdr = reserve->sfe_inline_shdr; + path_cfg->sfe_inline_shdr = reserve->sfe_inline_shdr; csid_hw->flags.offline_mode = reserve->is_offline; reserve->need_top_cfg = csid_reg->need_top_cfg; @@ -2784,7 +2784,7 @@ static int cam_ife_csid_ver2_init_config_rdi_path( path_reg->err_recovery_cfg0_addr); } - if (csid_hw->flags.sfe_inline_shdr) + if (path_cfg->sfe_inline_shdr) cam_ife_csid_ver2_shdr_cfg(csid_hw, res->res_id); if (csid_hw->debug_info.debug_val & @@ -3069,7 +3069,7 @@ static int cam_ife_csid_ver2_program_rdi_path( } if ((csid_hw->flags.offline_mode || - csid_hw->flags.sfe_inline_shdr) && + path_cfg->sfe_inline_shdr) && (res->res_id == CAM_IFE_PIX_PATH_RES_RDI_0)) { val |= path_reg->camif_irq_mask; path_cfg->handle_camif_irq = true; diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h index 6b78c9e7ca..b9fec36231 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h @@ -167,6 +167,7 @@ struct cam_ife_csid_ver2_camif_data { * the corresponding paths * @en_secondary_evt: Enable secondary evt for this path, to notify * hw manager + * @sfe_inline_shdr: flag to indicate if sfe is inline shdr * */ struct cam_ife_csid_ver2_path_cfg { @@ -204,6 +205,7 @@ struct cam_ife_csid_ver2_path_cfg { bool discard_init_frames; bool skip_discard_frame_cfg; bool en_secondary_evt; + bool sfe_inline_shdr; }; struct cam_ife_csid_ver2_top_reg_info {