Skip to content

Commit 43d0822

Browse files
Lijo Lazaralexdeucher
authored andcommitted
drm/amdgpu: Avoid xgmi register access
On single GPU systems, avoid accesses to XGMI link registers. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 076470b commit 43d0822

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ int amdgpu_xgmi_get_ext_link(struct amdgpu_device *adev, int link_num)
298298
{
299299
int link_map_6_4_x[8] = { 0, 3, 1, 2, 7, 6, 4, 5 };
300300

301+
if (adev->gmc.xgmi.num_physical_nodes <= 1)
302+
return -EINVAL;
303+
301304
switch (amdgpu_ip_version(adev, XGMI_HWIP, 0)) {
302305
case IP_VERSION(6, 4, 0):
303306
case IP_VERSION(6, 4, 1):
@@ -346,6 +349,9 @@ int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num)
346349
{
347350
u32 xgmi_state_reg_val;
348351

352+
if (adev->gmc.xgmi.num_physical_nodes <= 1)
353+
return -EINVAL;
354+
349355
switch (amdgpu_ip_version(adev, XGMI_HWIP, 0)) {
350356
case IP_VERSION(6, 4, 0):
351357
case IP_VERSION(6, 4, 1):

0 commit comments

Comments
 (0)