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 <vchinta@codeaurora.org>
This commit is contained in:
Venkat Chinta 2019-10-10 11:31:03 -07:00 committed by Gerrit - the friendly Code Review server
parent 388c4f7280
commit 422de0bbf4

View File

@ -251,6 +251,13 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
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);
if (!vfe_hw->open_count) {
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);
}
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));
/* Turn OFF Regulators, Clocks and other SOC resources */