]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: get extended xgmi topology data
authorJonathan Kim <jonathan.kim@amd.com>
Tue, 3 Aug 2021 23:01:55 +0000 (19:01 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Aug 2021 22:22:24 +0000 (18:22 -0400)
commit9062a1a888e190b54a137e96f3ac5213b488e96e
tree2cce7ef66e40d8c3652cdb4470c0fa6b5656ec54
parent269247e7a53c3d62e3aa8a17cd21a6546f4d4bd6
drm/amdgpu: get extended xgmi topology data

The TA has a limit to the amount of data that can be retrieved from
GET_TOPOLOGY.  For setups that exceed this limit, the xGMI topology
needs to be re-initialized and data needs to be re-fetched from the
extended link records by setting a flag in the shared command buffer.

The number of hops and the number of links must be accumulated by the
driver. Other data points are all fetched from the first request.
Because the TA has already exceeded its link record limit, it
cannot hold bidirectional information.  Otherwise the driver would
have to do more than two fetches so the driver has to reflect the
topology information in the opposite direction.

v2: squashed with internal reviewed fix

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Hawking Zhang <hawking.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
drivers/gpu/drm/amd/amdgpu/ta_xgmi_if.h