Commit 36cc7d13 authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher
Browse files

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: default avatarEric Huang <jinhuieric.huang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3f36e712
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1589,7 +1589,8 @@ static int kfd_dev_create_p2p_links(void)
			break;
		if (!dev->gpu || !dev->gpu->adev ||
		    (dev->gpu->kfd->hive_id &&
		     dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id))
		     dev->gpu->kfd->hive_id == new_dev->gpu->kfd->hive_id &&
		     amdgpu_xgmi_get_is_sharing_enabled(dev->gpu->adev, new_dev->gpu->adev)))
			goto next;

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