]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Add page queue multiplier
authorMatthew Brost <matthew.brost@intel.com>
Tue, 8 Apr 2025 15:59:15 +0000 (08:59 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 8 May 2025 19:44:20 +0000 (12:44 -0700)
For an unknown reason the math to determine the PF queue size does is
not correct - compute UMD applications are overflowing the PF queue
which is fatal. A multippier of 8 fixes the problem.

Fixes: 3338e4f90c14 ("drm/xe: Use topology to determine page fault queue size")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com>
Link: https://lore.kernel.org/r/20250408155915.78770-1-matthew.brost@intel.com
(cherry picked from commit 29582e0ea75c95668d168b12406e3c56cf5a73c4)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_gt_pagefault.c

index c5ad9a0a89c2b322df9f5625df7f405ab87cc74d..0c22b3a3665500975235894002bfb9c44015a03d 100644 (file)
@@ -435,9 +435,16 @@ static int xe_alloc_pf_queue(struct xe_gt *gt, struct pf_queue *pf_queue)
        num_eus = bitmap_weight(gt->fuse_topo.eu_mask_per_dss,
                                XE_MAX_EU_FUSE_BITS) * num_dss;
 
-       /* user can issue separate page faults per EU and per CS */
+       /*
+        * user can issue separate page faults per EU and per CS
+        *
+        * XXX: Multiplier required as compute UMD are getting PF queue errors
+        * without it. Follow on why this multiplier is required.
+        */
+#define PF_MULTIPLIER  8
        pf_queue->num_dw =
-               (num_eus + XE_NUM_HW_ENGINES) * PF_MSG_LEN_DW;
+               (num_eus + XE_NUM_HW_ENGINES) * PF_MSG_LEN_DW * PF_MULTIPLIER;
+#undef PF_MULTIPLIER
 
        pf_queue->gt = gt;
        pf_queue->data = devm_kcalloc(xe->drm.dev, pf_queue->num_dw,