]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdkfd: Don't partition VMID space on GFX 12.1
authorMukul Joshi <mukul.joshi@amd.com>
Fri, 8 Aug 2025 15:36:08 +0000 (11:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:27:08 +0000 (16:27 -0500)
There is no need to partition VMID space on GFX 12.1 when
operating in CPX mode as SDMA is not sharing MMHUB on GFX 12.1.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Michael Chen <michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c

index b91843b2af6a6a2c7ac6d7f85a4a96f96bf1597b..6d0b370b1644bc9b9d726b9deb562d31b49c82e5 100644 (file)
@@ -878,7 +878,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
                }
 
                if (partition_mode == AMDGPU_CPX_PARTITION_MODE &&
-                   kfd->num_nodes != 1) {
+                   kfd->num_nodes != 1 &&
+                   (KFD_GC_VERSION(kfd) != IP_VERSION(12, 1, 0))) {
                        /* For multi-partition capable GPUs and CPX mode, first
                         * XCD gets VMID range 4-9 and second XCD gets VMID
                         * range 10-15.
@@ -899,6 +900,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
                        node->compute_vmid_bitmap =
                                gpu_resources->compute_vmid_bitmap;
                }
+
                node->max_proc_per_quantum = max_proc_per_quantum;
                atomic_set(&node->sram_ecc_flag, 0);