Skip to content

Commit 87fd2b0

Browse files
rmurphy-armLyude
authored andcommitted
drm/nouveau/tegra: Stop using iommu_present()
Even if some IOMMU has registered itself on the platform "bus", that doesn't necessarily mean it provides translation for the device we care about. Replace iommu_present() with a more appropriate check. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Lyude Paul <lyude@redhat.com> [added cc for stable] Signed-off-by: Lyude Paul <lyude@redhat.com> Cc: stable@vger.kernel.org # v5.0+ Link: https://patchwork.freedesktop.org/patch/msgid/70d40ea441da3663c2824d54102b471e9a621f8a.1649168494.git.robin.murphy@arm.com
1 parent b3c9a92 commit 87fd2b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/gpu/drm/nouveau/nvkm/engine/device

drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
123123

124124
mutex_init(&tdev->iommu.mutex);
125125

126-
if (iommu_present(&platform_bus_type)) {
126+
if (device_iommu_mapped(dev)) {
127127
tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
128128
if (!tdev->iommu.domain)
129129
goto error;

0 commit comments

Comments
 (0)