Added workaround for inconsistent current pcie speed from gpumetrics
Change-Id: If8404d21341cd15eb4d0221ab92cb0b351bbdf3e Signed-off-by: Maisam Arif <maisarif@amd.com>
이 커밋은 다음에 포함됨:
1 부모
c8f8734bc6
커밋
b14da692eb
4 파일이 변경됨
+12
-4
검색과 일치하는 파일 없음
+7
-2
@@ -1694,8 +1694,13 @@ amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pci
|
||||
return status;
|
||||
|
||||
info->pcie_lanes = metric_info.pcie_link_width;
|
||||
// gpu metrics returns pcie link speed in .1 GT/s ex. 160 vs 16
|
||||
info->pcie_speed = (metric_info.pcie_link_speed / 10) * 1000;
|
||||
// gpu metrics is inconsistent with pcie_speed values, if 0-6 then it needs to be translated
|
||||
if (metric_info.pcie_link_speed <= 6) {
|
||||
status = smi_amdgpu_get_pcie_speed_from_pcie_type(metric_info.pcie_link_speed, &info->pcie_speed); // mapping to MT/s
|
||||
} else {
|
||||
// gpu metrics returns pcie link speed in .1 GT/s ex. 160 vs 16
|
||||
info->pcie_speed = metric_info.pcie_link_speed * 100;
|
||||
}
|
||||
|
||||
switch (info->pcie_speed) {
|
||||
case 2500:
|
||||
|
||||
@@ -468,6 +468,9 @@ amdsmi_status_t smi_amdgpu_get_pcie_speed_from_pcie_type(uint16_t pcie_type, uin
|
||||
case 5:
|
||||
*pcie_speed = 32000;
|
||||
break;
|
||||
case 6:
|
||||
*pcie_speed = 64000;
|
||||
break;
|
||||
default:
|
||||
return AMDSMI_STATUS_API_FAILED;
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단