AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality
@ 2026-04-20 13:37 Philip Yang
  2026-04-20 13:37 ` [PATCH v2 1/2] drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlier Philip Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Philip Yang @ 2026-04-20 13:37 UTC (permalink / raw)
  To: amd-gfx
  Cc: Felix.Kuehling, christian.koenig, Kent.Russell, Andrew.Martin,
	Philip Yang

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(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-27 11:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-20 13:37 [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality Philip Yang
2026-04-20 13:37 ` [PATCH v2 1/2] drm/amdgpu: Move amdgpu_device_check_iommu_direct_map() earlier Philip Yang
2026-04-27 11:19   ` Christian König
2026-04-20 13:37 ` [PATCH v2 2/2] drm/amdgpu: move VM PTE MTYPE override to per-PTE granularity Philip Yang
2026-04-27 11:23   ` Christian König
2026-04-22 18:00 ` [PATCH v2 0/2] drm/amdgpu: per-PTE MTYPE override for NUMA locality Philip Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox