Re: [PATCH v2 03/12] media: iris: Add platform hooks for context bank device setup
From: Dmitry Baryshkov
Date: Thu Aug 06 2026 - 05:00:55 EST
On Fri, Jul 31, 2026 at 11:52:18PM +0530, Vikash Garodia wrote:
> The VPU issues DMA through several SMMU streams, and the hardware does
> not give every stream the same addressable range. The non-pixel stream
> is restricted to use 0-600MB of IOVA space, while the pixel stream can
> address the full range. Keeping each stream inside its own range needs a
> separate IOMMU domain per stream, which in turn needs a separate struct
> device per stream, since the IOMMU core attaches a domain per device.
>
> Which streams exist, and therefore which context bank devices have to be
> created, differs between VPU generations. Add init_cb_devs() and
> deinit_cb_devs() to struct vpu_ops so platform data can supply the right
> setup, and call them from probe and remove. Both hooks are optional, so
> platforms that do not implement them keep the existing behaviour of
> performing DMA through the parent device.
>
> Set the context banks up before v4l2_device_register() so the DMA
> plumbing is in place before any video device is visible to userspace,
> and tear them down on the probe error path and in iris_remove().
>
> No functional change yet, as no platform implements the hooks.
>
> Fixes: 41661853ae8e ("arm64: dts: qcom: sm8550: add iris DT node")
> Cc: stable@xxxxxxxxxxxxxxx
> Co-developed-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Tested-by: Daniel J Blueman <daniel@xxxxxxxxx>
> Signed-off-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_probe.c | 25 +++++++++++++++++++++-
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 ++
> 2 files changed, 26 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry