Similar to what is already done in arm-smmu-qcom, match display and GPU compatible strings to pick identity domain type for them.
So far, we have an "evil twin" domain kicking around after drm/msm attaches it's own domain. Until now, that has been relatively harmless. But it becomes a problem with [1] when we start using sg_dma_len()/ sg_dma_address() for setting up mappings. Which is required to avoid problems with CONFIG_DMABUF_DEBUG (dma_buf_wrap_sg_table()). The first patch is at least compile tested.. msm_iommu seems to be armv7-only. If there are devices with bootloader splash, we may also need some work on qcom_iommu_identity_attach() and/or msm_iommu_identity_attach() to put the context bank into bypass instead of disabling it? Not sure, but that is probably going to require someone with such hardware at hand. [1] https://patchwork.freedesktop.org/series/175619/ Rob Clark (2): iommu/qcom: Use identity domain for GPU and display iommu/msm: Use identity domain for GPU and display drivers/iommu/arm/arm-smmu/qcom_iommu.c | 18 ++++++++++++++++++ drivers/iommu/msm_iommu.c | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) -- 2.56.0
