[PATCH v4 4/4] media: qcom: camss: Do not link CSID source pads the CSID does not have
From: Hitesh Patel
Date: Mon Oct 12 2026 - 08:17:07 EST
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:
num_pads = csid_is_lite(csid) ? MSM_CSID_PADS_NUM : MSM_CSID_PADS_NUM - 1;
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 and the driver fails to probe:
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
The pad count depends on lite-ness, not on streams_enable, so every
platform that links all CSIDs to all VFEs fails to probe as soon as the
CSID streams support is applied, whether or not the streams API is
enabled for that platform. SM8250 escapes it only because
csid_vfe_fixed_pairing links csid[i] to vfe[i] alone.
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 a9bd79ca3..4b73f8862 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -5028,6 +5028,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