Skip to contentSkip to conversation

gpu: host1x: Use iommu_paging_domain_alloc()

PATCH Applied Lu Baolu 2 participants 2 messages Aug 12, 2024 – Aug 28, 2024

Subsystems (3)
lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/host1x/dev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/host1x/dev.c +4 -3
index f006bc931324..b62e4f0e8130 100644
@@ -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;
 		}
 
Signature · 1 line
2.34.1