Explorar o código

Merge "msm: camera: ife: TPG stop Call" into camera-kernel.lnx.5.0

Savita Patted %!s(int64=4) %!d(string=hai) anos
pai
achega
81d8bfbaec

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

@@ -5644,14 +5644,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",