Skip to content

Commit 9719c7b

Browse files
LuBaoluthierryreding
authored andcommitted
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
1 parent 4c27ac4 commit 9719c7b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/gpu/host1x/dev.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,10 @@ static struct iommu_domain *host1x_iommu_attach(struct host1x *host)
404404
if (err < 0)
405405
goto put_group;
406406

407-
host->domain = iommu_domain_alloc(&platform_bus_type);
408-
if (!host->domain) {
409-
err = -ENOMEM;
407+
host->domain = iommu_paging_domain_alloc(host->dev);
408+
if (IS_ERR(host->domain)) {
409+
err = PTR_ERR(host->domain);
410+
host->domain = NULL;
410411
goto put_cache;
411412
}
412413

0 commit comments

Comments
 (0)