[PATCH] drm/amdkfd: Correct the GFX12 memory type setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Signed-off-by: Shane Xiao <shane.xiao@xxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux