Re: [PATCH v2 03/12] media: iris: Add platform hooks for context bank device setup

Dmitry Baryshkov <[email protected]>
Newsgroups org.kernel.vger.stable,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media
Message-ID <7txz4r6p3hxxbgtbipeva7lftia3oebnwbv5my3pjyibjq74eq@3b2hrzg5xlj6>
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: [email protected]
> Co-developed-by: Vishnu Reddy <[email protected]>
> Signed-off-by: Vishnu Reddy <[email protected]>
> Tested-by: Daniel J Blueman <[email protected]>
> Signed-off-by: Vikash Garodia <[email protected]>
> ---
>  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 <[email protected]>


-- 
With best wishes
Dmitry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.