Browse Source

Merge "msm: camera: isp: Add mutex while disabling rx" into camera-kernel.lnx.5.0

Camera Software Integration 4 years ago
parent
commit
de3cbde241

+ 5 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

@@ -3600,10 +3600,10 @@ static int cam_ife_csid_ver2_enable_hw(
 	if (csid_hw->top_err_irq_handle < 1) {
 		CAM_ERR(CAM_ISP, "csid[%d] top error irq subscribe fail",
 			csid_hw->hw_intf->hw_idx);
-		 cam_irq_controller_unsubscribe_irq(
+		cam_irq_controller_unsubscribe_irq(
 			csid_hw->csid_irq_controller,
-			csid_hw->top_err_irq_handle);
-		 csid_hw->top_err_irq_handle = 0;
+			csid_hw->buf_done_irq_handle);
+		csid_hw->buf_done_irq_handle = 0;
 		return -EINVAL;
 	}
 
@@ -3912,11 +3912,11 @@ int cam_ife_csid_ver2_stop(void *hw_priv,
 		rc = cam_irq_controller_unsubscribe_irq(
 			csid_hw->csid_irq_controller,
 			csid_hw->top_err_irq_handle);
-		csid_hw->buf_done_irq_handle = 0;
+		csid_hw->top_err_irq_handle = 0;
 	}
 
-	mutex_unlock(&csid_hw->hw_info->hw_mutex);
 	cam_ife_csid_ver2_disable_csi2(csid_hw);
+	mutex_unlock(&csid_hw->hw_info->hw_mutex);
 
 	reset.reset_type = CAM_IFE_CSID_RESET_PATH;
 	cam_ife_csid_ver2_reset(hw_priv, &reset,

+ 4 - 0
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -5044,6 +5044,10 @@ int cam_req_mgr_flush_requests(
 	rc = cam_common_wait_for_completion_timeout(
 		&link->workq_comp,
 		msecs_to_jiffies(CAM_REQ_MGR_SCHED_REQ_TIMEOUT));
+	if (rc)
+		CAM_WARN(CAM_CRM, "Flush call timeout for session_hdl %u link_hdl %u type: %d",
+			flush_info->link_hdl, flush_info->session_hdl,
+			flush_info->flush_type);
 end:
 	mutex_unlock(&g_crm_core_dev->crm_lock);
 	return rc;