aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2018-09-28 09:50:37 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-11-06 14:02:43 -0500
commitdd3c45d306220b7f3e40fd1457eaf480ab7d1b26 (patch)
treeff40b8604ee6875283e5e726fd3a5d4960aa641b /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
parent3e2e2ab55499f77cbd57ee91e250c085d252a979 (diff)
drm/amdgpu/psp: add get_node_id function
get_node_id function is used for driver to get node_id for current device from xgmi ta Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index 897afbb348c1..32896ba12c67 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -73,7 +73,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
73 if ((adev->asic_type < CHIP_VEGA20) || 73 if ((adev->asic_type < CHIP_VEGA20) ||
74 (adev->flags & AMD_IS_APU) ) 74 (adev->flags & AMD_IS_APU) )
75 return 0; 75 return 0;
76 adev->gmc.xgmi.device_id = psp_xgmi_get_device_id(&adev->psp); 76 adev->gmc.xgmi.node_id = psp_xgmi_get_node_id(&adev->psp);
77 adev->gmc.xgmi.hive_id = psp_xgmi_get_hive_id(&adev->psp); 77 adev->gmc.xgmi.hive_id = psp_xgmi_get_hive_id(&adev->psp);
78 78
79 memset(&tmp_topology[0], 0, sizeof(tmp_topology)); 79 memset(&tmp_topology[0], 0, sizeof(tmp_topology));
@@ -84,13 +84,13 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
84 84
85 list_add_tail(&adev->gmc.xgmi.head, &hive->device_list); 85 list_add_tail(&adev->gmc.xgmi.head, &hive->device_list);
86 list_for_each_entry(entry, &hive->device_list, head) 86 list_for_each_entry(entry, &hive->device_list, head)
87 tmp_topology[count++].device_id = entry->device_id; 87 tmp_topology[count++].node_id = entry->node_id;
88 88
89 ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology); 89 ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology);
90 if (ret) { 90 if (ret) {
91 dev_err(adev->dev, 91 dev_err(adev->dev,
92 "XGMI: Get topology failure on device %llx, hive %llx, ret %d", 92 "XGMI: Get topology failure on device %llx, hive %llx, ret %d",
93 adev->gmc.xgmi.device_id, 93 adev->gmc.xgmi.node_id,
94 adev->gmc.xgmi.hive_id, ret); 94 adev->gmc.xgmi.hive_id, ret);
95 goto exit; 95 goto exit;
96 } 96 }
@@ -100,7 +100,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
100 if (ret) { 100 if (ret) {
101 dev_err(tmp_adev->dev, 101 dev_err(tmp_adev->dev,
102 "XGMI: Set topology failure on device %llx, hive %llx, ret %d", 102 "XGMI: Set topology failure on device %llx, hive %llx, ret %d",
103 tmp_adev->gmc.xgmi.device_id, 103 tmp_adev->gmc.xgmi.node_id,
104 tmp_adev->gmc.xgmi.hive_id, ret); 104 tmp_adev->gmc.xgmi.hive_id, ret);
105 /* To do : continue with some node failed or disable the whole hive */ 105 /* To do : continue with some node failed or disable the whole hive */
106 break; 106 break;