[PATCH v3 1/2] media: qcom: camss: Do not link CSID source pads the CSID does not have
From: Hitesh Patel
Date: Wed Sep 16 2026 - 03:02: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.
This patch applies on top of Gjorgji Rosikopulos' series "media: qcom:
camss: add V4L2 subdev streams API support" (see Link below); it does
not build without it.
Signed-off-by: Hitesh Patel <hitesh@xxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20260911062213.195007-1-gjorgji.rosikopulos@xxxxxxxxxxxxxxxx
---
v3: no code change. Reference the prerequisite series with a Link: tag
instead of a long URL in the text (checkpatch line-length warning).
v2: no code change. Add the dependency to the commit message and as
base-commit/prerequisite-patch-id trailers, so patchwork and the
Media CI do not try to build the patches standalone.
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
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
prerequisite-patch-id: 285e8b983e45d4184863e92ae99ebe46bb4f7020
prerequisite-patch-id: e8dce2cee0678cc20446f3a4a286c4a3c10d19f6
prerequisite-patch-id: d0bf82158d99863344c206a543d3e381b24a3b51
prerequisite-patch-id: ddffbfdffba948a608fc556a5ca81b9dabae7e00
prerequisite-patch-id: dca159c5eecf280ea7ce7c67f5da2364c8449759
prerequisite-patch-id: 220ee607579892058879cad0ed9344f6696313c8
prerequisite-patch-id: d7665451d090c8d4684c79736ac517d6c7ddc1fc
prerequisite-patch-id: f297c801f0254862e4fc8440dbd27473a8b78159