diff options
author | shaoyunl <shaoyun.liu@amd.com> | 2019-01-04 13:23:06 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-14 15:04:52 -0500 |
commit | 36ca09a02aa6b02cb33b04962ec373a164e636a6 (patch) | |
tree | 915a8badc1a82e1cabe9db3d97fe6a2261245c3f /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
parent | be4630d96258781d72201af525a34c2509a6f3a0 (diff) |
drm/amdgpu: Add message print when unable to get valid hive
Add message print out and return -EINVAL when driver can not get valid hive
from hive arrary on xgmi configuration
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 8a8bc60cb6b4..ac57a8767283 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |||
@@ -113,8 +113,13 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev) | |||
113 | 113 | ||
114 | mutex_lock(&xgmi_mutex); | 114 | mutex_lock(&xgmi_mutex); |
115 | hive = amdgpu_get_xgmi_hive(adev); | 115 | hive = amdgpu_get_xgmi_hive(adev); |
116 | if (!hive) | 116 | if (!hive) { |
117 | ret = -EINVAL; | ||
118 | dev_err(adev->dev, | ||
119 | "XGMI: node 0x%llx, can not matech hive 0x%llx in the hive list.\n", | ||
120 | adev->gmc.xgmi.node_id, adev->gmc.xgmi.hive_id); | ||
117 | goto exit; | 121 | goto exit; |
122 | } | ||
118 | 123 | ||
119 | hive_topology = &hive->topology_info; | 124 | hive_topology = &hive->topology_info; |
120 | 125 | ||