mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
@@ -298,6 +298,9 @@ int amdgpu_xgmi_get_ext_link(struct amdgpu_device *adev, int link_num)
|
||||
{
|
||||
int link_map_6_4_x[8] = { 0, 3, 1, 2, 7, 6, 4, 5 };
|
||||
|
||||
if (adev->gmc.xgmi.num_physical_nodes <= 1)
|
||||
return -EINVAL;
|
||||
|
||||
switch (amdgpu_ip_version(adev, XGMI_HWIP, 0)) {
|
||||
case IP_VERSION(6, 4, 0):
|
||||
case IP_VERSION(6, 4, 1):
|
||||
@@ -346,6 +349,9 @@ int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num)
|
||||
{
|
||||
u32 xgmi_state_reg_val;
|
||||
|
||||
if (adev->gmc.xgmi.num_physical_nodes <= 1)
|
||||
return -EINVAL;
|
||||
|
||||
switch (amdgpu_ip_version(adev, XGMI_HWIP, 0)) {
|
||||
case IP_VERSION(6, 4, 0):
|
||||
case IP_VERSION(6, 4, 1):
|
||||
|
||||
Reference in New Issue
Block a user