[PATCH v2] drm/amdkfd: Check correct memory types for is_system variable
Sreekant Somasekharan
sreekant.somasekharan at amd.com
Fri May 10 14:06:11 UTC 2024
To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT
must be checked.
'Fixes: 3b01ca1b860d ("drm/amdkfd: mark GFX12 system and peer
GPU memory mappings as MTYPE_NC")'
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan at 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 df0363ad1a51..6eb370609d01 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -495,7 +495,8 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev,
struct amdgpu_bo *bo = mapping->bo_va->base.bo;
struct amdgpu_device *bo_adev = amdgpu_ttm_adev(bo->tbo.bdev);
bool coherent = bo->flags & AMDGPU_GEM_CREATE_COHERENT;
- bool is_system = bo->tbo.resource->mem_type == TTM_PL_SYSTEM;
+ bool is_system = (bo->tbo.resource->mem_type == TTM_PL_TT) ||
+ (bo->tbo.resource->mem_type == AMDGPU_PL_PREEMPT);
*flags &= ~AMDGPU_PTE_EXECUTABLE;
--
2.34.1
More information about the amd-gfx
mailing list