Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct link speed & width for Navi #6

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

Umio-Yasuno
Copy link
Contributor

@Umio-Yasuno Umio-Yasuno commented Dec 29, 2023

Recent AMD GPUs have multiple endpoints (Upstream Port, Downstream Port, GPU), and the actual {current,max} link speed & width is reflected on the upstream port.

Ref: https://docs.rs/libdrm_amdgpu_sys/latest/src/libdrm_amdgpu_sys/pci/bus_info.rs.html#87-93
Ref: https://gitlab.freedesktop.org/drm/amd/-/issues/1967#note_1347631

This reverts commit 0a46c39e87b682586aa0ea4bf50f52c52474d4d6.
@ilya-zlobintsev
Copy link
Owner

How does the full sysfs path look like in this scenario? Is it something like /sys/bus/pci/devices/0000:0b:00.0/0000:0b:00.1/?
I'm wondering if there's a more universal way to detect the "root" device, so this could work for generations other than navi10 without having to hardcode the device ids of each one.

@Umio-Yasuno
Copy link
Contributor Author

How does the full sysfs path look like in this scenario? Is it something like /sys/bus/pci/devices/0000:0b:00.0/0000:0b:00.1/?

/sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/../..

I'm wondering if there's a more universal way to detect the "root" device, so this could work for generations other than navi10 without having to hardcode the device ids of each one.

The reason there is an "Navi 10" in the name is because of the PCI ID Repository, the same device is also used for Navi2x and Navi3x.

https://linux-hardware.org/?probe=5d96610622

LACT (amdgpu-sysfs-rs) displays the link speed & width for Navi23 on my system as 16.0 GT/s PCIe x16 (Current) and 16.0 GT/s PCIe x16 (Max), but they are actually 8.0 GT/s PCIe x8 (Current) and 16.0 GT/s PCIe x8 (Max).

Also, since the root device differs depending on the system, I think searching from the GPU is the safest way.

@ilya-zlobintsev
Copy link
Owner

ilya-zlobintsev commented Dec 30, 2023

the same device is also used for Navi2x and Navi3x

In that case I'm fine with the current solution.

@ilya-zlobintsev ilya-zlobintsev merged commit 33aba4f into ilya-zlobintsev:master Dec 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants