Re: [PATCH v3 2/4] media: qcom: camss: vfe-4-1: program the RDI write master buffer size
From: Bryan O'Donoghue
Date: Wed Nov 11 2026 - 09:39:22 EST
On 11/11/2026 13:53, Allan Siriani wrote:
The RDI outputs use the write masters in frame based mode. In that mode
vfe_wm_frame_based() only sets the FRM_BASED bit of WR_CFG and leaves
WR_BUFFER_CFG and WR_IMAGE_SIZE untouched: they keep their reset value or
whatever a previous line based (PIX) stream left there, so nothing tells
the write master how big the buffer is. If the sensor sends more data
than the configured format, the write master keeps writing past the end
of the V4L2 buffer. When the CAMSS runs without an IOMMU, as on
MSM8226 today (the SoC has one, but it is not described in the upstream
DT; its VFE 4.0 shares this register layout), that corrupts unrelated
memory.
This is a long and rambling problem description that looks like LLMese to me.
I would appreciate a more direct and succinct problem description.
"MSM8226 doesn't have an IOMMU defined. If a sensor writes more data than WR_BUFER_CFG and/or WR_IMW_SIZE expect we will get an overrun."
"Program WM_IMAGE_SIZE and WR_BUFFER_CFG to restrict the maximum size the write masters can write"
Program WR_BUFFER_CFG in frame based mode as the downstream VFE 4.0/4.1
driver does (msm_vfe40_axi_cfg_wm_reg(): words per line, lines minus one
and burst length, IMAGE_SIZE unused), from the bytesperline and height
of the active format, and clear it again when the write master is
released.
Pass the active format to the wm_frame_based() op for that. The VFE 4.7
and 4.8 implementations, which use a different register layout, are left
unchanged.
Fixes: 4c98a5f57f90 ("media: camss: Add VFE files")
Signed-off-by: Allan Siriani<allan@xxxxxxxxxxxxxxxxxxx>
---
Something like that. Please don't let the LLM write it for you - the word-salad is difficult to take in.
Commit logs should be elucidative not occluding in nature.
---
bod