Jelajahi Sumber

msm: camera: ife: TPG stop Call

Move TPG stop call before checking if Deinit call is required or not.

CRs-Fixed: 2830502
Change-Id: Idd84009ac316a4930b9119527947453c47696c24
Signed-off-by: Chandan Kumar Jha <[email protected]>
Chandan Kumar Jha 4 tahun lalu
induk
melakukan
dad1dca716

+ 3 - 2
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -5654,14 +5654,15 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
 			"config done completion timeout for last applied req_id=%llu ctx_index %",
 			ctx->applied_req_id, ctx->ctx_index);
 
+	if (ctx->is_tpg)
+		cam_ife_hw_mgr_stop_hw_res(&ctx->res_list_tpg);
+
 	if (stop_isp->stop_only)
 		goto end;
 
 	if (cam_cdm_stream_off(ctx->cdm_handle))
 		CAM_ERR(CAM_ISP, "CDM stream off failed %d", ctx->cdm_handle);
 
-	if (ctx->is_tpg)
-		cam_ife_hw_mgr_stop_hw_res(&ctx->res_list_tpg);
 
 	cam_ife_hw_mgr_deinit_hw(ctx);
 	CAM_DBG(CAM_ISP,

+ 3 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/top_tpg/cam_top_tpg_ver2.c

@@ -142,6 +142,9 @@ static int cam_top_tpg_ver2_start(
 	tpg_data = (struct cam_top_tpg_cfg  *)tpg_res->res_priv;
 	soc_info = &tpg_hw->hw_info->soc_info;
 
+	if (tpg_res->res_state == CAM_ISP_RESOURCE_STATE_STREAMING)
+		goto end;
+
 	if ((tpg_res->res_type != CAM_ISP_RESOURCE_TPG) ||
 		(tpg_res->res_state != CAM_ISP_RESOURCE_STATE_RESERVED)) {
 		CAM_ERR(CAM_ISP, "TPG:%d Invalid Res type:%d res_state:%d",