drm/amdgpu: Add xgmi API to set max speed/width

Add an API to set the max possible xgmi speed/width.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lijo Lazar 2025-06-13 18:01:29 +05:30 committed by Alex Deucher
parent 8c9eb6ce50
commit 9750ad5aee
2 changed files with 9 additions and 0 deletions

View File

@ -1786,3 +1786,10 @@ void amdgpu_xgmi_early_init(struct amdgpu_device *adev)
break;
}
}
void amgpu_xgmi_set_max_speed_width(struct amdgpu_device *adev,
uint16_t max_speed, uint8_t max_width)
{
adev->gmc.xgmi.max_speed = max_speed;
adev->gmc.xgmi.max_width = max_width;
}

View File

@ -124,4 +124,6 @@ int amdgpu_xgmi_get_ext_link(struct amdgpu_device *adev, int link_num);
void amdgpu_xgmi_early_init(struct amdgpu_device *adev);
uint32_t amdgpu_xgmi_get_max_bandwidth(struct amdgpu_device *adev);
void amgpu_xgmi_set_max_speed_width(struct amdgpu_device *adev,
uint16_t max_speed, uint8_t max_width);
#endif