ソースを参照

msm: camera: icp: Remove abort and destroy cmd to FW when errors

When ICP encounters fatal errors, Kernel triggers a recovery and
UMD calls to release the hardware. Since FW encounters fatal erros
and no longer responds to HFI command, the abort and destroy command
to FW in release hw sequences bound to timeout anyway. So, this change
will avoid sending the commands in the release HW sequences.

CRs-Fixed: 3454098
Change-Id: I8dd119876df2f3cb360fbf5467221a31c47a8d22
Signed-off-by: Sokchetra Eung <[email protected]>
Sokchetra Eung 2 年 前
コミット
f6aea09d5c
1 ファイル変更6 行追加2 行削除
  1. 6 2
      drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

+ 6 - 2
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -4377,8 +4377,12 @@ static int cam_icp_mgr_release_ctx(struct cam_icp_hw_mgr *hw_mgr, int ctx_id)
 	CAM_DBG(CAM_ICP, "%s: E: recovery = %d",
 		hw_mgr->ctx_data[ctx_id].ctx_id_string,
 		atomic_read(&hw_mgr->recovery));
-	cam_icp_mgr_abort_handle(&hw_mgr->ctx_data[ctx_id]);
-	cam_icp_mgr_destroy_handle(&hw_mgr->ctx_data[ctx_id]);
+
+	if (!atomic_read(&hw_mgr->recovery)) {
+		cam_icp_mgr_abort_handle(&hw_mgr->ctx_data[ctx_id]);
+		cam_icp_mgr_destroy_handle(&hw_mgr->ctx_data[ctx_id]);
+	}
+
 	cam_icp_mgr_cleanup_ctx(&hw_mgr->ctx_data[ctx_id]);
 
 	hw_mgr->ctx_data[ctx_id].fw_handle = 0;