diff --git a/drivers/cam_cpas/cpas_top/cpastop_v165_100.h b/drivers/cam_cpas/cpas_top/cpastop_v165_100.h index 9d2bdfc92633..3e739d3c33a3 100644 --- a/drivers/cam_cpas/cpas_top/cpastop_v165_100.h +++ b/drivers/cam_cpas/cpas_top/cpastop_v165_100.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CPASTOP_V165_100_H_ @@ -337,7 +337,7 @@ static struct cam_camnoc_specific * Power on default values are taking care of required * register settings. */ - .enable = true, + .enable = false, .access_type = CAM_REG_TYPE_READ_WRITE, .masked_value = 0, .offset = 0x3B88, /* IFE01_NRDI_ENCCTL_LOW */ @@ -555,7 +555,7 @@ static struct cam_camnoc_specific { /*SidebandManager_main_SidebandManager_FlagOutSet0_Low*/ .port_type = CAM_CAMNOC_ICP, - .enable = true, + .enable = false, .flag_out_set0_low = { .enable = true, .access_type = CAM_REG_TYPE_WRITE, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c index 6efeb80bbdb5..b807a9a5ab48 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c @@ -2290,6 +2290,7 @@ static int cam_ife_csid_enable_pxl_path( uint32_t val = 0; struct cam_isp_sensor_dimension *path_config; unsigned int irq_mask_val = 0; + uint32_t camera_hw_version; path_data = (struct cam_ife_csid_path_cfg *) res->res_priv; csid_reg = csid_hw->csid_info->csid_reg; @@ -2342,6 +2343,8 @@ static int cam_ife_csid_enable_pxl_path( } } + cam_cpas_get_cpas_hw_version(&camera_hw_version); + /* Set master or slave path */ if (path_data->sync_mode == CAM_ISP_HW_SYNC_MASTER) { /*Set halt mode as master */ @@ -2352,7 +2355,8 @@ static int cam_ife_csid_enable_pxl_path( val = CSID_HALT_MODE_MASTER << 2; } else if (path_data->sync_mode == CAM_ISP_HW_SYNC_SLAVE) { /*Set halt mode as slave and set master idx */ - if (pxl_reg->halt_master_sel_en) + if (pxl_reg->halt_master_sel_en || + camera_hw_version == CAM_CPAS_TITAN_165_V100) val = CSID_HALT_MODE_SLAVE << 2; else val = path_data->master_idx << 4 | @@ -2361,6 +2365,7 @@ static int cam_ife_csid_enable_pxl_path( /* Default is internal halt mode */ val = 0; } + /* * Resume at frame boundary if Master or No Sync. * Slave will get resume command from Master. diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe165_160.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe165_160.h index 1e28760bf2a9..bba9302a4f04 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe165_160.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe165_160.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #ifndef _CAM_VFE165_160_H_ @@ -88,6 +88,7 @@ static struct cam_vfe_camif_reg_data vfe_165_160_camif_reg_data = { .subscribe_irq_mask0 = 0x00000017, .subscribe_irq_mask1 = 0x00000000, .enable_diagnostic_hw = 0x1, + .dual_vfe_sync_mask = 0x3, }; static struct cam_vfe_fe_ver1_reg vfe165_160_fe_reg = { diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.c index 0a6d62412f1d..be9a5352504a 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver2.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. */ #include @@ -2639,11 +2639,6 @@ static void cam_vfe_bus_update_ubwc_meta_addr( if (rc) { CAM_ERR(CAM_ISP, "Failed to get HW version rc: %d", rc); goto end; - } else if ((camera_hw_version < CAM_CPAS_TITAN_170_V100) || - (camera_hw_version > CAM_CPAS_TITAN_175_V130)) { - CAM_ERR(CAM_ISP, "Invalid HW version: %d", - camera_hw_version); - goto end; } switch (camera_hw_version) { @@ -2670,6 +2665,8 @@ static void cam_vfe_bus_update_ubwc_meta_addr( image_buf); break; default: + CAM_ERR(CAM_ISP, "Invalid HW version: %d", + camera_hw_version); break; } end: