summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_device.h
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2021-08-27 22:39:08 +0200
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>2021-09-01 15:15:01 +0200
commitc97f082c135210da06a82c373fb660f8bfd57d95 (patch)
tree4883749fa9c348a8fe02a47d414ad77d7660a7a0 /include/drm/ttm/ttm_device.h
parentdrm/sun4i: Fix macros in sun8i_csc.h (diff)
downloadlinux-c97f082c135210da06a82c373fb660f8bfd57d95.tar.xz
linux-c97f082c135210da06a82c373fb660f8bfd57d95.zip
drm/ttm: Clear all DMA mappings on demand
Used by drivers supporting hot unplug to handle all DMA IOMMU group related dependencies before the group is removed during device removal and we try to access it after free when last device pointer from user space is dropped. v3: Switch to ttm_bo_get_unless_zerom Iterate bdev for pinned list Switch to ttm_tt_unpopulate Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210827203910.5565-3-andrey.grodzovsky@amd.com
Diffstat (limited to 'include/drm/ttm/ttm_device.h')
-rw-r--r--include/drm/ttm/ttm_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_device.h b/include/drm/ttm/ttm_device.h
index 03fb44d061e0..07d722950d5b 100644
--- a/include/drm/ttm/ttm_device.h
+++ b/include/drm/ttm/ttm_device.h
@@ -299,5 +299,6 @@ int ttm_device_init(struct ttm_device *bdev, struct ttm_device_funcs *funcs,
struct drm_vma_offset_manager *vma_manager,
bool use_dma_alloc, bool use_dma32);
void ttm_device_fini(struct ttm_device *bdev);
+void ttm_device_clear_dma_mappings(struct ttm_device *bdev);
#endif