diff options
author | shaoyunl <Shaoyun.Liu@amd.com> | 2018-10-15 14:40:06 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-09 16:28:32 -0500 |
commit | a82c15668cfc02d69e0265cda50fa932310ddd30 (patch) | |
tree | 0c32a549d3ad380f72c3977e2ff899088a66fce1 /drivers/gpu/drm/amd | |
parent | 584738b7e359e856199ef7093bc1b28dabada054 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 56acdeab3812..909216a9b447 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |||
@@ -88,14 +88,19 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) | |||
88 | list_for_each_entry(entry, &hive->device_list, head) | 88 | list_for_each_entry(entry, &hive->device_list, head) |
89 | tmp_topology->nodes[count++].node_id = entry->node_id; | 89 | tmp_topology->nodes[count++].node_id = entry->node_id; |
90 | 90 | ||
91 | ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology); | 91 | /* Each psp need to get the latest topology */ |
92 | if (ret) { | 92 | list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) { |
93 | dev_err(adev->dev, | 93 | ret = psp_xgmi_get_topology_info(&tmp_adev->psp, count, tmp_topology); |
94 | "XGMI: Get topology failure on device %llx, hive %llx, ret %d", | 94 | if (ret) { |
95 | adev->gmc.xgmi.node_id, | 95 | dev_err(tmp_adev->dev, |
96 | adev->gmc.xgmi.hive_id, ret); | 96 | "XGMI: Get topology failure on device %llx, hive %llx, ret %d", |
97 | goto exit; | 97 | tmp_adev->gmc.xgmi.node_id, |
98 | tmp_adev->gmc.xgmi.hive_id, ret); | ||
99 | /* To do : continue with some node failed or disable the whole hive */ | ||
100 | break; | ||
101 | } | ||
98 | } | 102 | } |
103 | |||
99 | /* Each psp need to set the latest topology */ | 104 | /* Each psp need to set the latest topology */ |
100 | list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) { | 105 | list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) { |
101 | ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, tmp_topology); | 106 | ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, tmp_topology); |