[PATCH v2 0/3] media: qcom: camss: Two routing fixes

From: bryan . odonoghue

Date: Thu Nov 26 2026 - 23:15:45 EST


v2:

I reviewed-by and then wasn't very happy with adding a new field
to CSID resources hw_id because this means we would have two
identifiers despite already using csid->id to mean index and hwid.

Bite the bullet and make the conversion.

This is the way - bod.

- Adds a precursor patch which provides a .id in place of CSID.

- Converts from using csid->id as both hardware identifier and index
Instead helper functions make clear and explicit do you mean csid_index()
or csid_hwid().

Several callsites need to be updated to make this happen, but that's
life. I'm a big fan of patch granularity however the differentiation
between index and hardware id must be done simultaneously.

Follows the precedent of csiphy.id - bod, Wengmeng

- Straight drop of CSID2 retained. This is the right thing to do, CSID2 is
useless dead silicon, already RB by several community members.

- Link to v1: https://patch.msgid.link/20261122-camss-routing-fixes-v1-0-0deeeaca2622@xxxxxxxxxx

- Applies to camss-next from
https://gitlab.freedesktop.org/linux-media/users/bodonoghue.git

v1:

This series lands late-enough in the kernel cycle and applies against the
camss-next branch staging to linux-media/next.

Link: https://gitlab.freedesktop.org/linux-media/users/bodonoghue/-/tree/camss-next

First up a patch drops the declaration of CSID2 from x1e/Hamoa since this
CSID doesn't have a corresponding VFE it is entirely useless and violates
our 1:1 mapping between VFE and CSID. Since CSID2 routes nowhere there's no
reason to keep it around.

Second is a fix for a longstanding error in CAMSS which as stemmed from
the original development of post ISPIF devices. These devices have a 1:1
mapping between CSID and VFE so the mapping we have given to user-space
which declares each CSID as connecting to each VFE is just plain wrong on
these devices and has always been.

So the second patch addresses that longstanding issue but, I've been
holding off on fixing this for a while since I believed it might require
extensive surgery, but in the end its quite simple to do.

Finally the third patch is a tidy-up patch which inverts our current logic
of continuously adding new elements to the src_pad_code switch for new SoCs
filtering those SoCs down to a default: statement. In fact is is the old
SoCs which are the exceptional case so, just do the switch for the old and
the default for the new.

To: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
To: Vladimir Zapolskiy <vladimir.zapolskiy@xxxxxxxxxx>
To: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
To: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
To: Hans Verkuil <hverkuil@xxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Bryan O'Donoghue <bod@xxxxxxxxxx>

---
Bryan O'Donoghue (3):
media: qcom: camss: csid: Add and enumerate an id field for CSID entries
media: qcom: camss: csid: Stop using csid->id as both index and identifier
media: qcom: camss: x1e80100: Fix CSID2 routing to nowhere

.../media/platform/qcom/camss/camss-csid-1080.c | 2 +-
drivers/media/platform/qcom/camss/camss-csid-340.c | 6 +-
drivers/media/platform/qcom/camss/camss-csid-680.c | 4 +-
.../media/platform/qcom/camss/camss-csid-gen3.c | 4 +-
drivers/media/platform/qcom/camss/camss-csid.c | 34 +++++---
drivers/media/platform/qcom/camss/camss-csid.h | 18 ++++
drivers/media/platform/qcom/camss/camss-csiphy.c | 2 +-
drivers/media/platform/qcom/camss/camss.c | 98 +++++++++++++++++-----
8 files changed, 126 insertions(+), 42 deletions(-)
---
base-commit: 91ff71dce5e770e7965cb3b09c87f6d334c6c4c5
change-id: 20261122-camss-routing-fixes-b178bdb84f20

Best regards,
--
---
bod