[PATCH 1/2] media: qcom: camss: Do not link CSID source pads the CSID does not have

From: Hitesh Patel

Date: Tue Sep 15 2026 - 09:54:19 EST


With the streams API a non-lite CSID registers MSM_CSID_PADS_NUM - 1
pads, one source pad per RDI0..2, while a lite CSID keeps all
MSM_CSID_PADS_NUM pads. camss_link_entities() still links source pad
MSM_CSID_PAD_FIRST_SRC + j of every CSID to line j of every VFE.

On SC7280 the non-lite csid0 is linked to vfe_lite0, which has four
lines, so the loop asks for csid0 source pad 4:

WARNING: drivers/media/mc/mc-entity.c:1150 media_create_pad_link
qcom-camss acb3000.isp: Failed to link msm_csid0->msm_vfe3_rdi3 entities: -22
qcom-camss acb3000.isp: probe with driver qcom-camss failed with error -22

SM8250 does not hit this because csid_vfe_fixed_pairing only links
csid[i] to vfe[i]. Every other platform that links all CSIDs to all
VFEs fails to probe as soon as streams_enable is set on a non-lite
CSID.

Skip the VFE lines for which the CSID has no source pad.

Signed-off-by: Hitesh Patel <hitesh@xxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/camss/camss.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 9bfb02903..0201debd4 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -5022,6 +5022,9 @@ static int camss_link_entities(struct camss *camss)
struct v4l2_subdev *csid = &camss->csid[i].subdev;
struct v4l2_subdev *vfe = &camss->vfe[k].line[j].subdev;

+ if (MSM_CSID_PAD_FIRST_SRC + j >= csid->entity.num_pads)
+ continue;
+
ret = media_create_pad_link(&csid->entity,
MSM_CSID_PAD_FIRST_SRC + j,
&vfe->entity,
--
2.43.0