[PATCH 7/7] drm/amdgpu: Skip showing available NPS modes
Alex Deucher <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
From: Lijo Lazar <[email protected]> Dynamic memory partition switch is not supported on CPU-GPU xgmi connected configurations. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index ea0228129d5a1..7c05545063346 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -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 &= -- 2.55.0