public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] gpu: host1x: Use iommu_paging_domain_alloc()
@ 2024-08-12  7:16 Lu Baolu
  2024-08-28 15:12 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Lu Baolu @ 2024-08-12  7:16 UTC (permalink / raw)
  To: Thierry Reding, Mikko Perttunen, David Airlie, Daniel Vetter,
	Joerg Roedel, Will Deacon, Robin Murphy, Jason Gunthorpe,
	Kevin Tian
  Cc: dri-devel, linux-tegra, iommu, linux-kernel, Lu Baolu,
	Jason Gunthorpe

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
---
 drivers/gpu/host1x/dev.c | 7 ++++---
 1 file 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;
 		}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] gpu: host1x: Use iommu_paging_domain_alloc()
  2024-08-12  7:16 [PATCH 1/1] gpu: host1x: Use iommu_paging_domain_alloc() Lu Baolu
@ 2024-08-28 15:12 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2024-08-28 15:12 UTC (permalink / raw)
  To: Lu Baolu
  Cc: Mikko Perttunen, David Airlie, Daniel Vetter, Joerg Roedel,
	Will Deacon, Robin Murphy, Jason Gunthorpe, Kevin Tian, dri-devel,
	linux-tegra, iommu, linux-kernel, Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

On Mon, Aug 12, 2024 at 03:16:05PM GMT, Lu Baolu wrote:
> 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
> ---
>  drivers/gpu/host1x/dev.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-28 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12  7:16 [PATCH 1/1] gpu: host1x: Use iommu_paging_domain_alloc() Lu Baolu
2024-08-28 15:12 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox