Re: [PATCH v2 04/12] media: iris: Add helper to create a context bank device

Dmitry Baryshkov <[email protected]> Thu, 6 Aug 2026 11:57:53 +0300
Newsgroups org.kernel.vger.linux-media,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <o6s5kezlsbe6z53jbsezeixp2wfrmwmvwda67t6chf57jnbm3x@ta5hktzs7mdf>
On Fri, Jul 31, 2026 at 11:52:19PM +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. A stream can only be confined to its range if it
> has an IOMMU domain of its own, and the IOMMU core attaches a domain per
> struct device, so each stream needs its own device.
> Add iris_create_cb_dev(), which looks up a named child of the iris node
> and registers it as a platform device parented to the iris core. The
> child's fwnode is handed to platform_device_register_full() so the OF
> core applies that subnode's "iommus" property and the new device gets
> its own IOMMU domain. The DMA mask comes from platform data, and the
> segment size and boundary are capped at 32 bits to match the addressing
> the VPU performs.
> Return NULL when the named child is absent, so callers can treat a
> device tree without context bank subnodes as a supported configuration
> rather than an error.
> Backports are intended since the first DTS of 8550 binding schema.

What does this mean in the commit message?

> 
> Fixes: 41661853ae8e ("arm64: dts: qcom: sm8550: add iris DT node")

How can driver fix the DT?

> 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_resources.c | 28 +++++++++++++++++++++++
>  drivers/media/platform/qcom/iris/iris_resources.h |  1 +
>  2 files changed, 29 insertions(+)
> 

-- 
With best wishes
Dmitry