[PATCH] drm/amdgpu: Add message print when unable to get valid hive

Deucher, Alexander Alexander.Deucher at amd.com
Mon Jan 7 16:27:41 UTC 2019


Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Liu, Shaoyun <Shaoyun.Liu at amd.com>
Sent: Monday, January 7, 2019 11:01:51 AM
To: amd-gfx at lists.freedesktop.org
Subject: RE: [PATCH] drm/amdgpu: Add message print when unable to get valid hive

Ping ...

-----Original Message-----
From: Liu, Shaoyun <Shaoyun.Liu at amd.com>
Sent: Friday, January 4, 2019 1:29 PM
To: amd-gfx at lists.freedesktop.org
Cc: Liu, Shaoyun <Shaoyun.Liu at amd.com>
Subject: [PATCH] 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

Change-Id: Ic03927904edf0e384b8c4651e19274bb3f2a7d9a
Signed-off-by: shaoyunl <shaoyun.liu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index 8a8bc60..b226631 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: Can not matech hive 0xllx in the hive list.\n",
+                       adev->gmc.xgmi.hive_id);
                 goto exit;
+       }

         hive_topology = &hive->topology_info;

--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190107/fc675fa6/attachment.html>


More information about the amd-gfx mailing list