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 dfbb3002d1ff..f31c432430ed 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 @@ -2448,6 +2448,8 @@ static int cam_ife_mgr_acquire_hw_for_ctx( bool crop_enable = true; is_dual_isp = in_port->usage_type; + ife_ctx->dsp_enabled = (bool)in_port->dsp_mode; + /* get root node resource */ rc = cam_ife_hw_mgr_acquire_res_root(ife_ctx, in_port); if (rc) { @@ -3812,7 +3814,8 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args) stop_isp = (struct cam_isp_stop_args *)stop_args->args; /* Set the csid halt command */ - if (stop_isp->hw_stop_cmd == CAM_ISP_HW_STOP_AT_FRAME_BOUNDARY) + if ((stop_isp->hw_stop_cmd == CAM_ISP_HW_STOP_AT_FRAME_BOUNDARY) || + ctx->dsp_enabled) csid_halt_type = CAM_CSID_HALT_AT_FRAME_BOUNDARY; else csid_halt_type = CAM_CSID_HALT_IMMEDIATELY; @@ -4373,6 +4376,11 @@ static int cam_ife_mgr_release_hw(void *hw_mgr_priv, ctx->num_reg_dump_buf = 0; ctx->custom_enabled = false; ctx->use_frame_header_ts = false; + ctx->num_reg_dump_buf = 0; + ctx->is_dual = false; + ctx->dsp_enabled = false; + ctx->is_fe_enabled = false; + ctx->is_offline = false; atomic_set(&ctx->overflow_pending, 0); for (i = 0; i < CAM_IFE_HW_NUM_MAX; i++) { ctx->sof_cnt[i] = 0; diff --git a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h index 627c7fc780dd..bd83f8937257 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h +++ b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h @@ -89,6 +89,7 @@ struct cam_ife_hw_mgr_debug { * @ts captured timestamp when the ctx is acquired * @is_tpg indicate whether context is using PHY TPG * @is_offline Indicate whether context is for offline IFE + * @dsp_enabled Indicate whether dsp is enabled in this context */ struct cam_ife_hw_mgr_ctx { struct list_head list; @@ -141,6 +142,7 @@ struct cam_ife_hw_mgr_ctx { struct timespec64 ts; bool is_tpg; bool is_offline; + bool dsp_enabled; }; /**