[RFC PATCH 00/11] : media: iris: Migrate iommus to iris sub nodes

From: Vikash Garodia

Date: Thu Jul 09 2026 - 08:44:47 EST


VPU hardwares have a limitation where VPU streams are associated with
dedicated addressable address range, as illustrated below

+-----------------------------------------------------------+
| Stream A reserved region (600 MB) |
| 0x00000000 - 0x25800000 |
+-----------------------------------------------------------+
| Stream B reserved region (3.5 GB) |
| 0x00000000 - 0xe0000000 |
+-----------------------------------------------------------+
| Other reserved regions |
+-----------------------------------------------------------+

Mapping a stream outside its expected range can cause unintended
behavior, including device crashes, as reported at:
https://gitlab.freedesktop.org/drm/msm/-/work_items/100

Daniel, who reported the crash issue, have also raised a patch to workaround
the issue. While the patch partially handles the limitation, it is inefficient
in a way that it keep iris hardwares away from using the 600MB address space
for all the different streams.

To address this limitation, the subset of stream/s are now represented as
sub nodes, so that they can be associated to the respective addressable
range.
In the past, this limitation was tried with iommu-map approach, with iris
driver dynamically creating the devices. The approach was later concluded
as an hack to avoid having sub nodes. It was discussed in detail in the
discussion https://lore.kernel.org/all/c7b956a9-d3e8-4e18-b780-5d08f5cd2ca1@xxxxxxxxxx/

It was agreed by maintainers to proceed with sub node approach to address
the VPU hardware limitation.

Sending this series as an RFC as i am unsure on handling of address
and size cells. While parsing the iommu-addresses, device parent should
have the address and size cell, thereby added the same in parent node
i.e iris in this case. Kernel mandates this, otherwise emits below.
Keeping them in iris (parent device) meets the kernel ask.

[ 6.953615] Missing '#address-cells' in /soc@0/video-codec@aa00000
[ 6.968288] WARNING: drivers/of/base.c:115 at of_bus_n_addr_cells+0xa4/0xf4

[ 7.440909] Missing '#size-cells' in /soc@0/video-codec@aa00000
[ 7.447044] WARNING: drivers/of/base.c:142 at of_bus_n_size_cells+0xa4/0xf8

Signed-off-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
---
Vikash Garodia (11):
dt-bindings: media: qcom,sm8550-iris: Add vpu sub nodes
media: iris: Add hooks to initialize and tear down context banks
media: iris: Add helper to create a context bank device
media: iris: Add helper to select relevant context bank device
media: iris: Skip DMA mask setting to core device when IOMMU is not mapped
media: iris: Add hooks for pixel and non-pixel context banks
arm64: dts: qcom: hamoa: Move Iris IOMMUs to sub nodes
arm64: dts: qcom: sm8550: Move Iris IOMMUs to child nodes
arm64: dts: qcom: lemans: Move Iris IOMMUs to child nodes
arm64: dts: qcom: monaco: Move Iris IOMMUs to child nodes
arm64: dts: qcom: sm8650: Move Iris IOMMUs to child nodes

.../bindings/media/qcom,sm8550-iris.yaml | 66 +++++++++++++++++++-
arch/arm64/boot/dts/qcom/hamoa.dtsi | 18 +++++-
arch/arm64/boot/dts/qcom/lemans.dtsi | 18 +++++-
arch/arm64/boot/dts/qcom/monaco.dtsi | 18 +++++-
arch/arm64/boot/dts/qcom/qcs8550.dtsi | 4 ++
arch/arm64/boot/dts/qcom/sm8550.dtsi | 18 +++++-
arch/arm64/boot/dts/qcom/sm8650.dtsi | 19 +++++-
drivers/media/platform/qcom/iris/Makefile | 1 +
drivers/media/platform/qcom/iris/iris_buffer.c | 8 +--
drivers/media/platform/qcom/iris/iris_core.h | 4 ++
drivers/media/platform/qcom/iris/iris_hfi_queue.c | 16 ++---
.../platform/qcom/iris/iris_platform_common.h | 6 ++
.../platform/qcom/iris/iris_platform_sm8550.c | 71 ++++++++++++++++++++++
.../platform/qcom/iris/iris_platform_sm8550.h | 24 ++------
.../media/platform/qcom/iris/iris_platform_vpu3x.c | 4 ++
drivers/media/platform/qcom/iris/iris_probe.c | 32 ++++++++--
drivers/media/platform/qcom/iris/iris_resources.c | 64 +++++++++++++++++++
drivers/media/platform/qcom/iris/iris_resources.h | 2 +
drivers/media/platform/qcom/iris/iris_vidc.c | 4 +-
19 files changed, 346 insertions(+), 51 deletions(-)
---
base-commit: b9810cd75b9fb56a3425d391cba3f608502bd474
change-id: 20260701-vpu_iommu_iova_handling-556e969a1f1c

Best regards,
--
Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>