diff options
| author | Lijo Lazar <[email protected]> | 2025-02-06 12:10:42 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-03-14 03:11:46 +0000 |
| commit | 357506799bacb21ba1ed7d64e02ac9c4a1f45b31 (patch) | |
| tree | b853ed842ae9dc0b009483742c97ceac06dc2ca7 /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
| parent | drm/amdgpu/pm: add VCN activity for renoir (diff) | |
| download | kernel-357506799bacb21ba1ed7d64e02ac9c4a1f45b31.tar.gz kernel-357506799bacb21ba1ed7d64e02ac9c4a1f45b31.zip | |
drm/amdgpu: Calculate IP specific xgmi bandwidth
Use IP version specific xgmi speed/width for bandwidth calculation.
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Jonathan Kim <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 7fdf30f1161c..6029a799074d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c @@ -844,7 +844,9 @@ int amdgpu_xgmi_get_bandwidth(struct amdgpu_device *adev, struct amdgpu_device * { bool peer_mode = bw_mode == AMDGPU_XGMI_BW_MODE_PER_PEER; int unit_scale = bw_unit == AMDGPU_XGMI_BW_UNIT_MBYTES ? 1000 : 1; - int speed = 25, num_lanes = 16, num_links = !peer_mode ? 1 : -1; + int num_lanes = adev->gmc.xgmi.max_width; + int speed = adev->gmc.xgmi.max_speed; + int num_links = !peer_mode ? 1 : -1; if (!(min_bw && max_bw)) return -EINVAL; |
