AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Check fb-sharing for xgmi accessiblity
@ 2026-10-07 13:31 will.aitken
  0 siblings, 0 replies; only message in thread
From: will.aitken @ 2026-10-07 13:31 UTC (permalink / raw)
  To: amd-gfx; +Cc: Harish.Kasiviswanathan, Will Aitken

From: Will Aitken <will.aitken@amd.com>

In sriov, sometimes fb-sharing will be disabled. In those scenarios xgmi
links should no longer be used. Adding check for sharing-enabled to
determine if there is xgmi accessibility between devices

Signed-off-by: Will Aitken <will.aitken@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index b4fbd8a407f1..d7845de4a789 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -612,6 +612,7 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev,
 	}
 
 	if (amdgpu_xgmi_same_hive(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
+			(amdgpu_xgmi_get_is_sharing_enabled(adev, amdgpu_ttm_adev(bo->tbo.bdev)) &&
 			(bo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM))
 		return true;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 13:31 [PATCH] drm/amdgpu: Check fb-sharing for xgmi accessiblity will.aitken

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox