diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2024-08-12 15:16:05 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2024-08-28 17:28:48 +0200 |
commit | 9719c7b8f33bc0268cf76656cfb6244f37586066 (patch) | |
tree | eb17d1f6fb0b7a1a379f5a0bc7faf53b7f976fff /drivers/gpu/host1x | |
parent | 4c27ac45e6224ea0ca2d2e5dce64e3df122d27c7 (diff) | |
download | linux-9719c7b8f33bc0268cf76656cfb6244f37586066.tar.gz linux-9719c7b8f33bc0268cf76656cfb6244f37586066.tar.bz2 linux-9719c7b8f33bc0268cf76656cfb6244f37586066.zip |
gpu: host1x: Use iommu_paging_domain_alloc()
An iommu domain is allocated in host1x_iommu_attach() and is attached to
host->dev. Use iommu_paging_domain_alloc() to make it explicit.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240610085555.88197-8-baolu.lu@linux.intel.com
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812071605.9513-1-baolu.lu@linux.intel.com
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/dev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index f006bc931324..b62e4f0e8130 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -404,9 +404,10 @@ static struct iommu_domain *host1x_iommu_attach(struct host1x *host) if (err < 0) goto put_group; - host->domain = iommu_domain_alloc(&platform_bus_type); - if (!host->domain) { - err = -ENOMEM; + host->domain = iommu_paging_domain_alloc(host->dev); + if (IS_ERR(host->domain)) { + err = PTR_ERR(host->domain); + host->domain = NULL; goto put_cache; } |