]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdkfd: fix p2p links bug in topology
authorEric Huang <jinhuieric.huang@amd.com>
Mon, 25 Aug 2025 13:50:49 +0000 (09:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Sep 2025 20:06:43 +0000 (16:06 -0400)
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>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index 82dbd68d8c990885b13d5c79be5f281ac18d73fd..5c98746eb72dfcc10a12cff3a5251e2a37371e5b 100644 (file)
@@ -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 */