diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2018-09-28 21:50:37 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-06 14:02:43 -0500 |
commit | dd3c45d306220b7f3e40fd1457eaf480ab7d1b26 (patch) | |
tree | ff40b8604ee6875283e5e726fd3a5d4960aa641b /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
parent | 3e2e2ab55499f77cbd57ee91e250c085d252a979 (diff) | |
download | linux-dd3c45d306220b7f3e40fd1457eaf480ab7d1b26.tar.bz2 |
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.c | 8 |
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) if ((adev->asic_type < CHIP_VEGA20) || (adev->flags & AMD_IS_APU) ) return 0; - adev->gmc.xgmi.device_id = psp_xgmi_get_device_id(&adev->psp); + adev->gmc.xgmi.node_id = psp_xgmi_get_node_id(&adev->psp); adev->gmc.xgmi.hive_id = psp_xgmi_get_hive_id(&adev->psp); memset(&tmp_topology[0], 0, sizeof(tmp_topology)); @@ -84,13 +84,13 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) list_add_tail(&adev->gmc.xgmi.head, &hive->device_list); list_for_each_entry(entry, &hive->device_list, head) - tmp_topology[count++].device_id = entry->device_id; + tmp_topology[count++].node_id = entry->node_id; ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology); if (ret) { dev_err(adev->dev, "XGMI: Get topology failure on device %llx, hive %llx, ret %d", - adev->gmc.xgmi.device_id, + adev->gmc.xgmi.node_id, adev->gmc.xgmi.hive_id, ret); goto exit; } @@ -100,7 +100,7 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) if (ret) { dev_err(tmp_adev->dev, "XGMI: Set topology failure on device %llx, hive %llx, ret %d", - tmp_adev->gmc.xgmi.device_id, + 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; |