]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/ttm: Clear all DMA mappings on demand
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Thu, 26 Aug 2021 17:09:13 +0000 (13:09 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Sep 2021 20:55:11 +0000 (16:55 -0400)
commit8717afdee42e9cf7398e0e6df9d52d17797c452d
tree8254241c8aea1b8570ba48d6b681f71d11ef5f3d
parent199b9af21a4258c3a5345f7382bdd2f1cae265ae
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_device.c
include/drm/ttm/ttm_device.h