From: Mukul Joshi <[email protected]>

GFX12.1 doesn't follow the pair-wise CU mask requirement as
is the case for GFX 10,GFX 11 and GFX 12.
Currently, the ioctl call is returning error because of this
incorrect condition of checking for a pair of CUs to be enabled
in the CU mask.
Fix the issue by removing this check for GFX 12.1.

Signed-off-by: Mukul Joshi <[email protected]>
Reviewed-by: Harish Kasiviswanathan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index ef1d1cb46152d..9e607098c3a09 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -663,7 +663,8 @@ int pqm_update_mqd(struct process_queue_manager *pqm,
 
        /* ASICs that have WGPs must enforce pairwise enabled mask checks. */
        if (minfo && minfo->cu_mask.ptr &&
-                       KFD_GC_VERSION(pqn->q->device) >= IP_VERSION(10, 0, 0)) 
{
+                       KFD_GC_VERSION(pqn->q->device) >= IP_VERSION(10, 0, 0) 
&&
+                       KFD_GC_VERSION(pqn->q->device) < IP_VERSION(12, 1, 0)) {
                int i;
 
                for (i = 0; i < minfo->cu_mask.count; i += 2) {
-- 
2.55.0

Reply via email to