From: bryan.odonoghue@linaro.org
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Bryan O'Donoghue <bod@kernel.org>
Subject: [PATCH 2/3] media: qcom: camss: Fix CSID to VFE routing for non ISPIF platforms
Date: Sun, 22 Nov 2026 02:10:49 +0000 [thread overview]
Message-ID: <20261122-camss-routing-fixes-v1-2-0deeeaca2622@kernel.org> (raw)
In-Reply-To: <20261122-camss-routing-fixes-v1-0-0deeeaca2622@kernel.org>
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
next prev parent reply other threads:[~2026-11-22 2:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-11-22 2:10 ` [PATCH 3/3] media: qcom: camss: vfe: Eliminate ever expanding src_pad_code switch logic bryan.odonoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261122-camss-routing-fixes-v1-2-0deeeaca2622@kernel.org \
--to=bryan.odonoghue@linaro.org \
--cc=bod@kernel.org \
--cc=hverkuil@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®