diff options
| author | Mukul Joshi <mukul.joshi@amd.com> | 2025-08-14 22:23:16 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-01-06 00:59:55 +0300 |
| commit | 2d70a10dd16a5baa3e977c12311d9d8aa2d13819 (patch) | |
| tree | 223bf56ce38b9b91424c6fb12f1775cbbf64bf28 | |
| parent | 80be8286d098dc92cc48ab2d0f459dbb5cfde055 (diff) | |
| download | linux-2d70a10dd16a5baa3e977c12311d9d8aa2d13819.tar.xz | |
drm/amdgpu: Always set PTE.B for device memory on GFX 12.1
On GFX 12.1, we need to set the atomics bit (PTE.B) always for
device memory.
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c index 695f3cf05b6f..bef28aedfb93 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c @@ -496,7 +496,7 @@ static void gmc_v12_1_get_coherence_flags(struct amdgpu_device *adev, bool uncached = bo->flags & AMDGPU_GEM_CREATE_UNCACHED; unsigned int mtype, mtype_local; bool snoop = false; - bool is_local; + bool is_local = false; switch (gc_ip_version) { case IP_VERSION(12, 1, 0): @@ -533,6 +533,9 @@ static void gmc_v12_1_get_coherence_flags(struct amdgpu_device *adev, if (mtype != MTYPE_NC) *flags = AMDGPU_PTE_MTYPE_GFX12(*flags, mtype); + if (is_local || adev->have_atomics_support) + *flags |= AMDGPU_PTE_BUS_ATOMICS; + *flags |= snoop ? AMDGPU_PTE_SNOOPED : 0; } @@ -577,9 +580,6 @@ static void gmc_v12_1_get_vm_pte(struct amdgpu_device *adev, AMDGPU_GEM_CREATE_UNCACHED)) *flags = AMDGPU_PTE_MTYPE_NV10(*flags, MTYPE_UC); - if (adev->have_atomics_support) - *flags |= AMDGPU_PTE_BUS_ATOMICS; - if ((*flags & AMDGPU_PTE_VALID) && bo) gmc_v12_1_get_coherence_flags(adev, bo, flags); } |
