Forráskód Böngészése

msm: camera: cre: calling cpas stop during release

CRE is not calling cpas stop during release causing
cpas handle to not release. it leads to next time acquire
failure.
Handling release properly with this fix.

CRs-Fixed: 3081144
Change-Id: I40cc22ac86934bc53171f19652a0fee381ee5d67
Signed-off-by: Dharmender Sharma <[email protected]>
Dharmender Sharma 1 éve
szülő
commit
ac33a9b0cf

+ 1 - 1
drivers/cam_cre/cam_cre_hw_mgr/cam_cre_hw_mgr.c

@@ -2006,7 +2006,7 @@ static int cam_cre_mgr_release_hw(void *hw_priv, void *hw_release_args)
 	mutex_lock(&hw_mgr->hw_mgr_mutex);
 	rc = cam_cre_mgr_release_ctx(hw_mgr, ctx_id);
 	if (!hw_mgr->cre_ctx_cnt) {
-		CAM_DBG(CAM_CRE, "Last Release");
+		CAM_DBG(CAM_CRE, "Last Release #of CRE %d", cre_hw_mgr->num_cre);
 		for (i = 0; i < cre_hw_mgr->num_cre; i++) {
 			dev_intf = hw_mgr->cre_dev_intf[i];
 			irq_cb.cre_hw_mgr_cb = NULL;

+ 5 - 0
drivers/cam_cre/cam_cre_hw_mgr/cre_hw/cre_core.c

@@ -233,6 +233,11 @@ int cam_cre_deinit_hw(void *device_priv,
 		CAM_ERR(CAM_CRE, "soc disable is failed : %d", rc);
 	core_info->clk_enable = false;
 
+	if (cam_cpas_stop(core_info->cpas_handle))
+		CAM_ERR(CAM_CRE, "cpas stop is failed");
+	else
+		core_info->cpas_start = false;
+
 	return rc;
 }