msm: camera: isp: Validate input formats for FE use-cases
In case of multi vc-dt fetch engine use-cases, validate the input format for each VC, they are expected to be the same. Different input formats for each VC for SFE FE use-cases, is not supported. CRs-Fixed: 3163468 Change-Id: I73aab062bc316f01af4fdbf3eb0155c7e1b2719e Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:

gecommit door
Camera Software Integration

bovenliggende
e8bff0c479
commit
b9c94c3452
@@ -4849,7 +4849,6 @@ static int cam_ife_mgr_acquire_get_unified_structure_v2(
|
||||
in_port->pixel_clk = in->pixel_clk;
|
||||
in_port->batch_size = in->batch_size;
|
||||
in_port->dsp_mode = in->dsp_mode;
|
||||
in_port->fe_unpacker_fmt = in->format;
|
||||
in_port->hbi_cnt = in->hbi_cnt;
|
||||
in_port->cust_node = in->cust_node;
|
||||
in_port->horizontal_bin = (in->bidirectional_bin & 0xFFFF);
|
||||
@@ -4858,6 +4857,12 @@ static int cam_ife_mgr_acquire_get_unified_structure_v2(
|
||||
in_port->num_out_res = in->num_out_res;
|
||||
in_port->sfe_in_path_type = (in->sfe_in_path_type & 0xFFFF);
|
||||
in_port->sfe_ife_enable = in->sfe_in_path_type >> 16;
|
||||
/*
|
||||
* Different formats are not supported for fetch engine use-cases
|
||||
* Use vc0 format [LSB 8 bits], if the input formats are different for each VC
|
||||
* fail the acquire
|
||||
*/
|
||||
in_port->fe_unpacker_fmt = in->format & CAM_IFE_DECODE_FORMAT_MASK;
|
||||
|
||||
cam_ife_mgr_acquire_get_feature_flag_params(in, in_port);
|
||||
|
||||
@@ -4940,6 +4945,7 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
|
||||
struct cam_isp_acquire_hw_info *acquire_hw_info = NULL;
|
||||
uint32_t input_size = 0;
|
||||
uint32_t acquired_rdi_res = 0;
|
||||
uint32_t input_format_checker = 0;
|
||||
|
||||
CAM_DBG(CAM_ISP, "Enter...");
|
||||
|
||||
@@ -5003,6 +5009,20 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
|
||||
goto free_mem;
|
||||
}
|
||||
|
||||
/* Check for formats in multi vc-dt FE use-cases */
|
||||
if (ife_ctx->flags.is_fe_enabled) {
|
||||
input_format_checker = in_port[i].format[0];
|
||||
for (j = 1; j < in_port[i].num_valid_vc_dt; j++) {
|
||||
if (in_port[i].format[j] != input_format_checker) {
|
||||
CAM_ERR(CAM_ISP,
|
||||
"Different input formats for FE use-cases not supported - formats vc0: %u vc%d: %u",
|
||||
input_format_checker, j, in_port[i].format[j]);
|
||||
rc = -EINVAL;
|
||||
goto free_mem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cam_ife_hw_mgr_preprocess_port(ife_ctx, &in_port[i]);
|
||||
total_pix_port += in_port[i].ipp_count +
|
||||
in_port[i].ife_rd_count +
|
||||
|
@@ -422,7 +422,7 @@ static int cam_sfe_bus_acquire_rm(
|
||||
|
||||
rm_res_local = &bus_rd_priv->bus_client[rm_idx];
|
||||
if (rm_res_local->res_state != CAM_ISP_RESOURCE_STATE_AVAILABLE) {
|
||||
CAM_ERR(CAM_SFE, "SFE:%d RM:%d res not available state:%d",
|
||||
CAM_ERR(CAM_SFE, "SFE:%u RM:%u res not available state:%d",
|
||||
bus_rd_priv->common_data.core_index, rm_idx,
|
||||
rm_res_local->res_state);
|
||||
return -EALREADY;
|
||||
@@ -434,6 +434,12 @@ static int cam_sfe_bus_acquire_rm(
|
||||
rsrc_data->ctx = ctx;
|
||||
rsrc_data->unpacker_cfg =
|
||||
cam_sfe_bus_get_unpacker_fmt(unpacker_fmt);
|
||||
if (rsrc_data->unpacker_cfg == BUS_RD_UNPACKER_FMT_MAX) {
|
||||
CAM_ERR(CAM_SFE, "SFE:%u RM:%u Invalid unpacker fmt:%u",
|
||||
bus_rd_priv->common_data.core_index, rm_idx, unpacker_fmt);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rsrc_data->latency_buf_allocation =
|
||||
bus_rd_priv->latency_buf_allocation;
|
||||
rsrc_data->enable_caching = false;
|
||||
|
Verwijs in nieuw issue
Block a user