msm: camera: csiphy: Add proper check for combo mode
Currently in combo mode csiphy preamable enable is determined with premalbe flag set previously and current sensor configuration setting. In case of non combo mode usecase if config packet is coming back to back current condition check misinterpret it as combo mode and fails with incorrect operation. This change adds the combo_mode condition check along with other to correctly detemine combo mode and non combo mode usecase and behaves accordingly. CRs-Fixed: 3054225 Change-Id: I59532405230ab23dfd42425f20bd1a108cc8ce14 Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
74ae961cc1
commit
51cd1a4e0c
@@ -85,7 +85,9 @@ static void cam_csiphy_reset_phyconfig_param(struct csiphy_device *csiphy_dev,
|
||||
csiphy_dev->csiphy_info[index].settle_time = 0;
|
||||
csiphy_dev->csiphy_info[index].data_rate = 0;
|
||||
csiphy_dev->csiphy_info[index].secure_mode = 0;
|
||||
csiphy_dev->csiphy_info[index].mipi_flags = 0;
|
||||
csiphy_dev->csiphy_info[index].hdl_data.device_hdl = -1;
|
||||
csiphy_dev->csiphy_info[index].csiphy_3phase = -1;
|
||||
}
|
||||
|
||||
static inline void cam_csiphy_apply_onthego_reg_values(void __iomem *csiphybase, uint8_t csiphy_idx)
|
||||
@@ -635,14 +637,12 @@ int32_t cam_cmd_buf_parser(struct csiphy_device *csiphy_dev,
|
||||
* preamble enable.
|
||||
*/
|
||||
if (csiphy_dev->preamble_enable && !preamble_en &&
|
||||
csiphy_dev->csiphy_info[index].csiphy_3phase) {
|
||||
csiphy_dev->combo_mode &&
|
||||
!csiphy_dev->cphy_dphy_combo_mode) {
|
||||
CAM_ERR(CAM_CSIPHY,
|
||||
"Cannot support CPHY combo mode with differnt preamble settings");
|
||||
return -EINVAL;
|
||||
} else if (preamble_en &&
|
||||
!csiphy_dev->csiphy_info[index].csiphy_3phase) {
|
||||
CAM_ERR(CAM_CSIPHY,
|
||||
"Preamble pattern enablement is not supported for DPHY sensors");
|
||||
"Cannot support %s combo mode with differnt preamble settings",
|
||||
(csiphy_dev->csiphy_info[index].csiphy_3phase ?
|
||||
"CPHY" : "DPHY"));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2087,6 +2087,7 @@ int32_t cam_csiphy_core_cfg(void *phy_dev,
|
||||
CAM_SECURE_MODE_NON_SECURE;
|
||||
|
||||
csiphy_dev->csiphy_cpas_cp_reg_mask[offset] = 0x0;
|
||||
csiphy_dev->preamble_enable = 0;
|
||||
|
||||
rc = cam_destroy_device_hdl(release.dev_handle);
|
||||
if (rc < 0)
|
||||
|
@@ -286,6 +286,7 @@ static int cam_csiphy_component_bind(struct device *dev,
|
||||
new_csiphy_dev->csiphy_info[i].lane_cnt = 0;
|
||||
new_csiphy_dev->csiphy_info[i].lane_assign = 0;
|
||||
new_csiphy_dev->csiphy_info[i].lane_enable = 0;
|
||||
new_csiphy_dev->csiphy_info[i].mipi_flags = 0;
|
||||
}
|
||||
|
||||
new_csiphy_dev->ops.get_dev_info = NULL;
|
||||
@@ -294,6 +295,7 @@ static int cam_csiphy_component_bind(struct device *dev,
|
||||
|
||||
new_csiphy_dev->acquire_count = 0;
|
||||
new_csiphy_dev->start_dev_count = 0;
|
||||
new_csiphy_dev->preamble_enable = 0;
|
||||
|
||||
cpas_parms.cam_cpas_client_cb = NULL;
|
||||
cpas_parms.cell_index = new_csiphy_dev->soc_info.index;
|
||||
|
Reference in New Issue
Block a user