Skip to contentSkip to conversation

drm/amdgpu: Check fb-sharing for xgmi accessiblity

PATCH New [email protected] 1 participant 1 message Oct 7

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

PATCH 1/1 drm/amdgpu: Check fb-sharing for xgmi accessiblity

From: Will Aitken <[email protected]>

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +1 -0
index b4fbd8a407f1..d7845de4a789 100644
@@ -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;
 
Signature · 1 line
2.43.0