Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Lijo Lazar and committed by
Alex Deucher
35750679 2bc01673

+6 -1
+3
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 2757 2757 if (!total) 2758 2758 return -ENODEV; 2759 2759 2760 + if (adev->gmc.xgmi.supported) 2761 + amdgpu_xgmi_early_init(adev); 2762 + 2760 2763 ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_GFX); 2761 2764 if (ip_block->status.valid != false) 2762 2765 amdgpu_amdkfd_device_probe(adev);
+3 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
··· 844 844 { 845 845 bool peer_mode = bw_mode == AMDGPU_XGMI_BW_MODE_PER_PEER; 846 846 int unit_scale = bw_unit == AMDGPU_XGMI_BW_UNIT_MBYTES ? 1000 : 1; 847 - int speed = 25, num_lanes = 16, num_links = !peer_mode ? 1 : -1; 847 + int num_lanes = adev->gmc.xgmi.max_width; 848 + int speed = adev->gmc.xgmi.max_speed; 849 + int num_links = !peer_mode ? 1 : -1; 848 850 849 851 if (!(min_bw && max_bw)) 850 852 return -EINVAL;