From: Felix Kuehling <felix.kuehling@amd.com>
To: Graham Sider <Graham.Sider@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amdgpu: add print for iommu translation mode
Date: Mon, 20 Mar 2023 12:16:02 -0400 [thread overview]
Message-ID: <a25a9826-9778-73f8-dcb7-1c15e64782a3@amd.com> (raw)
In-Reply-To: <20230320140858.1420216-1-Graham.Sider@amd.com>
On 2023-03-20 10:08, Graham Sider wrote:
> Add log to display whether RAM is direct vs DMA mapped.
>
> Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3bd6c5aef796..83774824694b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3528,8 +3528,12 @@ static void amdgpu_device_check_iommu_direct_map(struct amdgpu_device *adev)
> struct iommu_domain *domain;
>
> domain = iommu_get_domain_for_dev(adev->dev);
> - if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY)
> + if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY) {
> + dev_info(adev->dev, "RAM is direct mapped to GPU (not translated by IOMMU)\n");
> adev->ram_is_direct_mapped = true;
> + } else {
> + dev_info(adev->dev, "RAM is DMA mapped to GPU (translated by IOMMU)\n");
> + }
> }
>
> static const struct attribute *amdgpu_dev_attributes[] = {
next prev parent reply other threads:[~2023-03-20 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 14:08 [PATCH v2] drm/amdgpu: add print for iommu translation mode Graham Sider
2023-03-20 16:16 ` Felix Kuehling [this message]
2023-04-04 16:07 ` Sider, Graham
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=a25a9826-9778-73f8-dcb7-1c15e64782a3@amd.com \
--to=felix.kuehling@amd.com \
--cc=Graham.Sider@amd.com \
--cc=amd-gfx@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).