Skip to contentSkip to conversation

drm/amdgpu: Disable xgmi link status for VFs

PATCH New [email protected] 1 participant 1 message Feb 3

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Disable xgmi link status for VFs

From: Simon Louis <[email protected]>

Xgmi link status is unavailable in guest. This patch returns XGMI_LINK_NA for VFs when in SRIOV.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +4 -0
index aad530c46a9f..7a24fcc41638 100644
@@ -44,6 +44,7 @@
 #define XGMI_STATE_LS0                          0x81
 #define XGMI_LINK_ACTIVE			1
 #define XGMI_LINK_INACTIVE			0
+#define XGMI_LINK_NA				2
 
 static DEFINE_MUTEX(xgmi_mutex);
 
@@ -349,6 +350,9 @@ int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num)
 {
 	u32 xgmi_state_reg_val;
 
+	if (amdgpu_sriov_vf(adev))
+		return XGMI_LINK_NA;
+
 	if (adev->gmc.xgmi.num_physical_nodes <= 1)
 		return -EINVAL;
 
Signature · 1 line
2.43.0