> > How about this: > > > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > > index be2ad7203d7b96..090b1fc97a7309 100644 > > --- a/drivers/gpu/host1x/dev.c > > +++ b/drivers/gpu/host1x/dev.c > > @@ -361,6 +361,10 @@ static bool host1x_wants_iommu(struct host1x *host1x) > > return true; > > } > > +/* > > + * Returns ERR_PTR on failure, NULL if the translation is IDENTITY, otherwise a > > + * valid paging domain. > > + */ > > static struct iommu_domain *host1x_iommu_attach(struct host1x *host) > > { > > struct iommu_domain *domain = iommu_get_domain_for_dev(host->dev); > > @@ -385,6 +389,8 @@ static struct iommu_domain *host1x_iommu_attach(struct host1x *host) > > * Similarly, if host1x is already attached to an IOMMU (via the DMA > > * API), don't try to attach again. > > */ > > + if (domain && domain->type == IOMMU_DOMAIN_IDENTITY) > > + domain = NULL; > > if (!host1x_wants_iommu(host) || domain) > > return domain; > > > > (if not can you investigate this function's flow compared to a good > > kernel?) > > Yes, this worked! Does this mean that with this change we go through the > path of using the shared Tegra domain (for example in the driver I > attached client->group == true), and if that is the case would it be > beneficial for us to try and change tegra_smmu_def_domain_type() from > returning IOMMU_DOMAIN_IDENTITY into IOMMU_DOMAIN_DMA so that the > dma_alloc_* functions are called directly? I do not know the answer those questions.. The whole rational around this host 1x domain stuff is mysterious to me. It does sound quite appealing for the implementation to use the dma api instead of attaching its own special domain. Jason