Commit 1698e200 authored by Jonathan Kim's avatar Jonathan Kim Committed by Alex Deucher

drm/amdkfd: bind cpu and hiveless gpu to a hive if xgmi connected

If a CPU and GPU are xGMI connected but the GPU is hiveless with
respect to other GPUs, create a new CPU-GPU hive using the GPU's PCI
device location ID as the new hive ID to maintain fine grain memory
access usage.
Signed-off-by: default avatarJonathan Kim <jonathan.kim@amd.com>
Reviewed-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8c45a834
...@@ -1328,8 +1328,15 @@ static void kfd_fill_iolink_non_crat_info(struct kfd_topology_device *dev) ...@@ -1328,8 +1328,15 @@ static void kfd_fill_iolink_non_crat_info(struct kfd_topology_device *dev)
/* Include the CPU peer in GPU hive if connected over xGMI. */ /* Include the CPU peer in GPU hive if connected over xGMI. */
if (!peer_dev->gpu && if (!peer_dev->gpu &&
link->iolink_type == CRAT_IOLINK_TYPE_XGMI) link->iolink_type == CRAT_IOLINK_TYPE_XGMI) {
/*
* If the GPU is not part of a GPU hive, use its pci
* device location as the hive ID to bind with the CPU.
*/
if (!dev->node_props.hive_id)
dev->node_props.hive_id = pci_dev_id(dev->gpu->adev->pdev);
peer_dev->node_props.hive_id = dev->node_props.hive_id; peer_dev->node_props.hive_id = dev->node_props.hive_id;
}
list_for_each_entry(inbound_link, &peer_dev->io_link_props, list_for_each_entry(inbound_link, &peer_dev->io_link_props,
list) { list) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment