* [PATCH 1/3] media: qcom: camss: x1e80100: Fix CSID2 routing to nowhere
2026-11-22 2:10 [PATCH 0/3] media: qcom: camss: Two routing fixes and one tidy-up bryan.odonoghue
@ 2026-11-22 2:10 ` bryan.odonoghue
2026-11-22 2:10 ` [PATCH 2/3] media: qcom: camss: Fix CSID to VFE routing for non ISPIF platforms bryan.odonoghue
2026-11-22 2:10 ` [PATCH 3/3] media: qcom: camss: vfe: Eliminate ever expanding src_pad_code switch logic bryan.odonoghue
2 siblings, 0 replies; 4+ messages in thread
From: bryan.odonoghue @ 2026-11-22 2:10 UTC (permalink / raw)
To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
Mauro Carvalho Chehab, Hans Verkuil
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
CSID2 doesn't actually have a corresponding VFE it can receive CSIPHY input
and raise an interrupt but it can't drive any VFE write-master. This is
basically useless and not worth coding around in the upstream driver. If we
find a real use for this we can turn this back on. In the meantime drop the
definition, it only confuses things.
Fixes: 1830cf0f56c3 ("media: qcom: camss: Add x1e80100 specific support")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/camss/camss.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index 26e3f2aa3ef24..aa6d01d8fcb2a 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -4515,27 +4515,6 @@ static const struct camss_subdev_resources csid_res_x1e80100[] = {
.formats = &csid_formats_gen2
},
},
- /* CSID2 */
- {
- .regulators = {},
- .clock = { "gcc_axi_hf", "gcc_axi_sf", "cpas_ahb",
- "cpas_fast_ahb", "csid", "csid_csiphy_rx" },
- .clock_rate = { { 0 },
- { 0 },
- { 64000000, 80000000 },
- { 80000000, 100000000, 200000000,
- 300000000, 400000000 },
- { 300000000, 400000000, 480000000 },
- { 300000000, 400000000, 480000000 }, },
- .reg = { "csid2" },
- .interrupt = { "csid2" },
- .csid = {
- .frame_sync_en = true,
- .hw_ops = &csid_ops_680,
- .parent_dev_ops = &vfe_parent_dev_ops,
- .formats = &csid_formats_gen2
- },
- },
/* CSID_LITE0 */
{
.regulators = {},
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] media: qcom: camss: Fix CSID to VFE routing for non ISPIF platforms
2026-11-22 2:10 [PATCH 0/3] media: qcom: camss: Two routing fixes and one tidy-up bryan.odonoghue
2026-11-22 2:10 ` [PATCH 1/3] media: qcom: camss: x1e80100: Fix CSID2 routing to nowhere bryan.odonoghue
@ 2026-11-22 2:10 ` bryan.odonoghue
2026-11-22 2:10 ` [PATCH 3/3] media: qcom: camss: vfe: Eliminate ever expanding src_pad_code switch logic bryan.odonoghue
2 siblings, 0 replies; 4+ messages in thread
From: bryan.odonoghue @ 2026-11-22 2:10 UTC (permalink / raw)
To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
Mauro Carvalho Chehab, Hans Verkuil
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
This patch fixes a basic routing error that has been present in CAMSS since
the addition of non ISPIF platforms.
The ISPIF platforms can route any CSID to any VFE however this is not the
case on the non ISPIF platforms.
The current requirement is a 1:1 mapping CSID0->VFE0 CSID1->VFE1 etc.
Demote the spurious poly-mapping down to its 1:1 real form.
Fixes: 9229b53f9758 ("Revert "media: qcom: camss: Restructure camss_link_entities"")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/camss/camss.c | 38 ++++++++++++++++++-------------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
index aa6d01d8fcb2a..060879a55e483 100644
--- a/drivers/media/platform/qcom/camss/camss.c
+++ b/drivers/media/platform/qcom/camss/camss.c
@@ -5257,24 +5257,30 @@ static int camss_link_entities(struct camss *camss)
}
}
} else {
- for (i = 0; i < camss->res->csid_num; i++)
- for (k = 0; k < camss->res->vfe_num; k++)
- for (j = 0; j < camss->vfe[k].res->line_num; j++) {
- struct v4l2_subdev *csid = &camss->csid[i].subdev;
- struct v4l2_subdev *vfe = &camss->vfe[k].line[j].subdev;
- ret = media_create_pad_link(&csid->entity,
- MSM_CSID_PAD_FIRST_SRC + j,
- &vfe->entity,
- MSM_VFE_PAD_SINK,
- 0);
- if (ret < 0) {
- camss_link_err(camss, csid->entity.name,
- vfe->entity.name,
- ret);
- return ret;
- }
+ if (camss->res->csid_num != camss->res->vfe_num) {
+ return dev_err_probe(camss->dev, -EINVAL,
+ "csid_num %u != vfe_num %u\n",
+ camss->res->csid_num, camss->res->vfe_num);
+ }
+
+ for (i = 0; i < camss->res->csid_num; i++)
+ for (j = 0; j < camss->vfe[i].res->line_num; j++) {
+ struct v4l2_subdev *csid = &camss->csid[i].subdev;
+ struct v4l2_subdev *vfe = &camss->vfe[i].line[j].subdev;
+
+ ret = media_create_pad_link(&csid->entity,
+ MSM_CSID_PAD_FIRST_SRC + j,
+ &vfe->entity,
+ MSM_VFE_PAD_SINK,
+ 0);
+ if (ret < 0) {
+ camss_link_err(camss, csid->entity.name,
+ vfe->entity.name,
+ ret);
+ return ret;
}
+ }
}
return 0;
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 3/3] media: qcom: camss: vfe: Eliminate ever expanding src_pad_code switch logic
2026-11-22 2:10 [PATCH 0/3] media: qcom: camss: Two routing fixes and one tidy-up bryan.odonoghue
2026-11-22 2:10 ` [PATCH 1/3] media: qcom: camss: x1e80100: Fix CSID2 routing to nowhere bryan.odonoghue
2026-11-22 2:10 ` [PATCH 2/3] media: qcom: camss: Fix CSID to VFE routing for non ISPIF platforms bryan.odonoghue
@ 2026-11-22 2:10 ` bryan.odonoghue
2 siblings, 0 replies; 4+ messages in thread
From: bryan.odonoghue @ 2026-11-22 2:10 UTC (permalink / raw)
To: Bryan O'Donoghue, Vladimir Zapolskiy, Loic Poulain,
Mauro Carvalho Chehab, Hans Verkuil
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Every time we add a SoC the src_pad_code switch statement is expanded. This
expansion has continued to the point where there are more SoCs listed for
what used to be the exceptional state, than the reverse.
Invert the logic. The exception to the rule is the old SoC set there's no
purpose in expanding this switch continuously.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/media/platform/qcom/camss/camss-vfe.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index f9bd2367671f6..10ad862ff5010 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -340,21 +340,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code,
return sink_code;
}
break;
- case CAMSS_660:
- case CAMSS_2290:
- case CAMSS_6150:
- case CAMSS_6350:
- case CAMSS_7280:
- case CAMSS_8x96:
- case CAMSS_8250:
- case CAMSS_8280XP:
- case CAMSS_8300:
- case CAMSS_845:
- case CAMSS_8550:
- case CAMSS_8650:
- case CAMSS_8775P:
- case CAMSS_KAANAPALI:
- case CAMSS_X1E80100:
+ default:
switch (sink_code) {
case MEDIA_BUS_FMT_YUYV8_1X16:
{
@@ -415,10 +401,6 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code,
return sink_code;
}
break;
- default:
- WARN(1, "Unsupported HW version: %x\n",
- vfe->camss->res->version);
- break;
}
return 0;
}
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread