diff options
author | Shiwu Zhang <shiwu.zhang@amd.com> | 2023-10-31 12:32:54 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-11-17 09:30:51 -0500 |
commit | 75fb313c55fa102f973c440f55dc63ffc61f3b54 (patch) | |
tree | 3d7b6424a8d9b1da1a9260f09664ae507a23ef22 /drivers/gpu/drm/amd/include | |
parent | 59e4db5375f587954eb779ac9c7888a6c81c306b (diff) |
drm/amdgpu: expose the connected port num info through sysfs
By catting the xgmi_port_num sysfs node, it prints out the info in the
format of <src node id>:<src port num> -> <dst node id>:<dst port num>
for one xgmi link.
For example, in case of 4 sockets fully and evenly connected setup, it
would be like as below for the first node in the hive.
01:02 -> 02:03
01:03 -> 02:02
01:07 -> 03:04
01:04 -> 03:07
01:06 -> 04:05
01:05 -> 04:06
Based on the fact that there is two xgmi links between each socket pair,
"01:02 -> 02:03" means that the current socket in question use the port 2
to connect with port 3 of the second node in the hive and so on.
v2: print out the src/dst node id for each xgmi link (lijo)
v3: replace the current_node++ with +1 to align with dst node (le)
and use the dev_err instead of pr_err (lijo)
v4: fix checkpatch warning (alex)
Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Acked-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/include')
0 files changed, 0 insertions, 0 deletions