AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit
@ 2021-09-17  0:50 Philip Yang
  2021-09-17  0:50 ` [PATCH 2/2] drm/amdkfd: fix dma mapping leaking warning Philip Yang
  2021-09-17  6:23 ` [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Philip Yang @ 2021-09-17  0:50 UTC (permalink / raw)
  To: amd-gfx; +Cc: Philip Yang

Before adding the PTE flags, explicitly mask out invalid address bits.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index a1ddf74bbdba..b40c15c9fc81 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1445,6 +1445,8 @@ static void amdgpu_vm_update_flags(struct amdgpu_vm_update_params *params,
 				   uint64_t flags)
 
 {
+	addr &= 0x0000FFFFFFFFF000UL;
+
 	if (level != AMDGPU_VM_PTB) {
 		flags |= AMDGPU_PDE_PTE;
 		amdgpu_gmc_get_vm_pde(params->adev, level, &addr, &flags);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-17  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-17  0:50 [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit Philip Yang
2021-09-17  0:50 ` [PATCH 2/2] drm/amdkfd: fix dma mapping leaking warning Philip Yang
2021-09-17  6:23 ` [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox