Commit 75b2fce2 authored by Le Ma's avatar Le Ma Committed by Alex Deucher

drm/amdgpu: skip get/update xgmi topology info when no psp exists

We don't currently have psp support for arcturus so provide a alternative
mechanism in the meantime.
Signed-off-by: default avatarLe Ma <le.ma@amd.com>
Reviewed-by: default avatarFeifei Xu <Feifei.Xu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e7773c1c
...@@ -296,7 +296,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) ...@@ -296,7 +296,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
struct amdgpu_xgmi *entry; struct amdgpu_xgmi *entry;
struct amdgpu_device *tmp_adev = NULL; struct amdgpu_device *tmp_adev = NULL;
int count = 0, ret = -EINVAL; int count = 0, ret = 0;
if (!adev->gmc.xgmi.supported) if (!adev->gmc.xgmi.supported)
return 0; return 0;
...@@ -337,11 +337,13 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) ...@@ -337,11 +337,13 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
top_info->num_nodes = count; top_info->num_nodes = count;
hive->number_devices = count; hive->number_devices = count;
if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP)) {
list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) { list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
/* update node list for other device in the hive */ /* update node list for other device in the hive */
if (tmp_adev != adev) { if (tmp_adev != adev) {
top_info = &tmp_adev->psp.xgmi_context.top_info; top_info = &tmp_adev->psp.xgmi_context.top_info;
top_info->nodes[count - 1].node_id = adev->gmc.xgmi.node_id; top_info->nodes[count - 1].node_id =
adev->gmc.xgmi.node_id;
top_info->num_nodes = count; top_info->num_nodes = count;
} }
ret = amdgpu_xgmi_update_topology(hive, tmp_adev); ret = amdgpu_xgmi_update_topology(hive, tmp_adev);
...@@ -362,6 +364,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) ...@@ -362,6 +364,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
goto exit; goto exit;
} }
} }
}
if (!ret) if (!ret)
ret = amdgpu_xgmi_sysfs_add_dev_info(adev, hive); ret = amdgpu_xgmi_sysfs_add_dev_info(adev, hive);
......
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