Commit 9719c7b8 authored by Lu Baolu's avatar Lu Baolu Committed by Thierry Reding
Browse files

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: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240610085555.88197-8-baolu.lu@linux.intel.com


Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812071605.9513-1-baolu.lu@linux.intel.com
parent 4c27ac45
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
		}