OSDN Git Service

drm/amdgpu: mask the xgmi number of hops reported from psp to kfd
authorJonathan Kim <jonathan.kim@amd.com>
Wed, 27 Jan 2021 20:24:59 +0000 (15:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 02:58:03 +0000 (22:58 -0400)
commit4ac5617c4b7d0f0a8f879997f8ceaa14636d7554
tree3fc4d9fe805d7dcee45f43a29b95bcdc64612865
parent9a9c59a8f4f4478d5951eb0bded1d17b936aad6e
drm/amdgpu: mask the xgmi number of hops reported from psp to kfd

The psp supplies the link type in the upper 2 bits of the psp xgmi node
information num_hops field.  With a new link type, Aldebaran has these
bits set to a non-zero value (1 = xGMI3) so the KFD topology will report
the incorrect IO link weights without proper masking.
The actual number of hops is located in the 3 least significant bits of
this field so mask if off accordingly before passing it to the KFD.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Amber Lin <amber.lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c