Skip to content

Commit ce42a3b

Browse files
erichuang22alexdeucher
authored andcommitted
drm/amdkfd: fix p2p links bug in topology
When creating p2p links, KFD needs to check XGMI link with two conditions, hive_id and is_sharing_enabled, but it is missing to check is_sharing_enabled, so add it to fix the error. Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 36cc7d1)
1 parent 1dfd286 commit ce42a3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_topology.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,8 @@ static int kfd_dev_create_p2p_links(void)
15871587
break;
15881588
if (!dev->gpu || !dev->gpu->adev ||
15891589
(dev->gpu->kfd->hive_id &&
1590-
dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id))
1590+
dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id &&
1591+
amdgpu_xgmi_get_is_sharing_enabled(dev->gpu->adev, new_dev->gpu->adev)))
15911592
goto next;
15921593

15931594
/* check if node(s) is/are peer accessible in one direction or bi-direction */

0 commit comments

Comments
 (0)