浏览代码

msm: camera: ife: Deinit input mux resources

We must deinit IFE input mux resources before the check for open
count. Without this change the last bus resource is the last to
enter this function when open count reaches zero. So input mux
resources are never deinitialized.

CRs-Fixed: 2545140
Change-Id: I355afce7d631cdb00e3f6da0ba0be40c2e2b63a2
Signed-off-by: Venkat Chinta <[email protected]>
Venkat Chinta 5 年之前
父节点
当前提交
422de0bbf4
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c

+ 7 - 7
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c

@@ -251,6 +251,13 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
+	isp_res = (struct cam_isp_resource_node *)deinit_hw_args;
+	if (isp_res && isp_res->deinit) {
+		rc = isp_res->deinit(isp_res, NULL, 0);
+		if (rc)
+			CAM_ERR(CAM_ISP, "deinit failed");
+	}
+
 	mutex_lock(&vfe_hw->hw_mutex);
 	mutex_lock(&vfe_hw->hw_mutex);
 	if (!vfe_hw->open_count) {
 	if (!vfe_hw->open_count) {
 		mutex_unlock(&vfe_hw->hw_mutex);
 		mutex_unlock(&vfe_hw->hw_mutex);
@@ -281,13 +288,6 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
 			CAM_ERR(CAM_ISP, "Bus HW deinit Failed rc=%d", rc);
 			CAM_ERR(CAM_ISP, "Bus HW deinit Failed rc=%d", rc);
 	}
 	}
 
 
-	isp_res   = (struct cam_isp_resource_node *)deinit_hw_args;
-	if (isp_res && isp_res->deinit) {
-		rc = isp_res->deinit(isp_res, NULL, 0);
-		if (rc)
-			CAM_ERR(CAM_ISP, "deinit failed");
-	}
-
 	rc = cam_vfe_reset(hw_priv, &reset_core_args, sizeof(uint32_t));
 	rc = cam_vfe_reset(hw_priv, &reset_core_args, sizeof(uint32_t));
 
 
 	/* Turn OFF Regulators, Clocks and other SOC resources */
 	/* Turn OFF Regulators, Clocks and other SOC resources */