drm/amdgpu: Each PSP need to get latest topology info on XGMI configuration
Driver need to call each psp instance to get topology info before set topology Signed-off-by: shaoyunl <Shaoyun.Liu@amd.com> reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
584738b7e3
commit
a82c15668c
@ -88,14 +88,19 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
|
|||||||
list_for_each_entry(entry, &hive->device_list, head)
|
list_for_each_entry(entry, &hive->device_list, head)
|
||||||
tmp_topology->nodes[count++].node_id = entry->node_id;
|
tmp_topology->nodes[count++].node_id = entry->node_id;
|
||||||
|
|
||||||
ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology);
|
/* Each psp need to get the latest topology */
|
||||||
if (ret) {
|
list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
|
||||||
dev_err(adev->dev,
|
ret = psp_xgmi_get_topology_info(&tmp_adev->psp, count, tmp_topology);
|
||||||
"XGMI: Get topology failure on device %llx, hive %llx, ret %d",
|
if (ret) {
|
||||||
adev->gmc.xgmi.node_id,
|
dev_err(tmp_adev->dev,
|
||||||
adev->gmc.xgmi.hive_id, ret);
|
"XGMI: Get topology failure on device %llx, hive %llx, ret %d",
|
||||||
goto exit;
|
tmp_adev->gmc.xgmi.node_id,
|
||||||
|
tmp_adev->gmc.xgmi.hive_id, ret);
|
||||||
|
/* To do : continue with some node failed or disable the whole hive */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Each psp need to set the latest topology */
|
/* Each psp need to set the latest topology */
|
||||||
list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
|
list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
|
||||||
ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, tmp_topology);
|
ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, tmp_topology);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user