msm: camera: isp: Add support of PDAF parsed outport
Add support of new PDAF Parsed data outport for VFE 780. CRs-Fixed: 2948116 Change-Id: Icd88e3947f6c1461c49ef6912985836931a1c62b Signed-off-by: Chandan Kumar Jha <cjha@codeaurora.org>
This commit is contained in:
@@ -740,6 +740,7 @@ static char *__cam_isp_ife_sfe_resource_handle_id_to_type(
|
|||||||
case CAM_ISP_IFE_OUT_RES_SPARSE_PD: return "IFE_SPARSE_PD";
|
case CAM_ISP_IFE_OUT_RES_SPARSE_PD: return "IFE_SPARSE_PD";
|
||||||
case CAM_ISP_IFE_OUT_RES_STATS_CAF: return "IFE_STATS_CAF";
|
case CAM_ISP_IFE_OUT_RES_STATS_CAF: return "IFE_STATS_CAF";
|
||||||
case CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS: return "IFE_STATS_BAYER_RS";
|
case CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS: return "IFE_STATS_BAYER_RS";
|
||||||
|
case CAM_ISP_IFE_OUT_RES_PDAF_PARSED_DATA: return "IFE_PDAF_PARSED_DATA";
|
||||||
/* SFE output ports */
|
/* SFE output ports */
|
||||||
case CAM_ISP_SFE_OUT_RES_RDI_0: return "SFE_RDI_0";
|
case CAM_ISP_SFE_OUT_RES_RDI_0: return "SFE_RDI_0";
|
||||||
case CAM_ISP_SFE_OUT_RES_RDI_1: return "SFE_RDI_1";
|
case CAM_ISP_SFE_OUT_RES_RDI_1: return "SFE_RDI_1";
|
||||||
|
@@ -375,7 +375,7 @@ static struct cam_vfe_top_ver4_wr_client_desc vfe780_wr_client_desc[] = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.wm_id = 22,
|
.wm_id = 22,
|
||||||
.desc = "PDAF_2_LCR",
|
.desc = "PDAF_2_PARSED_DATA",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.wm_id = 23,
|
.wm_id = 23,
|
||||||
@@ -811,7 +811,7 @@ static struct cam_vfe_top_ver4_hw_info vfe780_top_hw_info = {
|
|||||||
.path_port_map = {
|
.path_port_map = {
|
||||||
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_2PD},
|
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_2PD},
|
||||||
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_PREPROCESS_2PD},
|
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_PREPROCESS_2PD},
|
||||||
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_LCR}
|
{CAM_ISP_HW_VFE_IN_PDLIB, CAM_ISP_IFE_OUT_RES_PDAF_PARSED_DATA},
|
||||||
},
|
},
|
||||||
.num_top_errors = ARRAY_SIZE(vfe780_top_irq_err_desc),
|
.num_top_errors = ARRAY_SIZE(vfe780_top_irq_err_desc),
|
||||||
.top_err_desc = vfe780_top_irq_err_desc,
|
.top_err_desc = vfe780_top_irq_err_desc,
|
||||||
@@ -1563,7 +1563,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe780_bus_hw_info = {
|
|||||||
.comp_group = CAM_VFE_BUS_VER3_COMP_GRP_11,
|
.comp_group = CAM_VFE_BUS_VER3_COMP_GRP_11,
|
||||||
.ubwc_regs = NULL,
|
.ubwc_regs = NULL,
|
||||||
},
|
},
|
||||||
/* BUS Client 22 PDAF V2.0 PDAF_2_LCR */
|
/* BUS Client 22 PDAF V2.0 PDAF_2_PARSED_DATA */
|
||||||
{
|
{
|
||||||
.cfg = 0x00002400,
|
.cfg = 0x00002400,
|
||||||
.image_addr = 0x00002404,
|
.image_addr = 0x00002404,
|
||||||
@@ -2024,7 +2024,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe780_bus_hw_info = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_LCR,
|
.vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED,
|
||||||
.max_width = -1,
|
.max_width = -1,
|
||||||
.max_height = -1,
|
.max_height = -1,
|
||||||
.source_group = CAM_VFE_BUS_VER3_SRC_GRP_1,
|
.source_group = CAM_VFE_BUS_VER3_SRC_GRP_1,
|
||||||
@@ -2035,7 +2035,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe780_bus_hw_info = {
|
|||||||
22,
|
22,
|
||||||
},
|
},
|
||||||
.name = {
|
.name = {
|
||||||
"PDAF_2_LCR",
|
"PDAF_2_PARSED_DATA",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -2207,7 +2207,7 @@ static struct cam_vfe_bus_ver3_hw_info vfe780_bus_hw_info = {
|
|||||||
.support_consumed_addr = true,
|
.support_consumed_addr = true,
|
||||||
.comp_done_shift = 0,
|
.comp_done_shift = 0,
|
||||||
.top_irq_shift = 0,
|
.top_irq_shift = 0,
|
||||||
.max_out_res = CAM_ISP_IFE_OUT_RES_BASE + 35,
|
.max_out_res = CAM_ISP_IFE_OUT_RES_BASE + 36,
|
||||||
.pack_align_shift = 5,
|
.pack_align_shift = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -431,6 +431,9 @@ static enum cam_vfe_bus_ver3_vfe_out_type
|
|||||||
case CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS:
|
case CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS:
|
||||||
vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS;
|
vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS;
|
||||||
break;
|
break;
|
||||||
|
case CAM_ISP_IFE_OUT_RES_PDAF_PARSED_DATA:
|
||||||
|
vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
CAM_WARN(CAM_ISP, "Invalid isp res id: %d , assigning max",
|
CAM_WARN(CAM_ISP, "Invalid isp res id: %d , assigning max",
|
||||||
res_type);
|
res_type);
|
||||||
@@ -550,6 +553,9 @@ static int cam_vfe_bus_ver3_get_comp_vfe_out_res_id_list(
|
|||||||
if (comp_mask & (BIT_ULL(CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS)))
|
if (comp_mask & (BIT_ULL(CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS)))
|
||||||
out_list[count++] = CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS;
|
out_list[count++] = CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS;
|
||||||
|
|
||||||
|
if (comp_mask & (BIT_ULL(CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED)))
|
||||||
|
out_list[count++] = CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED;
|
||||||
|
|
||||||
*num_out = count;
|
*num_out = count;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1267,6 +1273,22 @@ static int cam_vfe_bus_ver3_acquire_wm(
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (vfe_out_res_id == CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED) {
|
||||||
|
switch (rsrc_data->format) {
|
||||||
|
case CAM_FORMAT_PLAIN16_16:
|
||||||
|
rsrc_data->stride = ALIGNUP(rsrc_data->width * 2, 8);
|
||||||
|
rsrc_data->en_cfg = 0x1;
|
||||||
|
/* LSB aligned */
|
||||||
|
rsrc_data->pack_fmt |= (1 <<
|
||||||
|
ver3_bus_priv->common_data.pack_align_shift);
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CAM_ERR(CAM_ISP, "Invalid format %d out_type:%d",
|
||||||
|
rsrc_data->format, vfe_out_res_id);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
CAM_ERR(CAM_ISP, "Invalid out_type:%d requested",
|
CAM_ERR(CAM_ISP, "Invalid out_type:%d requested",
|
||||||
vfe_out_res_id);
|
vfe_out_res_id);
|
||||||
|
@@ -87,6 +87,7 @@ enum cam_vfe_bus_ver3_vfe_out_type {
|
|||||||
CAM_VFE_BUS_VER3_VFE_OUT_PREPROCESS_RAW,
|
CAM_VFE_BUS_VER3_VFE_OUT_PREPROCESS_RAW,
|
||||||
CAM_VFE_BUS_VER3_VFE_OUT_STATS_CAF,
|
CAM_VFE_BUS_VER3_VFE_OUT_STATS_CAF,
|
||||||
CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS,
|
CAM_VFE_BUS_VER3_VFE_OUT_STATS_BAYER_RS,
|
||||||
|
CAM_VFE_BUS_VER3_VFE_OUT_PDAF_PARSED,
|
||||||
CAM_VFE_BUS_VER3_VFE_OUT_MAX,
|
CAM_VFE_BUS_VER3_VFE_OUT_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#define CAM_ISP_IFE_LITE_OUT_RES_PREPROCESS_RAW (CAM_ISP_IFE_OUT_RES_BASE + 32)
|
#define CAM_ISP_IFE_LITE_OUT_RES_PREPROCESS_RAW (CAM_ISP_IFE_OUT_RES_BASE + 32)
|
||||||
#define CAM_ISP_IFE_OUT_RES_STATS_CAF (CAM_ISP_IFE_OUT_RES_BASE + 33)
|
#define CAM_ISP_IFE_OUT_RES_STATS_CAF (CAM_ISP_IFE_OUT_RES_BASE + 33)
|
||||||
#define CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS (CAM_ISP_IFE_OUT_RES_BASE + 34)
|
#define CAM_ISP_IFE_OUT_RES_STATS_BAYER_RS (CAM_ISP_IFE_OUT_RES_BASE + 34)
|
||||||
|
#define CAM_ISP_IFE_OUT_RES_PDAF_PARSED_DATA (CAM_ISP_IFE_OUT_RES_BASE + 35)
|
||||||
|
|
||||||
/* IFE input port resource type (global unique) */
|
/* IFE input port resource type (global unique) */
|
||||||
#define CAM_ISP_IFE_IN_RES_BASE 0x4000
|
#define CAM_ISP_IFE_IN_RES_BASE 0x4000
|
||||||
|
Reference in New Issue
Block a user