From: Shane Xiao <shane.xiao@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <felix.kuehling@amd.com>,
<sreekant.somasekharan@amd.com>
Cc: Aaron Liu <aaron.liu@amd.com>, Shane Xiao <shane.xiao@amd.com>,
longlyao <Longlong.Yao@amd.com>
Subject: [PATCH] drm/amdkfd: Correct the GFX12 memory type setting
Date: Fri, 17 May 2024 15:00:11 +0800 [thread overview]
Message-ID: <20240517070011.2253488-1-shane.xiao@amd.com> (raw)
This patch fixes the GFX12 memory type to NC. Since
the Memory type can be overwritten by the previous
operations, the GFX12 MTYPE bits need to be clear
before setting to NC.
Signed-off-by: longlyao <Longlong.Yao@amd.com>
Signed-off-by: Shane Xiao <shane.xiao@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index e2c6ec3cc4f3..6246d1dc0d30 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -534,7 +534,8 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev,
/* WA for HW bug */
if (is_system || ((bo_adev != adev) && coherent))
- *flags |= AMDGPU_PTE_MTYPE_GFX12(MTYPE_NC);
+ *flags |= (*flags & ~AMDGPU_PTE_MTYPE_GFX12_MASK) |
+ AMDGPU_PTE_MTYPE_GFX12(MTYPE_NC);
}
--
2.25.1
next reply other threads:[~2024-05-17 7:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 7:00 Shane Xiao [this message]
2024-05-17 15:51 ` [PATCH] drm/amdkfd: Correct the GFX12 memory type setting Alex Deucher
2024-05-17 15:52 ` Alex Deucher
2024-05-20 8:21 ` Xiao, Shane
2024-05-20 8:33 ` Xiao, Shane
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=20240517070011.2253488-1-shane.xiao@amd.com \
--to=shane.xiao@amd.com \
--cc=Longlong.Yao@amd.com \
--cc=aaron.liu@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=sreekant.somasekharan@amd.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).