From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>
Cc: <ckoenig.leichtzumerken@gmail.com>,
Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Subject: [PATCH v3 3/4] drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case
Date: Fri, 27 Aug 2021 16:39:09 -0400 [thread overview]
Message-ID: <20210827203910.5565-4-andrey.grodzovsky@amd.com> (raw)
In-Reply-To: <20210827203910.5565-1-andrey.grodzovsky@amd.com>
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>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0b5764aa98a4..653bd8fdaa33 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3860,6 +3860,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);
--
2.25.1
next prev parent reply other threads:[~2021-08-27 20:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 20:39 [PATCH v3 0/4] Various fixes to pass libdrm hotunplug tests Andrey Grodzovsky
2021-08-27 20:39 ` [PATCH v3 1/4] drm/ttm: Create pinned list Andrey Grodzovsky
2021-08-30 8:58 ` Christian König
2021-08-30 14:16 ` Andrey Grodzovsky
2021-08-30 16:51 ` Christian König
2021-08-30 17:02 ` Andrey Grodzovsky
2021-08-30 17:05 ` Christian König
2021-08-30 17:15 ` Andrey Grodzovsky
2021-08-27 20:39 ` [PATCH v3 2/4] drm/ttm: Clear all DMA mappings on demand Andrey Grodzovsky
2021-08-27 20:39 ` Andrey Grodzovsky [this message]
2021-08-27 20:39 ` [PATCH v3 4/4] drm/amdgpu: Add a UAPI flag for hot plug/unplug Andrey Grodzovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210827203910.5565-4-andrey.grodzovsky@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).