This series refactors the NUMA-aware MTYPE override for VM page table entries on GFX 9.4.3 APUs (MI300A). Previously, the override was applied once per contiguous range in the centralized amdgpu_vm_pte_update_flags(), which missed scattered pages (pages_addr path) that could span multiple NUMA nodes. Patch 1 moves amdgpu_device_check_iommu_direct_map() earlier in device init so that ram_is_direct_mapped is available when gmc_funcs are configured during IP early init. Patch 2 moves the MTYPE override into the individual CPU and SDMA update backends at per-PTE granularity, enabling correct NUMA-local MTYPE selection for scattered pages. It also hoists the eligibility checks (APU type, IP version, direct-mapped RAM, multi-NUMA) from runtime to init time via a new gmc.override_pte flag, avoiding repeated checks on every PTE update. Philip Yang (2): drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlier drm/amdgpu: move VM PTE MTYPE override to per-PTE granularity drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 11 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 9 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 11 ++++++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 35 +++++++++------------ 8 files changed, 44 insertions(+), 37 deletions(-)