diff --git a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c index 13470346ad..8157e723f0 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +++ b/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c @@ -4280,6 +4280,8 @@ static int cam_ife_mgr_acquire_get_unified_structure_v2( CAM_ISP_DYNAMIC_SENOR_SWITCH_EN); in_port->can_use_lite = in->feature_flag & CAM_ISP_CAN_USE_LITE_MODE; + in_port->sfe_binned_epoch_cfg = (in->feature_flag & + CAM_ISP_SFE_BINNED_EPOCH_CFG_ENABLE); in_port->data = kcalloc(in->num_out_res, sizeof(struct cam_isp_out_port_generic_info), diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_ife_csid_hw_intf.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_ife_csid_hw_intf.h index c2bef716b5..6eddbe9f31 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_ife_csid_hw_intf.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_ife_csid_hw_intf.h @@ -135,6 +135,7 @@ struct cam_isp_in_port_generic_info { uint32_t secure_mode; uint32_t dynamic_sensor_switch_en; uint32_t can_use_lite; + uint32_t sfe_binned_epoch_cfg; struct cam_isp_out_port_generic_info *data; }; diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c index c1f47cba63..814e3f71f8 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_top_ver4.c @@ -64,6 +64,7 @@ struct cam_vfe_mux_ver4_data { bool is_offline; bool is_pixel_path; + bool sfe_binned_epoch_cfg; struct timespec64 sof_ts; struct timespec64 epoch_ts; @@ -373,6 +374,8 @@ int cam_vfe_top_acquire_resource( acquire_data->vfe_in.in_port->horizontal_bin; res_data->vbi_value = 0; res_data->hbi_value = 0; + res_data->sfe_binned_epoch_cfg = (bool) + acquire_data->vfe_in.in_port->sfe_binned_epoch_cfg; if (res_data->is_dual) res_data->dual_hw_idx = acquire_data->vfe_in.dual_hw_idx; @@ -1023,7 +1026,8 @@ static int cam_vfe_resource_start( /* Epoch line cfg will still be configured at midpoint of the frame width. * We use '/4' instead of '/2' because it is multipixel path. */ - if (rsrc_data->horizontal_bin || rsrc_data->qcfa_bin) + if (rsrc_data->horizontal_bin || rsrc_data->qcfa_bin || + rsrc_data->sfe_binned_epoch_cfg) val >>= 1; cam_io_w_mb(val, rsrc_data->mem_base + diff --git a/include/uapi/camera/media/cam_isp.h b/include/uapi/camera/media/cam_isp.h index 1c23c0f59d..7cb73b5522 100644 --- a/include/uapi/camera/media/cam_isp.h +++ b/include/uapi/camera/media/cam_isp.h @@ -169,6 +169,7 @@ #define CAM_ISP_PARAM_FETCH_SECURITY_MODE BIT(0) #define CAM_ISP_CAN_USE_LITE_MODE BIT(1) #define CAM_ISP_DYNAMIC_SENOR_SWITCH_EN BIT(2) +#define CAM_ISP_SFE_BINNED_EPOCH_CFG_ENABLE BIT(3) /* ISP core cfg flag params */ #define CAM_ISP_PARAM_CORE_CFG_HDR_MUX_SEL BIT(0)