drm/amdgpu: Skip showing available NPS modes

Dynamic memory partition switch is not supported on CPU-GPU xgmi
connected configurations.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lijo Lazar 2026-07-15 14:53:49 +05:30 committed by Alex Deucher
parent fe0f0a175d
commit e60e0ba069

View File

@ -1364,7 +1364,8 @@ int amdgpu_gmc_sysfs_init(struct amdgpu_device *adev)
if (!adev->gmc.gmc_funcs->query_mem_partition_mode)
return 0;
nps_switch_support = (hweight32(adev->gmc.supported_nps_modes &
nps_switch_support = !adev->gmc.xgmi.connected_to_cpu &&
(hweight32(adev->gmc.supported_nps_modes &
AMDGPU_ALL_NPS_MASK) > 1);
if (!nps_switch_support)
dev_attr_current_memory_partition.attr.mode &=