From cf19384de76ea74a01e15f6c04a6bfe313c42cb8 Mon Sep 17 00:00:00 2001 From: Venkat Chinta Date: Wed, 5 Feb 2020 16:50:54 -0800 Subject: [PATCH] msm: camera: ife: Change halt type This commit changes halt type when HVX streamer is enabled as halting immediately will lead to HVX hang. CRs-Fixed: 2620821 Change-Id: Iab28cb91018899acec1eb671a87aec05b872391e Signed-off-by: Venkat Chinta --- drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c | 10 +++++++++- drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h | 2 ++ 2 files changed, 11 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 ae4944b342ca..8ae4fc517fef 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; @@ -4372,6 +4375,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; }; /**