AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: <silouis@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <will.aitken@amd.com>, <vskvorts@amd.com>, <lijo.lazar@amd.com>,
	"Simon Louis" <silouis@amd.com>
Subject: [PATCH] drm/amdgpu: Disable xgmi link status for VFs
Date: Tue, 3 Feb 2026 15:42:00 +0000	[thread overview]
Message-ID: <20260203154200.21545-1-silouis@amd.com> (raw)

From: Simon Louis <silouis@amd.com>

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

Signed-off-by: Simon Louis <silouis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index aad530c46a9f..7a24fcc41638 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -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;
 
-- 
2.43.0


                 reply	other threads:[~2026-02-03 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260203154200.21545-1-silouis@amd.com \
    --to=silouis@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=lijo.lazar@amd.com \
    --cc=vskvorts@amd.com \
    --cc=will.aitken@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox