Skip to content

Commit 45c690a

Browse files
LuBaoluLyude
authored andcommitted
drm/tegra: Use iommu_paging_domain_alloc()
Commit <17de3f5fdd35> ("iommu: Retire bus ops") removes iommu ops from the bus structure. The iommu subsystem no longer relies on bus for operations. So iommu_domain_alloc() interface is no longer relevant. Replace iommu_domain_alloc() with iommu_paging_domain_alloc() which takes the physical device from which the host1x_device virtual device was instantiated. This physical device is a common parent to all physical devices that are part of the virtual device. Suggested-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240902014700.66095-4-baolu.lu@linux.intel.com
1 parent d8c07be commit 45c690a

File tree

1 file changed

+3
-2
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+3
-2
lines changed

drivers/gpu/drm/tegra/drm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,7 @@ static bool host1x_drm_wants_iommu(struct host1x_device *dev)
11351135

11361136
static int host1x_drm_probe(struct host1x_device *dev)
11371137
{
1138+
struct device *dma_dev = dev->dev.parent;
11381139
struct tegra_drm *tegra;
11391140
struct drm_device *drm;
11401141
int err;
@@ -1149,8 +1150,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
11491150
goto put;
11501151
}
11511152

1152-
if (host1x_drm_wants_iommu(dev) && iommu_present(&platform_bus_type)) {
1153-
tegra->domain = iommu_domain_alloc(&platform_bus_type);
1153+
if (host1x_drm_wants_iommu(dev) && device_iommu_mapped(dma_dev)) {
1154+
tegra->domain = iommu_paging_domain_alloc(dma_dev);
11541155
if (!tegra->domain) {
11551156
err = -ENOMEM;
11561157
goto free;

0 commit comments

Comments
 (0)