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):
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;
}
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);
}