Override the local MTYPE mappings in KFD SVM code with mtype_local
modprobe param for GFX 12.1.
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>
case IP_VERSION(12, 1, 0):
snoop = true;
if (domain == SVM_RANGE_VRAM_DOMAIN) {
+ mtype_local = amdgpu_mtype_local == 1 ? AMDGPU_VM_MTYPE_NC :
+ AMDGPU_VM_MTYPE_RW;
/* local HBM */
if (bo_node->adev == node->adev)
- mapping_flags |= AMDGPU_VM_MTYPE_RW;
+ mapping_flags |= mtype_local;
/* Remote GPU memory */
else
mapping_flags |= ext_coherent ? AMDGPU_VM_MTYPE_UC :