aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
diff options
context:
space:
mode:
authorshaoyunl <[email protected]>2019-01-04 18:23:06 +0000
committerAlex Deucher <[email protected]>2019-01-14 20:04:52 +0000
commit36ca09a02aa6b02cb33b04962ec373a164e636a6 (patch)
tree915a8badc1a82e1cabe9db3d97fe6a2261245c3f /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
parentdrm/amdgpu/psp: make get_fw_type and prep_cmd_buf to be common interfaces (diff)
downloadkernel-36ca09a02aa6b02cb33b04962ec373a164e636a6.tar.gz
kernel-36ca09a02aa6b02cb33b04962ec373a164e636a6.zip
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c7
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)
mutex_lock(&xgmi_mutex);
hive = amdgpu_get_xgmi_hive(adev);
- if (!hive)
+ if (!hive) {
+ ret = -EINVAL;
+ dev_err(adev->dev,
+ "XGMI: node 0x%llx, can not matech hive 0x%llx in the hive list.\n",
+ adev->gmc.xgmi.node_id, adev->gmc.xgmi.hive_id);
goto exit;
+ }
hive_topology = &hive->topology_info;