linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
@ 2024-08-12  7:10 Lu Baolu
  2024-08-12  7:10 ` [PATCH 2/3] drm/rockchip: " Lu Baolu
  2024-08-12  7:10 ` [PATCH 3/3] drm/tegra: Remove call to iommu_domain_alloc() Lu Baolu
  0 siblings, 2 replies; 6+ messages in thread
From: Lu Baolu @ 2024-08-12  7:10 UTC (permalink / raw)
  To: Karol Herbst, Lyude Paul, Danilo Krummrich, David Airlie,
	Daniel Vetter, Thierry Reding, Jonathan Hunter, Sandy Huang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Mikko Perttunen, Joerg Roedel, Will Deacon, Robin Murphy,
	Jason Gunthorpe, Kevin Tian
  Cc: dri-devel, nouveau, linux-tegra, linux-arm-kernel, linux-rockchip,
	linux-media, iommu, linux-kernel, Lu Baolu

In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20240610085555.88197-7-baolu.lu@linux.intel.com
---
 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 87caa4a72921..763c4c2925f9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -120,8 +120,8 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
 	mutex_init(&tdev->iommu.mutex);
 
 	if (device_iommu_mapped(dev)) {
-		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
-		if (!tdev->iommu.domain)
+		tdev->iommu.domain = iommu_paging_domain_alloc(dev);
+		if (IS_ERR(tdev->iommu.domain))
 			goto error;
 
 		/*
-- 
2.34.1



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

end of thread, other threads:[~2024-09-01 12:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12  7:10 [PATCH 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc() Lu Baolu
2024-08-12  7:10 ` [PATCH 2/3] drm/rockchip: " Lu Baolu
2024-08-12  7:52   ` Andy Yan
2024-08-12  7:10 ` [PATCH 3/3] drm/tegra: Remove call to iommu_domain_alloc() Lu Baolu
2024-08-28 15:27   ` Thierry Reding
2024-09-01 12:18     ` Baolu Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).