aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreekant Somasekharan <[email protected]>2024-05-10 00:09:32 -0400
committerAlex Deucher <[email protected]>2024-05-17 17:40:37 -0400
commit0cce5f285d9ae81c33993f3270fe77f5e74a69ab (patch)
treeba1148f187e429bcefc4ae7a6d92ee95c7a7da2e
parentb72fa761fc6be316bbf3ef9af4b7f145a208b1f3 (diff)
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: 628e1ace2379 ("drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC") Signed-off-by: Sreekant Somasekharan <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index 34e751b9b700..00b7aef6bdb0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -524,7 +524,8 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev,
bo_adev = amdgpu_ttm_adev(bo->tbo.bdev);
coherent = bo->flags & AMDGPU_GEM_CREATE_COHERENT;
- is_system = bo->tbo.resource->mem_type == TTM_PL_SYSTEM;
+ is_system = (bo->tbo.resource->mem_type == TTM_PL_TT) ||
+ (bo->tbo.resource->mem_type == AMDGPU_PL_PREEMPT);
/* WA for HW bug */
if (is_system || ((bo_adev != adev) && coherent))