Skip to contentSkip to conversation

drm/amdgpu: update xgmi num links info post gc9.4.2

PATCH In review Jonathan Kim 2 participants 2 messages Nov 17, 2023

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

PATCH 1/1 drm/amdgpu: update xgmi num links info post gc9.4.2

GC IP 9.4.2 and up support TA reporting of the number of xGMI links between peers.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -1
index 6ab17330a6ed..2d22f7d45512 100644
@@ -547,7 +547,7 @@ int amdgpu_amdkfd_get_xgmi_bandwidth_mbytes(struct amdgpu_device *dst,
 	struct amdgpu_device *adev = dst, *peer_adev;
 	int num_links;
 
-	if (adev->asic_type != CHIP_ALDEBARAN)
+	if (amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(9, 4, 2))
 		return 0;
 
 	if (src)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Quoted 35 lines

-----Original Message-----
From: Kim, Jonathan <[email protected]>
Sent: Friday, November 17, 2023 12:03 PM
To: [email protected]
Cc: Joshi, Mukul <[email protected]>; Kim, Jonathan <[email protected]>; Chander, Vignesh <[email protected]>; Kim, Jonathan <[email protected]>
Subject: [PATCH] drm/amdgpu: update xgmi num links info post gc9.4.2

GC IP 9.4.2 and up support TA reporting of the number of xGMI links between peers.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -1
index 6ab17330a6ed..2d22f7d45512 100644
@@ -547,7 +547,7 @@ int
 amdgpu_amdkfd_get_xgmi_bandwidth_mbytes(struct amdgpu_device *dst,
      struct amdgpu_device *adev = dst, *peer_adev;
      int num_links;
 
-     if (adev->asic_type != CHIP_ALDEBARAN)
+     if (amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(9, 4, 2))
              return 0;
 

if (src)
--
2.34.1