Skip to content

Commit 5183e69

Browse files
amd-yahuilalexdeucher
authored andcommitted
drm/amdgpu: Remove extra checks for CPX
As far as the number of XCCs, the number of compute partitions, and the number of memory partitions qualify, CPX is valid. Signed-off-by: Amber Lin <Amber.Lin@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent fe652be commit 5183e69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,11 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr,
559559
adev->gmc.num_mem_partitions == 4) &&
560560
(num_xccs_per_xcp >= 2);
561561
case AMDGPU_CPX_PARTITION_MODE:
562+
/* (num_xcc > 1) because 1 XCC is considered SPX, not CPX.
563+
* (num_xcc % adev->gmc.num_mem_partitions) == 0 because
564+
* num_compute_partitions can't be less than num_mem_partitions
565+
*/
562566
return ((num_xcc > 1) &&
563-
(adev->gmc.num_mem_partitions == 1 || adev->gmc.num_mem_partitions == 4) &&
564567
(num_xcc % adev->gmc.num_mem_partitions) == 0);
565568
default:
566569
return false;

0 commit comments

Comments
 (0)