]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Clear all DMA mappings on demand
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 27 Aug 2021 20:39:08 +0000 (16:39 -0400)
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 1 Sep 2021 13:15:01 +0000 (09:15 -0400)
commit092e14d6f07a304106e1b1114a0eaa90f7919dfb
tree4883749fa9c348a8fe02a47d414ad77d7660a7a0
parent24cbc8d5ec9a776208b902ae47375dc51dc1d9c6
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
drivers/gpu/drm/ttm/ttm_device.c
include/drm/ttm/ttm_device.h