Переглянути джерело

Merge "msm: camera: ife: Stop hardware in error" into camera-kernel.lnx.4.0

Camera Software Integration 5 роки тому
батько
коміт
8d141684b8
1 змінених файлів з 8 додано та 15 видалено
  1. 8 15
      drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

+ 8 - 15
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -5968,6 +5968,9 @@ static int cam_ife_mgr_process_recovery_cb(void *priv, void *data)
 			}
 		}
 
+		if (!g_ife_hw_mgr.debug_cfg.enable_recovery)
+			break;
+
 		CAM_DBG(CAM_ISP, "RESET: CSID PATH");
 		for (i = 0; i < recovery_data->no_of_context; i++) {
 			ctx = recovery_data->affected_ctx[i];
@@ -6193,22 +6196,12 @@ static int cam_ife_hw_mgr_handle_hw_err(
 	rc = cam_ife_hw_mgr_find_affected_ctx(&error_event_data,
 		core_idx, &recovery_data);
 
-	if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT)
-		return rc;
-
-	if (g_ife_hw_mgr.debug_cfg.enable_recovery) {
-		CAM_DBG(CAM_ISP, "IFE Mgr recovery is enabled");
+	if (event_info->err_type == CAM_VFE_IRQ_STATUS_VIOLATION)
+		recovery_data.error_type = CAM_ISP_HW_ERROR_VIOLATION;
+	else
+		recovery_data.error_type = CAM_ISP_HW_ERROR_OVERFLOW;
 
-		/* Trigger for recovery */
-		if (event_info->err_type == CAM_VFE_IRQ_STATUS_VIOLATION)
-			recovery_data.error_type = CAM_ISP_HW_ERROR_VIOLATION;
-		else
-			recovery_data.error_type = CAM_ISP_HW_ERROR_OVERFLOW;
-		cam_ife_hw_mgr_do_error_recovery(&recovery_data);
-	} else {
-		CAM_DBG(CAM_ISP, "recovery is not enabled");
-		rc = 0;
-	}
+	cam_ife_hw_mgr_do_error_recovery(&recovery_data);
 
 	return rc;
 }