mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
drm/amdgpu: Calculate IP specific xgmi bandwidth
Use IP version specific xgmi speed/width for bandwidth calculation. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Jonathan Kim <jonathan.kim@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2bc016737a
commit
357506799b
|
|
@ -2757,6 +2757,9 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
|
|||
if (!total)
|
||||
return -ENODEV;
|
||||
|
||||
if (adev->gmc.xgmi.supported)
|
||||
amdgpu_xgmi_early_init(adev);
|
||||
|
||||
ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_GFX);
|
||||
if (ip_block->status.valid != false)
|
||||
amdgpu_amdkfd_device_probe(adev);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user