Commit 1ded9071 authored by Mukul Joshi's avatar Mukul Joshi Committed by Alex Deucher
Browse files

drm/amdkfd: Override KFD SVM mappings for GFX 12.1



Override the local MTYPE mappings in KFD SVM code with mtype_local
modprobe param for GFX 12.1.

Signed-off-by: default avatarMukul Joshi <mukul.joshi@amd.com>
Reviewed-by: default avatarAlex Sierra <alex.sierra@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 005b7f7f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1309,9 +1309,11 @@ svm_range_get_pte_flags(struct kfd_node *node, struct amdgpu_vm *vm,
	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 :