]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/nouveau/tegra: Use iommu_paging_domain_alloc()
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 9 Oct 2024 04:11:46 +0000 (12:11 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 29 Oct 2024 09:03:42 +0000 (10:03 +0100)
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>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20241009041147.28391-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c

index d1c294f006650b6e9842ccd15f1ed1f7044bb019..78a83f904bbd719b2f4cfad3d7e8afe98c7c5657 100644 (file)
@@ -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;
 
                /*