[PATCH v2 0/4] media: qcom: camss: contiguous buffers, RDI and CSID1 streaming fixes
From: Allan Siriani
Date: Mon Nov 09 2026 - 06:30:58 EST
These fixes came out of bringing up the CAMSS on MSM8226 (Moto G 2013,
"falcon", MT9M114 front and AR0543 rear cameras on RDI). The MSM8226 has
an IOMMU in front of the CAMSS, but it is not described in the upstream
DT yet, so the CAMSS runs without one there today. The MSM8226 support
itself will be sent separately; the problems fixed here are generic.
1. Loic's patch: the write masters take one base address per plane, so
switch the queue to vb2_dma_contig for every SoC instead of reading
the first entry of a vb2_dma_sg scatterlist. Without an IOMMU the
frame was written over unrelated memory (on a 1280x960 RAW10 capture
only the first 656 lines landed in the buffer and the device rebooted
within a few frames).
2. In frame based (RDI) mode the VFE 4.1 write master buffer size is
never programmed. Program WR_BUFFER_CFG as the downstream driver does.
3. video_stop_streaming() bails out on -ENOIOCTLCMD from a subdev
without .s_stream() (e.g. the MT9M114 pixel array), leaving the
pipeline started and the buffers with the driver: vb2 WARNs and the
next STREAMON / "media-ctl -r" fail with -EBUSY.
4. csid_set_power() powers up the VFE of the same index as the CSID,
and fails with -EINVAL when there is none. On MSM8916/MSM8226 (two
CSIDs, one VFE behind the ISPIF) streaming from CSID1 fails with
"Failed to power up pipeline: -22". Skip the VFE power up there.
Build tested (W=1, LLVM, ARM) on next-20261105, each patch on its own.
Runtime tested on the MSM8226 with the same four patches applied to a
6.16 based kernel, not yet on linux-next: both sensors capture, and
STREAMOFF/STREAMON and "media-ctl -r" work repeatedly. Known remaining
issue: on the front MT9M114 (UYVY) the first frame after STREAMON can
still run 128 bytes (one burst) past sizeimage; later frames are exact.
Patch 2 does not cover that case yet.
Changes in v2:
- Patch 1 replaced by Loic's "media: qcom: camss: Use contiguous DMA
buffers" (vb2_dma_contig unconditionally, no contiguity check), with
his Signed-off-by moved above the "---" and Bryan's Reviewed-by.
If it is picked up separately, patches 2-4 apply on top of it.
- Reworded the IOMMU statements: MSM8226 has an IOMMU, upstream does
not describe it (Konrad).
- Patch 3: added Fixes: tag and Bryan's Reviewed-by.
- Rebased on next-20261105.
v1: https://lore.kernel.org/all/20261104202313.72494-1-allan@xxxxxxxxxxxxxxxxxxx/
Allan Siriani (3):
media: qcom: camss: vfe-4-1: program the RDI write master buffer size
media: qcom: camss: always stop the pipeline in stop_streaming
media: qcom: camss: do not fail CSID power up without a matching VFE
Loic Poulain (1):
media: qcom: camss: Use contiguous DMA buffers
drivers/media/platform/qcom/camss/Kconfig | 2 +-
.../media/platform/qcom/camss/camss-vfe-4-1.c | 34 ++++++++++++++++---
.../media/platform/qcom/camss/camss-vfe-4-7.c | 3 +-
.../media/platform/qcom/camss/camss-vfe-4-8.c | 3 +-
.../platform/qcom/camss/camss-vfe-gen1.c | 5 +--
.../platform/qcom/camss/camss-vfe-gen1.h | 3 +-
.../media/platform/qcom/camss/camss-video.c | 28 +++++++--------
drivers/media/platform/qcom/camss/camss.c | 17 +++++-----
8 files changed, 62 insertions(+), 33 deletions(-)
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
--
2.43.0