summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMukul Joshi <mukul.joshi@amd.com>2026-04-28 13:33:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-08-25 18:41:33 -0400
commit32e1f992b372df2fcd38da82d52ab6e18277e03e (patch)
treeb11411dc4e07f0e323e411a974e0d75b162facc7 /drivers
parentd75118af05dda55c37a5b97841fdfb3f907cf07b (diff)
drm/amdkfd: Update SDMA engines reporting for GFX 12.1
On GFX 12.1, all SDMA engines are the same from HW perspective. As a result, report all SDMA engines as regular/PCIe SDMA engines. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 586e640f13dc..1c1e7878a2a7 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -1512,8 +1512,11 @@ void kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask)
*/
unsigned int kfd_get_num_sdma_engines(struct kfd_node *node)
{
- /* If XGMI is not supported, all SDMA engines are PCIe */
- if (!node->adev->gmc.xgmi.supported)
+ /* If XGMI is not supported, all SDMA engines are PCIe.
+ * Also, on GC 12.1, all SDMA engines are the same.
+ */
+ if (!node->adev->gmc.xgmi.supported ||
+ KFD_GC_VERSION(node->kfd) == IP_VERSION(12, 1, 0))
return node->adev->sdma.num_instances/(int)node->kfd->num_nodes;
return min(node->adev->sdma.num_instances/(int)node->kfd->num_nodes, 2);