[PATCH RESEND 30/45] media: qcom: camss: sa8775p: add IFE pad descriptors

From: Gjorgji . Rosikopulos . gjorgji . rosikopulos

Date: Wed Oct 07 2026 - 05:14:45 EST


From: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>

Describe the SA8775P full and lite IFE pads and write masters.

Co-developed-by: Vikram Sharma <vikram.sharma@xxxxxxxxxxxxxxxx>
Signed-off-by: Vikram Sharma <vikram.sharma@xxxxxxxxxxxxxxxx>
Co-developed-by: Prashant Shrotriya <prashant.shrotriya@xxxxxxxxxxxxxxxx>
Signed-off-by: Prashant Shrotriya <prashant.shrotriya@xxxxxxxxxxxxxxxx>
Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
---
.../platform/qcom/camss/camss-ife-pads.c | 216 ++++++++++++++++++
drivers/media/platform/qcom/camss/camss-ife.h | 2 +
2 files changed, 218 insertions(+)

diff --git a/drivers/media/platform/qcom/camss/camss-ife-pads.c b/drivers/media/platform/qcom/camss/camss-ife-pads.c
index 7a4e41c9660b..b1e6204ceb21 100644
--- a/drivers/media/platform/qcom/camss/camss-ife-pads.c
+++ b/drivers/media/platform/qcom/camss/camss-ife-pads.c
@@ -358,3 +358,219 @@ const struct ife_pads_descriptors ife_pads_v20x = {
.num_desc = ARRAY_SIZE(ife_pad_desc_v20x),
.desc = ife_pad_desc_v20x,
};
+
+static const struct ife_pad_limits ife_vid_limits_v30x = {
+ .min_width = 320,
+ .min_height = 240,
+ .max_width = 16384,
+ .max_height = 16384,
+ .max_h_ratio = 16,
+ .max_v_ratio = 16,
+};
+
+static const struct ife_pad_limits ife_vid_limits_v41x = {
+ .min_width = 16,
+ .min_height = 16,
+ .max_width = 16384,
+ .max_height = 16384,
+ .max_h_ratio = 64,
+ .max_v_ratio = 64,
+};
+
+static const struct ife_pad_desc ife_lite_pad_desc_v30x[] = {
+ {
+ .pad_flags = MEDIA_PAD_FL_SINK,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v30x,
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v30x,
+ .video_name = "rdi0",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI0,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI0,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 0 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v30x,
+ .video_name = "rdi1",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI1,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI1,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 1 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v30x,
+ .video_name = "rdi2",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI2,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI2,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 2 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v30x,
+ .video_name = "rdi3",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI3,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI3,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 3 },
+ },
+};
+
+const struct ife_pads_descriptors ife_lite_pads_v30x = {
+ .num_desc = ARRAY_SIZE(ife_lite_pad_desc_v30x),
+ .desc = ife_lite_pad_desc_v30x,
+};
+
+static const struct ife_pad_desc ife_pad_desc_v41x[] = {
+ {
+ .pad_flags = MEDIA_PAD_FL_SINK,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_vid_pix_fmts_v20x),
+ .formats = ife_vid_pix_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ .video_name = "vid_full",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_VID_FULL,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_PP,
+ .packing_fmt = 0x1,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_LINE_BASED,
+ .num_wms = 2,
+ .wm = { 0, 1 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_vid_pix_fmts_v20x),
+ .formats = ife_vid_pix_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ .video_name = "disp_full",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_DISP_FULL,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_PP,
+ .packing_fmt = 0x1,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_LINE_BASED,
+ .num_wms = 2,
+ .wm = { 3, 4 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ .video_name = "rdi0",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI0,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI0,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 16 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ .video_name = "rdi1",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI1,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI1,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 17 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SOURCE,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_sink_fmts_v20x),
+ .formats = ife_sink_fmts_v20x,
+ },
+ .limits = &ife_vid_limits_v41x,
+ .video_name = "rdi2",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ .output = CAMSS_IFE_OUTPUT_RDI2,
+ .hw_pipe = CAMSS_IFE_HW_PIPE_RDI2,
+ .packing_fmt = 0x0,
+ .mode_config = BUSWR_CLIENT_CFG_MODE_FRAME_BASED,
+ .num_wms = 1,
+ .wm = { 18 },
+ },
+ {
+ .pad_flags = MEDIA_PAD_FL_SINK,
+ .sup_fmts = {
+ .nformats = ARRAY_SIZE(ife_params_fmts_v20x),
+ .formats = ife_params_fmts_v20x,
+ },
+ .limits = &ife_meta_limits_v20x,
+ .video_name = "params",
+ .link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED,
+ .buf_type = V4L2_BUF_TYPE_META_OUTPUT,
+ .meta_dataformat = V4L2_META_FMT_QC_IFE_PARAMS,
+ .meta_buffersize = PAGE_ALIGN(v4l2_isp_buffer_size(CAMSS_IFE_PARAMS_MAX_PAYLOAD)),
+ },
+};
+
+const struct ife_pads_descriptors ife_pads_v41x = {
+ .num_desc = ARRAY_SIZE(ife_pad_desc_v41x),
+ .desc = ife_pad_desc_v41x,
+};
diff --git a/drivers/media/platform/qcom/camss/camss-ife.h b/drivers/media/platform/qcom/camss/camss-ife.h
index eff4ab4bd1c9..0ca276203bbb 100644
--- a/drivers/media/platform/qcom/camss/camss-ife.h
+++ b/drivers/media/platform/qcom/camss/camss-ife.h
@@ -395,6 +395,7 @@ camss_ife_pipe_for_stream_id(int nstreams,
u32 id);

extern const struct ife_pads_descriptors ife_pads_v20x;
+extern const struct ife_pads_descriptors ife_pads_v41x;
extern const struct ife_hw_top_ops ife_top_20x_ops;
extern const struct ife_hw_top_ops ife_top_v41x_ops;
extern const struct ife_hw_buswr_ops ife_buswr_20x_ops;
@@ -402,6 +403,7 @@ extern const struct ife_hw_buswr_ops ife_buswr_31x_ops;
extern const struct camss_mod_ops ife_mod_v10x_ops;

extern const struct ife_pads_descriptors ife_lite_pads_v20x;
+extern const struct ife_pads_descriptors ife_lite_pads_v30x;
extern const struct ife_hw_top_ops ife_lite_top_10x_ops;
extern const struct ife_hw_top_ops ife_lite_top_30x_ops;

--
2.34.1