From: Andrey Grodzovsky Date: Tue, 24 Aug 2021 20:15:48 +0000 (-0400) Subject: drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case X-Git-Tag: block-5.16-2021-11-13~77^2~11^2~134 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=894c6890a23c2a91493c845d05d6ffbb148efa6d;p=linux-block.git 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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);