소스 검색

msm: camera: cdm: Added cdm power state check

There is chance that handle error info get scheduled
after cdm deinit. As clock and regulator gets disabled
as part of deinit so this can cause issue for cdm hw
interaction as part of handle error.

Added cdm power state check before dumping CDM HW
status at the time of error.

CRs-Fixed: 2833653
Change-Id: I4bf01ce3900196909cf66ffdb24607c50ab03295
Signed-off-by: Alok Chauhan <[email protected]>
Alok Chauhan 4 년 전
부모
커밋
1a1bce2765
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      drivers/cam_cdm/cam_cdm_hw_core.c

+ 5 - 0
drivers/cam_cdm/cam_cdm_hw_core.c

@@ -1784,6 +1784,11 @@ int cam_hw_cdm_handle_error_info(
 	set_bit(CAM_CDM_RESET_HW_STATUS, &cdm_core->cdm_status);
 	set_bit(CAM_CDM_FLUSH_HW_STATUS, &cdm_core->cdm_status);
 
+	if (cdm_hw->hw_state == CAM_HW_STATE_POWER_DOWN) {
+		CAM_WARN(CAM_CDM, "CDM is in power down state");
+		goto end;
+	}
+
 	/* First pause CDM, If it fails still proceed to dump debug info */
 	cam_hw_cdm_pause_core(cdm_hw, true);