drm/amdgpu: Fix DPX valid mode check on GC 9.4.3
authorLijo Lazar <lijo.lazar@amd.com>
Mon, 4 Nov 2024 05:06:13 +0000 (10:36 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Nov 2024 15:34:06 +0000 (10:34 -0500)
For DPX mode, the number of memory partitions supported should be less
than or equal to 2.

Fixes: 1589c82a1085 ("drm/amdgpu: Check memory ranges for valid xcp mode")
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>
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c

index fccccea..e157d6d 100644 (file)
@@ -548,7 +548,7 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr,
        case AMDGPU_SPX_PARTITION_MODE:
                return adev->gmc.num_mem_partitions == 1 && num_xcc > 0;
        case AMDGPU_DPX_PARTITION_MODE:
-               return adev->gmc.num_mem_partitions != 8 && (num_xcc % 4) == 0;
+               return adev->gmc.num_mem_partitions <= 2 && (num_xcc % 4) == 0;
        case AMDGPU_TPX_PARTITION_MODE:
                return (adev->gmc.num_mem_partitions == 1 ||
                        adev->gmc.num_mem_partitions == 3) &&