Przeglądaj źródła

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 <[email protected]>
Venkat Chinta 5 lat temu
rodzic
commit
cf19384de7

+ 9 - 1
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;

+ 2 - 0
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;
 };
 
 /**