drm/xe/guc: Port Wa_22012773006 to xe_wa
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 26 May 2023 16:43:50 +0000 (09:43 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:34:03 +0000 (18:34 -0500)
Let xe_guc.c start using XE_WA() for workarounds, starting from a simple
one: Wa_22012773006. It's also changed to start with graphics version
12, since that is the first supported by xe.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230526164358.86393-14-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_guc.c
drivers/gpu/drm/xe/xe_wa_oob.rules

index b9d3553ab47699fa152c25d1583712abd2a30fac..a685e39d6b442491ae72e7f5447df8d1b3de2588 100644 (file)
@@ -40,7 +40,7 @@ quiet_cmd_wa_oob = GEN     $(notdir $(generated_oob))
 $(generated_oob) &: $(obj)/xe_gen_wa_oob $(srctree)/$(src)/xe_wa_oob.rules
        $(call cmd,wa_oob)
 
-$(obj)/xe_wa.o: $(generated_oob)
+$(obj)/xe_guc.o $(obj)/xe_wa.o: $(generated_oob)
 
 # Please keep these build lists sorted!
 
index a8e249205bffa2c277faf7fe3488b4ad16a5ecd9..08362db6a8860f12ca7513a70cd642ec31e1207b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "xe_guc.h"
 
+#include "generated/xe_wa_oob.h"
 #include "regs/xe_gt_regs.h"
 #include "regs/xe_guc_regs.h"
 #include "xe_bo.h"
@@ -20,6 +21,7 @@
 #include "xe_mmio.h"
 #include "xe_platform_types.h"
 #include "xe_uc_fw.h"
+#include "xe_wa.h"
 #include "xe_wopcm.h"
 
 static struct xe_gt *
@@ -134,9 +136,7 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
        struct xe_gt *gt = guc_to_gt(guc);
        u32 flags = 0;
 
-       /* Wa_22012773006:gen11,gen12 < XeHP */
-       if (GRAPHICS_VER(xe) >= 11 &&
-           GRAPHICS_VERx100(xe) < 1250)
+       if (XE_WA(gt, 22012773006))
                flags |= GUC_WA_POLLCS;
 
        /* Wa_16011759253 */
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b54f70eeccf42278d9e41ef5f713ca386603368a 100644 (file)
@@ -0,0 +1 @@
+22012773006    GRAPHICS_VERSION_RANGE(1200, 1250)