Re: [PATCH 3/3] drm/msm: detach the ARM DMA mapping before attaching our own domain

From: Konrad Dybcio

Date: Thu Jul 30 2026 - 09:47:33 EST


On 7/30/26 3:29 PM, Dmitry Baryshkov wrote:
> On ARM32 with CONFIG_ARM_DMA_USE_IOMMU, arch_setup_dma_ops() creates a
> dma_iommu_mapping for every IOMMU-backed device and attaches its domain
> to the device's IOMMU group. That domain is neither the group's default
> nor its blocking domain, so when msm_iommu_new() later attaches the
> domain the driver manages itself, __iommu_attach_group() refuses it:

[...]

> +#if defined(CONFIG_ARM_DMA_USE_IOMMU)
> +#include <asm/dma-iommu.h>
> +#else
> +#define arm_iommu_detach_device(...) ({ })
> +#define arm_iommu_release_mapping(...) ({ })
> +#define to_dma_iommu_mapping(dev) NULL
> +#endif

I see this is prior art, but should we support this config being off?

Konrad