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: v5.16-rc1~140^2~11^2~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=894c6890a23c2a91493c845d05d6ffbb148efa6d;p=thirdparty%2Fkernel%2Flinux.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 48089dc0180b5..ec63496412dba 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);