Skip to content

Commit 0cce5f2

Browse files
Sreekant Somasekharanalexdeucher
authored andcommitted
drm/amdkfd: Check correct memory types for is_system variable
To catch GPU mapping of system memory, TTM_PL_TT and AMDGPU_PL_PREEMPT must be checked. Fixes: 628e1ac ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC") Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b72fa76 commit 0cce5f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev,
524524

525525
bo_adev = amdgpu_ttm_adev(bo->tbo.bdev);
526526
coherent = bo->flags & AMDGPU_GEM_CREATE_COHERENT;
527-
is_system = bo->tbo.resource->mem_type == TTM_PL_SYSTEM;
527+
is_system = (bo->tbo.resource->mem_type == TTM_PL_TT) ||
528+
(bo->tbo.resource->mem_type == AMDGPU_PL_PREEMPT);
528529

529530
/* WA for HW bug */
530531
if (is_system || ((bo_adev != adev) && coherent))

0 commit comments

Comments
 (0)