summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2021-08-24 23:15:48 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-09-30 00:30:00 +0300
commit894c6890a23c2a91493c845d05d6ffbb148efa6d (patch)
tree7869ed96673123d1c6a78bdc6059538388d7db2e /drivers/gpu/drm/amd
parent5039f5298880f7a1665d13a24a342d2934d5aa61 (diff)
downloadlinux-894c6890a23c2a91493c845d05d6ffbb148efa6d.tar.xz
drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case
Handle all DMA IOMMU group related dependencies before the group is removed and we try to access it after free. v2: Move the actul handling function to TTM 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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 48089dc0180b..ec63496412db 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3872,6 +3872,8 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
amdgpu_device_ip_fini_early(adev);
+ ttm_device_clear_dma_mappings(&adev->mman.bdev);
+
amdgpu_gart_dummy_page_fini(adev);
amdgpu_device_unmap_mmio(adev);