drm/amdgpu: Remove extra checks for CPX
Subsystems (2)
PATCH 1/1 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.
Change-Id I65696f25e2afd75f2f4a177dabc0991b15293d9a
Signed-off-by Amber Lin <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c +4 -1
@@ -559,8 +559,11 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr, adev->gmc.num_mem_partitions == 4) && (num_xccs_per_xcp >=2 );case AMDGPU_CPX_PARTITION_MODE : +/* (num_xcc > 1) because 1 XCC is considered SPX, not CPX. +* (num_xcc % adev->gmc.num_mem_partitions) == 0 because +* num_compute_partitions can't be less than num_mem_partitions +*/ return ((num_xcc >1 ) && - (adev->gmc.num_mem_partitions ==1 || adev->gmc.num_mem_partitions ==4 ) && (num_xcc % adev->gmc.num_mem_partitions) ==0 );default :return false;
Signature · 1 line
2.34.1
Quoted 5 lines · Amber Lin
As far as the number of XCCs, the number of compute partitions, and the number of memory partitions qualify, CPX is valid.
Change-Id I65696f25e2afd75f2f4a177dabc0991b15293d9aSigned-off-by Amber Lin <[email protected]>
Reviewed-by Lijo Lazar <[email protected]>
Thanks,
Lijo
Quoted 21 lines
--- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c +4
-1@@ -559,8 +559,11 @@ static bool __aqua_vanjaram_is_valid_mode(struct amdgpu_xcp_mgr *xcp_mgr, adev->gmc.num_mem_partitions == 4) && (num_xccs_per_xcp >=2 );case AMDGPU_CPX_PARTITION_MODE : +/* (num_xcc > 1) because 1 XCC is considered SPX, not CPX. +* (num_xcc % adev->gmc.num_mem_partitions) == 0 because +* num_compute_partitions can't be less than num_mem_partitions +*/ return ((num_xcc >1 ) && - (adev->gmc.num_mem_partitions ==1 || adev->gmc.num_mem_partitions ==4 ) && (num_xcc % adev->gmc.num_mem_partitions) ==0 );default :return false;