* [PATCH v3 1/5] drm/xe: add xe_device_wa infrastructure
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
@ 2025-06-25 19:33 ` Matt Atwood
2025-06-25 19:33 ` [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds Matt Atwood
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 19:33 UTC (permalink / raw)
To: intel-xe; +Cc: lucas.demarchi, matthew.d.roper, rodrigo.vivi, Matt Atwood
There are some workarounds that must be applied before gt init,
wa_150154044425 for example. Instead of sprinkling them conditionally
throughout the driver as we did for i915 generate an oob.rules file
reusing the RTP infrastructure to make these easier to track.
v2: rename xe_soc_wa to xe_device_wa
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/xe/Makefile | 11 ++++++++-
drivers/gpu/drm/xe/xe_device_wa_oob.rules | 0
drivers/gpu/drm/xe/xe_gen_wa_oob.c | 27 ++++++++++++++++-------
3 files changed, 29 insertions(+), 9 deletions(-)
create mode 100644 drivers/gpu/drm/xe/xe_device_wa_oob.rules
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index eee6bac01a00..64498ce2a839 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -21,6 +21,15 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
$(src)/xe_wa_oob.rules
$(call cmd,wa_oob)
+generated_device_oob := $(obj)/generated/xe_device_wa_oob.c $(obj)/generated/xe_device_wa_oob.h
+quiet_cmd_device_wa_oob = GEN $(notdir $(generated_device_oob))
+ cmd_device_wa_oob = mkdir -p $(@D); $^ $(generated_device_oob)
+$(obj)/generated/%_device_wa_oob.c $(obj)/generated/%_device_wa_oob.h: $(obj)/xe_gen_wa_oob \
+ $(src)/xe_device_wa_oob.rules
+ $(call cmd,device_wa_oob)
+
+
+
# Please keep these build lists sorted!
# core driver code
@@ -339,4 +348,4 @@ $(obj)/%.hdrtest: $(src)/%.h FORCE
$(call if_changed_dep,hdrtest)
uses_generated_oob := $(addprefix $(obj)/, $(xe-y))
-$(uses_generated_oob): $(obj)/generated/xe_wa_oob.h
+$(uses_generated_oob): $(obj)/generated/xe_wa_oob.h $(obj)/generated/xe_device_wa_oob.h
diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/drivers/gpu/drm/xe/xe_gen_wa_oob.c b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
index ed9183599e31..d8bb26317f28 100644
--- a/drivers/gpu/drm/xe/xe_gen_wa_oob.c
+++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
@@ -18,8 +18,8 @@
" *\n" \
" * This file was generated from rules: %s\n" \
" */\n" \
- "#ifndef _GENERATED_XE_WA_OOB_\n" \
- "#define _GENERATED_XE_WA_OOB_\n" \
+ "#ifndef _GENERATED_%s_\n" \
+ "#define _GENERATED_%s_\n" \
"\n" \
"enum {\n"
@@ -52,7 +52,7 @@ static char *strip(char *line, size_t linelen)
}
#define MAX_LINE_LEN 4096
-static int parse(FILE *input, FILE *csource, FILE *cheader)
+static int parse(FILE *input, FILE *csource, FILE *cheader, bool device)
{
char line[MAX_LINE_LEN + 1];
char *name, *prev_name = NULL, *rules;
@@ -96,7 +96,10 @@ static int parse(FILE *input, FILE *csource, FILE *cheader)
}
if (name) {
- fprintf(cheader, "\tXE_WA_OOB_%s = %u,\n", name, idx);
+ if (device == false)
+ fprintf(cheader, "\tXE_WA_OOB_%s = %u,\n", name, idx);
+ else
+ fprintf(cheader, "\tXE_DEVICE_WA_OOB_%s = %u,\n", name, idx);
/* Close previous entry before starting a new one */
if (idx)
@@ -117,8 +120,10 @@ static int parse(FILE *input, FILE *csource, FILE *cheader)
/* Close last entry */
if (idx)
fprintf(csource, ") },\n");
-
- fprintf(cheader, "\t_XE_WA_OOB_COUNT = %u\n", idx);
+ if (device == false)
+ fprintf(cheader, "\t_XE_WA_OOB_COUNT = %u\n", idx);
+ else
+ fprintf(cheader, "\t_XE_DEVICE_WA_OOB_COUNT = %u\n", idx);
return 0;
}
@@ -157,9 +162,15 @@ int main(int argc, const char *argv[])
}
}
- fprintf(args[ARGS_CHEADER].f, HEADER, args[ARGS_INPUT].fn);
+ char *device = strstr(args[ARGS_CHEADER].fn, "device_");
+ if (device == NULL)
+ fprintf(args[ARGS_CHEADER].f, HEADER, args[ARGS_INPUT].fn, "XE_WA_OOB", "XE_WA_OOB");
+ else
+ fprintf(args[ARGS_CHEADER].f, HEADER, args[ARGS_INPUT].fn, "XE_DEVICE_WA_OOB", "XE_DEVICE_WA_OOB");
+
+ bool prefix = device != NULL ? true : false;
ret = parse(args[ARGS_INPUT].f, args[ARGS_CSOURCE].f,
- args[ARGS_CHEADER].f);
+ args[ARGS_CHEADER].f, prefix);
if (!ret)
fprintf(args[ARGS_CHEADER].f, FOOTER);
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
2025-06-25 19:33 ` [PATCH v3 1/5] drm/xe: add xe_device_wa infrastructure Matt Atwood
@ 2025-06-25 19:33 ` Matt Atwood
2025-06-25 19:51 ` Matt Roper
2025-06-25 19:33 ` [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro Matt Atwood
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 19:33 UTC (permalink / raw)
To: intel-xe; +Cc: lucas.demarchi, matthew.d.roper, rodrigo.vivi, Matt Atwood
Some workarounds need to be able to be applied ahead of any GT
initialization for example 15015404425. This patch creates XE_DEVICE_WA
macro, in the same vein as XE_WA. This macro can be used ahead of GT
initialization, and can be tracked in sysfs. This should alleviate some
of the complexities that exist in i915.
v2: name change SoC to Device, address style issues
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/xe/xe_device_types.h | 9 ++++++
drivers/gpu/drm/xe/xe_pci.c | 4 +++
drivers/gpu/drm/xe/xe_rtp.c | 5 +++
drivers/gpu/drm/xe/xe_rtp.h | 3 +-
drivers/gpu/drm/xe/xe_rtp_types.h | 2 ++
drivers/gpu/drm/xe/xe_wa.c | 46 ++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_wa.h | 18 +++++++++--
7 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 6aca4b1a2824..62f09d2923c3 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -360,6 +360,15 @@ struct xe_device {
u8 skip_pcode:1;
} info;
+ /** @xe_active.oob: bitmap with active OOB workarounds */
+ unsigned long *oob;
+ /**
+ * @xe_active.oob_initialized: mark oob as initialized to help
+ * detecting misuse of XE_SOC_WA() - it can only be called on
+ * initialization after SOC OOB WAs have been processed
+ */
+ bool oob_initialized;
+
/** @survivability: survivability information for device */
struct xe_survivability survivability;
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 824461c31288..a9f708608f3e 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -32,6 +32,7 @@
#include "xe_step.h"
#include "xe_survivability_mode.h"
#include "xe_tile.h"
+#include "xe_wa.h"
enum toggle_d3cold {
D3COLD_DISABLE,
@@ -832,6 +833,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (err)
return err;
+ xe_device_wa_init(xe);
+ xe_device_wa_process_oob(xe);
+
err = xe_device_probe_early(xe);
/*
* In Boot Survivability mode, no drm card is exposed and driver
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 29e694bb1219..2a0b0a1a8969 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -196,6 +196,11 @@ static void rtp_get_context(struct xe_rtp_process_ctx *ctx,
*gt = (*hwe)->gt;
*xe = gt_to_xe(*gt);
break;
+ case XE_RTP_PROCESS_TYPE_DEVICE:
+ *hwe = NULL;
+ *gt = NULL;
+ *xe = ctx->xe;
+ break;
}
}
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index 4fe736a11c42..ac260feaabef 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -422,7 +422,8 @@ struct xe_reg_sr;
#define XE_RTP_PROCESS_CTX_INITIALIZER(arg__) _Generic((arg__), \
struct xe_hw_engine * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_ENGINE }, \
- struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT })
+ struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT }, \
+ struct xe_device * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_DEVICE })
void xe_rtp_process_ctx_enable_active_tracking(struct xe_rtp_process_ctx *ctx,
unsigned long *active_entries,
diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
index 1b76b947c706..123579ebf2cf 100644
--- a/drivers/gpu/drm/xe/xe_rtp_types.h
+++ b/drivers/gpu/drm/xe/xe_rtp_types.h
@@ -112,12 +112,14 @@ struct xe_rtp_entry {
enum xe_rtp_process_type {
XE_RTP_PROCESS_TYPE_GT,
XE_RTP_PROCESS_TYPE_ENGINE,
+ XE_RTP_PROCESS_TYPE_DEVICE,
};
struct xe_rtp_process_ctx {
union {
struct xe_gt *gt;
struct xe_hw_engine *hwe;
+ struct xe_device *xe;
};
enum xe_rtp_process_type type;
unsigned long *active_entries;
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index f51218a7a580..2cb2fab20070 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -11,6 +11,7 @@
#include <linux/fault-inject.h>
#include <generated/xe_wa_oob.h>
+#include <generated/xe_device_wa_oob.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
@@ -876,6 +877,13 @@ static __maybe_unused const struct xe_rtp_entry oob_was[] = {
static_assert(ARRAY_SIZE(oob_was) - 1 == _XE_WA_OOB_COUNT);
+static __maybe_unused const struct xe_rtp_entry device_oob_was[] = {
+#include <generated/xe_device_wa_oob.c>
+ {}
+};
+
+static_assert(ARRAY_SIZE(device_oob_was) - 1 == _XE_DEVICE_WA_OOB_COUNT);
+
__diag_pop();
/**
@@ -895,6 +903,39 @@ void xe_wa_process_oob(struct xe_gt *gt)
xe_rtp_process(&ctx, oob_was);
}
+int xe_device_wa_init(struct xe_device *xe)
+{
+ unsigned long *p;
+
+ p = drmm_kzalloc(&xe->drm,
+ sizeof(xe->oob) * BITS_TO_LONGS(ARRAY_SIZE(device_oob_was)),
+ GFP_KERNEL);
+
+ if (!p)
+ return -ENOMEM;
+
+ xe->oob = p;
+
+ return 0;
+}
+
+/**
+ * xe_device_wa_process_oob - process OOB workaround table
+ * @xe: xe device instance process workarounds for
+ *
+ * Process OOB workaround table for this platform, marking in @xe the
+ * workarounds that are active.
+ */
+void xe_device_wa_process_oob(struct xe_device *xe)
+{
+ struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(xe);
+
+ xe_rtp_process_ctx_enable_active_tracking(&ctx, xe->oob, ARRAY_SIZE(device_oob_was));
+
+ xe->oob_initialized = true;
+ xe_rtp_process(&ctx, device_oob_was);
+}
+
/**
* xe_wa_process_gt - process GT workaround table
* @gt: GT instance to process workarounds for
@@ -1000,6 +1041,11 @@ void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p)
for_each_set_bit(idx, gt->wa_active.oob, ARRAY_SIZE(oob_was))
if (oob_was[idx].name)
drm_printf_indent(p, 1, "%s\n", oob_was[idx].name);
+
+ drm_printf(p, "\nDevice OOB Workarounds\n");
+ for_each_set_bit(idx, gt_to_xe(gt)->oob, ARRAY_SIZE(device_oob_was))
+ if (device_oob_was[idx].name)
+ drm_printf_indent(p, 1, "%s\n", device_oob_was[idx].name);
}
/*
diff --git a/drivers/gpu/drm/xe/xe_wa.h b/drivers/gpu/drm/xe/xe_wa.h
index 52337405b5bc..09d065e0abb5 100644
--- a/drivers/gpu/drm/xe/xe_wa.h
+++ b/drivers/gpu/drm/xe/xe_wa.h
@@ -14,7 +14,9 @@ struct xe_hw_engine;
struct xe_tile;
int xe_wa_init(struct xe_gt *gt);
+int xe_device_wa_init(struct xe_device *xe);
void xe_wa_process_oob(struct xe_gt *gt);
+void xe_device_wa_process_oob(struct xe_device *xe);
void xe_wa_process_gt(struct xe_gt *gt);
void xe_wa_process_engine(struct xe_hw_engine *hwe);
void xe_wa_process_lrc(struct xe_hw_engine *hwe);
@@ -22,14 +24,24 @@ void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
/**
- * XE_WA - Out-of-band workarounds, that don't fit the lifecycle any
- * other more specific type
+ * XE_WA - Out-of-band GT workarounds, that don't fit the lifecycle any
+ * other more specific type,
* @gt__: gt instance
- * @id__: XE_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
+ * @id__: XE_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
*/
#define XE_WA(gt__, id__) ({ \
xe_gt_assert(gt__, (gt__)->wa_active.oob_initialized); \
test_bit(XE_WA_OOB_ ## id__, (gt__)->wa_active.oob); \
})
+/**
+ * XE_DEVICE_WA - Out-of-band Device workarounds, that don't fit the lifecycle any
+ * other more specific type
+ * @xe__: xe_device
+ * @id__: XE_SOC_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
+ */
+#define XE_DEVICE_WA(xe__, id__) ({ \
+ xe_assert(xe__, (xe__)->oob_initialized); \
+ test_bit(XE_DEVICE_WA_OOB_ ## id__, (xe__)->oob); \
+})
#endif
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds
2025-06-25 19:33 ` [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds Matt Atwood
@ 2025-06-25 19:51 ` Matt Roper
2025-06-25 20:39 ` Matt Roper
0 siblings, 1 reply; 13+ messages in thread
From: Matt Roper @ 2025-06-25 19:51 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe, lucas.demarchi, rodrigo.vivi
On Wed, Jun 25, 2025 at 12:33:37PM -0700, Matt Atwood wrote:
> Some workarounds need to be able to be applied ahead of any GT
> initialization for example 15015404425. This patch creates XE_DEVICE_WA
> macro, in the same vein as XE_WA. This macro can be used ahead of GT
> initialization, and can be tracked in sysfs. This should alleviate some
> of the complexities that exist in i915.
I'd be inclined to break this into two patches:
* A patch to RTP that adds devices as a new type of RTP context. This
should also add WARN_ON guards for all of the existing RTP rules that
require a gt (similar to those that exist for engines).
* A patch that adds the the the tracking information to xe_device and
calls the init/process functions at the appropriate place.
>
> v2: name change SoC to Device, address style issues
>
> Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> ---
> drivers/gpu/drm/xe/xe_device_types.h | 9 ++++++
> drivers/gpu/drm/xe/xe_pci.c | 4 +++
> drivers/gpu/drm/xe/xe_rtp.c | 5 +++
> drivers/gpu/drm/xe/xe_rtp.h | 3 +-
> drivers/gpu/drm/xe/xe_rtp_types.h | 2 ++
> drivers/gpu/drm/xe/xe_wa.c | 46 ++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_wa.h | 18 +++++++++--
> 7 files changed, 83 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index 6aca4b1a2824..62f09d2923c3 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -360,6 +360,15 @@ struct xe_device {
> u8 skip_pcode:1;
> } info;
>
> + /** @xe_active.oob: bitmap with active OOB workarounds */
> + unsigned long *oob;
> + /**
> + * @xe_active.oob_initialized: mark oob as initialized to help
> + * detecting misuse of XE_SOC_WA() - it can only be called on
> + * initialization after SOC OOB WAs have been processed
> + */
> + bool oob_initialized;
Did you mean to wrap these in a sub-struct? Because right now the
kerneldocs don't match the actual placement. Also the "SOC" stuff is
outdated.
> +
> /** @survivability: survivability information for device */
> struct xe_survivability survivability;
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 824461c31288..a9f708608f3e 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -32,6 +32,7 @@
> #include "xe_step.h"
> #include "xe_survivability_mode.h"
> #include "xe_tile.h"
> +#include "xe_wa.h"
>
> enum toggle_d3cold {
> D3COLD_DISABLE,
> @@ -832,6 +833,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (err)
> return err;
>
> + xe_device_wa_init(xe);
> + xe_device_wa_process_oob(xe);
> +
> err = xe_device_probe_early(xe);
> /*
> * In Boot Survivability mode, no drm card is exposed and driver
> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> index 29e694bb1219..2a0b0a1a8969 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.c
> +++ b/drivers/gpu/drm/xe/xe_rtp.c
> @@ -196,6 +196,11 @@ static void rtp_get_context(struct xe_rtp_process_ctx *ctx,
> *gt = (*hwe)->gt;
> *xe = gt_to_xe(*gt);
> break;
> + case XE_RTP_PROCESS_TYPE_DEVICE:
> + *hwe = NULL;
> + *gt = NULL;
> + *xe = ctx->xe;
> + break;
> }
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
> index 4fe736a11c42..ac260feaabef 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.h
> +++ b/drivers/gpu/drm/xe/xe_rtp.h
> @@ -422,7 +422,8 @@ struct xe_reg_sr;
>
> #define XE_RTP_PROCESS_CTX_INITIALIZER(arg__) _Generic((arg__), \
> struct xe_hw_engine * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_ENGINE }, \
> - struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT })
> + struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT }, \
> + struct xe_device * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_DEVICE })
>
> void xe_rtp_process_ctx_enable_active_tracking(struct xe_rtp_process_ctx *ctx,
> unsigned long *active_entries,
> diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
> index 1b76b947c706..123579ebf2cf 100644
> --- a/drivers/gpu/drm/xe/xe_rtp_types.h
> +++ b/drivers/gpu/drm/xe/xe_rtp_types.h
> @@ -112,12 +112,14 @@ struct xe_rtp_entry {
> enum xe_rtp_process_type {
> XE_RTP_PROCESS_TYPE_GT,
> XE_RTP_PROCESS_TYPE_ENGINE,
> + XE_RTP_PROCESS_TYPE_DEVICE,
> };
>
> struct xe_rtp_process_ctx {
> union {
> struct xe_gt *gt;
> struct xe_hw_engine *hwe;
> + struct xe_device *xe;
> };
> enum xe_rtp_process_type type;
> unsigned long *active_entries;
> diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> index f51218a7a580..2cb2fab20070 100644
> --- a/drivers/gpu/drm/xe/xe_wa.c
> +++ b/drivers/gpu/drm/xe/xe_wa.c
> @@ -11,6 +11,7 @@
> #include <linux/fault-inject.h>
>
> #include <generated/xe_wa_oob.h>
> +#include <generated/xe_device_wa_oob.h>
>
> #include "regs/xe_engine_regs.h"
> #include "regs/xe_gt_regs.h"
> @@ -876,6 +877,13 @@ static __maybe_unused const struct xe_rtp_entry oob_was[] = {
>
> static_assert(ARRAY_SIZE(oob_was) - 1 == _XE_WA_OOB_COUNT);
>
> +static __maybe_unused const struct xe_rtp_entry device_oob_was[] = {
> +#include <generated/xe_device_wa_oob.c>
> + {}
> +};
> +
> +static_assert(ARRAY_SIZE(device_oob_was) - 1 == _XE_DEVICE_WA_OOB_COUNT);
> +
> __diag_pop();
>
> /**
> @@ -895,6 +903,39 @@ void xe_wa_process_oob(struct xe_gt *gt)
> xe_rtp_process(&ctx, oob_was);
> }
>
> +int xe_device_wa_init(struct xe_device *xe)
We've been trying to be better about naming functions from xe_foo.c as
xe_foo_*(). So these new functions might be better with names like
xe_wa_device_init() and xe_wa_process_device_oob() and such.
At some point we should also probably go back and rename the existing GT
functions to include 'gt' in their names at the corresponding places.
> +{
> + unsigned long *p;
> +
> + p = drmm_kzalloc(&xe->drm,
> + sizeof(xe->oob) * BITS_TO_LONGS(ARRAY_SIZE(device_oob_was)),
> + GFP_KERNEL);
> +
> + if (!p)
> + return -ENOMEM;
> +
> + xe->oob = p;
> +
> + return 0;
> +}
> +
> +/**
> + * xe_device_wa_process_oob - process OOB workaround table
> + * @xe: xe device instance process workarounds for
> + *
> + * Process OOB workaround table for this platform, marking in @xe the
> + * workarounds that are active.
> + */
> +void xe_device_wa_process_oob(struct xe_device *xe)
> +{
> + struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(xe);
> +
> + xe_rtp_process_ctx_enable_active_tracking(&ctx, xe->oob, ARRAY_SIZE(device_oob_was));
> +
> + xe->oob_initialized = true;
> + xe_rtp_process(&ctx, device_oob_was);
> +}
> +
> /**
> * xe_wa_process_gt - process GT workaround table
> * @gt: GT instance to process workarounds for
> @@ -1000,6 +1041,11 @@ void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p)
> for_each_set_bit(idx, gt->wa_active.oob, ARRAY_SIZE(oob_was))
> if (oob_was[idx].name)
> drm_printf_indent(p, 1, "%s\n", oob_was[idx].name);
> +
> + drm_printf(p, "\nDevice OOB Workarounds\n");
> + for_each_set_bit(idx, gt_to_xe(gt)->oob, ARRAY_SIZE(device_oob_was))
> + if (device_oob_was[idx].name)
> + drm_printf_indent(p, 1, "%s\n", device_oob_was[idx].name);
This function generates the contents of a per-GT debugfs node. We don't
want to stick device workarounds at the bottom of a per-GT entry; we
should probably have a different debugfs entry outside the GT hierarchy
to report these. That would also ensure that we can track device
workarounds on platforms with no GTs and no GT debugfs (that's not
something that exists today, but there's been a lot of interest in
letting igpu's run in a "not GT" mode for debug purposes, so we'll
probably have it eventually).
> }
>
> /*
> diff --git a/drivers/gpu/drm/xe/xe_wa.h b/drivers/gpu/drm/xe/xe_wa.h
> index 52337405b5bc..09d065e0abb5 100644
> --- a/drivers/gpu/drm/xe/xe_wa.h
> +++ b/drivers/gpu/drm/xe/xe_wa.h
> @@ -14,7 +14,9 @@ struct xe_hw_engine;
> struct xe_tile;
>
> int xe_wa_init(struct xe_gt *gt);
> +int xe_device_wa_init(struct xe_device *xe);
> void xe_wa_process_oob(struct xe_gt *gt);
> +void xe_device_wa_process_oob(struct xe_device *xe);
> void xe_wa_process_gt(struct xe_gt *gt);
> void xe_wa_process_engine(struct xe_hw_engine *hwe);
> void xe_wa_process_lrc(struct xe_hw_engine *hwe);
> @@ -22,14 +24,24 @@ void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
> void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
>
> /**
> - * XE_WA - Out-of-band workarounds, that don't fit the lifecycle any
> - * other more specific type
> + * XE_WA - Out-of-band GT workarounds, that don't fit the lifecycle any
> + * other more specific type,
> * @gt__: gt instance
> - * @id__: XE_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
> + * @id__: XE_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
> */
> #define XE_WA(gt__, id__) ({ \
> xe_gt_assert(gt__, (gt__)->wa_active.oob_initialized); \
> test_bit(XE_WA_OOB_ ## id__, (gt__)->wa_active.oob); \
> })
>
> +/**
> + * XE_DEVICE_WA - Out-of-band Device workarounds, that don't fit the lifecycle any
> + * other more specific type
> + * @xe__: xe_device
> + * @id__: XE_SOC_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
The "SOC" here is outdated. Also the wrong header is referenced.
> + */
> +#define XE_DEVICE_WA(xe__, id__) ({ \
> + xe_assert(xe__, (xe__)->oob_initialized); \
> + test_bit(XE_DEVICE_WA_OOB_ ## id__, (xe__)->oob); \
> +})
> #endif
This is probably fine short-term, but I think eventually we should just
have a single XE_WA() call that _Generic()'s on its parameter to do the
lookup in the proper place (gt or device). If we don't want to _Generic
it for some reason, then the existing macro should probably get renamed
to XE_GT_WA() to clarify its purpose.
Matt
> --
> 2.49.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds
2025-06-25 19:51 ` Matt Roper
@ 2025-06-25 20:39 ` Matt Roper
0 siblings, 0 replies; 13+ messages in thread
From: Matt Roper @ 2025-06-25 20:39 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe, lucas.demarchi, rodrigo.vivi
On Wed, Jun 25, 2025 at 12:51:04PM -0700, Matt Roper wrote:
> On Wed, Jun 25, 2025 at 12:33:37PM -0700, Matt Atwood wrote:
> > Some workarounds need to be able to be applied ahead of any GT
> > initialization for example 15015404425. This patch creates XE_DEVICE_WA
> > macro, in the same vein as XE_WA. This macro can be used ahead of GT
> > initialization, and can be tracked in sysfs. This should alleviate some
> > of the complexities that exist in i915.
>
> I'd be inclined to break this into two patches:
>
> * A patch to RTP that adds devices as a new type of RTP context. This
> should also add WARN_ON guards for all of the existing RTP rules that
> require a gt (similar to those that exist for engines).
>
> * A patch that adds the the the tracking information to xe_device and
> calls the init/process functions at the appropriate place.
>
> >
> > v2: name change SoC to Device, address style issues
> >
> > Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_device_types.h | 9 ++++++
> > drivers/gpu/drm/xe/xe_pci.c | 4 +++
> > drivers/gpu/drm/xe/xe_rtp.c | 5 +++
> > drivers/gpu/drm/xe/xe_rtp.h | 3 +-
> > drivers/gpu/drm/xe/xe_rtp_types.h | 2 ++
> > drivers/gpu/drm/xe/xe_wa.c | 46 ++++++++++++++++++++++++++++
> > drivers/gpu/drm/xe/xe_wa.h | 18 +++++++++--
> > 7 files changed, 83 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> > index 6aca4b1a2824..62f09d2923c3 100644
> > --- a/drivers/gpu/drm/xe/xe_device_types.h
> > +++ b/drivers/gpu/drm/xe/xe_device_types.h
> > @@ -360,6 +360,15 @@ struct xe_device {
> > u8 skip_pcode:1;
> > } info;
> >
> > + /** @xe_active.oob: bitmap with active OOB workarounds */
> > + unsigned long *oob;
> > + /**
> > + * @xe_active.oob_initialized: mark oob as initialized to help
> > + * detecting misuse of XE_SOC_WA() - it can only be called on
> > + * initialization after SOC OOB WAs have been processed
> > + */
> > + bool oob_initialized;
>
> Did you mean to wrap these in a sub-struct? Because right now the
> kerneldocs don't match the actual placement. Also the "SOC" stuff is
> outdated.
>
> > +
> > /** @survivability: survivability information for device */
> > struct xe_survivability survivability;
> >
> > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> > index 824461c31288..a9f708608f3e 100644
> > --- a/drivers/gpu/drm/xe/xe_pci.c
> > +++ b/drivers/gpu/drm/xe/xe_pci.c
> > @@ -32,6 +32,7 @@
> > #include "xe_step.h"
> > #include "xe_survivability_mode.h"
> > #include "xe_tile.h"
> > +#include "xe_wa.h"
> >
> > enum toggle_d3cold {
> > D3COLD_DISABLE,
> > @@ -832,6 +833,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > if (err)
> > return err;
> >
> > + xe_device_wa_init(xe);
> > + xe_device_wa_process_oob(xe);
> > +
> > err = xe_device_probe_early(xe);
> > /*
> > * In Boot Survivability mode, no drm card is exposed and driver
> > diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> > index 29e694bb1219..2a0b0a1a8969 100644
> > --- a/drivers/gpu/drm/xe/xe_rtp.c
> > +++ b/drivers/gpu/drm/xe/xe_rtp.c
> > @@ -196,6 +196,11 @@ static void rtp_get_context(struct xe_rtp_process_ctx *ctx,
> > *gt = (*hwe)->gt;
> > *xe = gt_to_xe(*gt);
> > break;
> > + case XE_RTP_PROCESS_TYPE_DEVICE:
> > + *hwe = NULL;
> > + *gt = NULL;
> > + *xe = ctx->xe;
> > + break;
> > }
> > }
> >
> > diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
> > index 4fe736a11c42..ac260feaabef 100644
> > --- a/drivers/gpu/drm/xe/xe_rtp.h
> > +++ b/drivers/gpu/drm/xe/xe_rtp.h
> > @@ -422,7 +422,8 @@ struct xe_reg_sr;
> >
> > #define XE_RTP_PROCESS_CTX_INITIALIZER(arg__) _Generic((arg__), \
> > struct xe_hw_engine * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_ENGINE }, \
> > - struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT })
> > + struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT }, \
> > + struct xe_device * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_DEVICE })
> >
> > void xe_rtp_process_ctx_enable_active_tracking(struct xe_rtp_process_ctx *ctx,
> > unsigned long *active_entries,
> > diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
> > index 1b76b947c706..123579ebf2cf 100644
> > --- a/drivers/gpu/drm/xe/xe_rtp_types.h
> > +++ b/drivers/gpu/drm/xe/xe_rtp_types.h
> > @@ -112,12 +112,14 @@ struct xe_rtp_entry {
> > enum xe_rtp_process_type {
> > XE_RTP_PROCESS_TYPE_GT,
> > XE_RTP_PROCESS_TYPE_ENGINE,
> > + XE_RTP_PROCESS_TYPE_DEVICE,
> > };
> >
> > struct xe_rtp_process_ctx {
> > union {
> > struct xe_gt *gt;
> > struct xe_hw_engine *hwe;
> > + struct xe_device *xe;
> > };
> > enum xe_rtp_process_type type;
> > unsigned long *active_entries;
> > diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> > index f51218a7a580..2cb2fab20070 100644
> > --- a/drivers/gpu/drm/xe/xe_wa.c
> > +++ b/drivers/gpu/drm/xe/xe_wa.c
> > @@ -11,6 +11,7 @@
> > #include <linux/fault-inject.h>
> >
> > #include <generated/xe_wa_oob.h>
> > +#include <generated/xe_device_wa_oob.h>
> >
> > #include "regs/xe_engine_regs.h"
> > #include "regs/xe_gt_regs.h"
> > @@ -876,6 +877,13 @@ static __maybe_unused const struct xe_rtp_entry oob_was[] = {
> >
> > static_assert(ARRAY_SIZE(oob_was) - 1 == _XE_WA_OOB_COUNT);
> >
> > +static __maybe_unused const struct xe_rtp_entry device_oob_was[] = {
> > +#include <generated/xe_device_wa_oob.c>
> > + {}
> > +};
> > +
> > +static_assert(ARRAY_SIZE(device_oob_was) - 1 == _XE_DEVICE_WA_OOB_COUNT);
> > +
> > __diag_pop();
> >
> > /**
> > @@ -895,6 +903,39 @@ void xe_wa_process_oob(struct xe_gt *gt)
> > xe_rtp_process(&ctx, oob_was);
> > }
> >
> > +int xe_device_wa_init(struct xe_device *xe)
>
> We've been trying to be better about naming functions from xe_foo.c as
> xe_foo_*(). So these new functions might be better with names like
> xe_wa_device_init() and xe_wa_process_device_oob() and such.
>
> At some point we should also probably go back and rename the existing GT
> functions to include 'gt' in their names at the corresponding places.
>
> > +{
> > + unsigned long *p;
> > +
> > + p = drmm_kzalloc(&xe->drm,
> > + sizeof(xe->oob) * BITS_TO_LONGS(ARRAY_SIZE(device_oob_was)),
Overlooked this before...this winds up working because the size of a
pointer (xe->oob) is the same as the size of an unsigned long. But
logically we want to know the allocation size of each long in the array
here, so passing either *p or *xe->oob would be better (preferably *p
since that matches the coding pattern used pretty much everywhere in the
kernel).
Matt
> > + GFP_KERNEL);
> > +
> > + if (!p)
> > + return -ENOMEM;
> > +
> > + xe->oob = p;
> > +
> > + return 0;
> > +}
> > +
> > +/**
> > + * xe_device_wa_process_oob - process OOB workaround table
> > + * @xe: xe device instance process workarounds for
> > + *
> > + * Process OOB workaround table for this platform, marking in @xe the
> > + * workarounds that are active.
> > + */
> > +void xe_device_wa_process_oob(struct xe_device *xe)
> > +{
> > + struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(xe);
> > +
> > + xe_rtp_process_ctx_enable_active_tracking(&ctx, xe->oob, ARRAY_SIZE(device_oob_was));
> > +
> > + xe->oob_initialized = true;
> > + xe_rtp_process(&ctx, device_oob_was);
> > +}
> > +
> > /**
> > * xe_wa_process_gt - process GT workaround table
> > * @gt: GT instance to process workarounds for
> > @@ -1000,6 +1041,11 @@ void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p)
> > for_each_set_bit(idx, gt->wa_active.oob, ARRAY_SIZE(oob_was))
> > if (oob_was[idx].name)
> > drm_printf_indent(p, 1, "%s\n", oob_was[idx].name);
> > +
> > + drm_printf(p, "\nDevice OOB Workarounds\n");
> > + for_each_set_bit(idx, gt_to_xe(gt)->oob, ARRAY_SIZE(device_oob_was))
> > + if (device_oob_was[idx].name)
> > + drm_printf_indent(p, 1, "%s\n", device_oob_was[idx].name);
>
> This function generates the contents of a per-GT debugfs node. We don't
> want to stick device workarounds at the bottom of a per-GT entry; we
> should probably have a different debugfs entry outside the GT hierarchy
> to report these. That would also ensure that we can track device
> workarounds on platforms with no GTs and no GT debugfs (that's not
> something that exists today, but there's been a lot of interest in
> letting igpu's run in a "not GT" mode for debug purposes, so we'll
> probably have it eventually).
>
> > }
> >
> > /*
> > diff --git a/drivers/gpu/drm/xe/xe_wa.h b/drivers/gpu/drm/xe/xe_wa.h
> > index 52337405b5bc..09d065e0abb5 100644
> > --- a/drivers/gpu/drm/xe/xe_wa.h
> > +++ b/drivers/gpu/drm/xe/xe_wa.h
> > @@ -14,7 +14,9 @@ struct xe_hw_engine;
> > struct xe_tile;
> >
> > int xe_wa_init(struct xe_gt *gt);
> > +int xe_device_wa_init(struct xe_device *xe);
> > void xe_wa_process_oob(struct xe_gt *gt);
> > +void xe_device_wa_process_oob(struct xe_device *xe);
> > void xe_wa_process_gt(struct xe_gt *gt);
> > void xe_wa_process_engine(struct xe_hw_engine *hwe);
> > void xe_wa_process_lrc(struct xe_hw_engine *hwe);
> > @@ -22,14 +24,24 @@ void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
> > void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
> >
> > /**
> > - * XE_WA - Out-of-band workarounds, that don't fit the lifecycle any
> > - * other more specific type
> > + * XE_WA - Out-of-band GT workarounds, that don't fit the lifecycle any
> > + * other more specific type,
> > * @gt__: gt instance
> > - * @id__: XE_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
> > + * @id__: XE_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
> > */
> > #define XE_WA(gt__, id__) ({ \
> > xe_gt_assert(gt__, (gt__)->wa_active.oob_initialized); \
> > test_bit(XE_WA_OOB_ ## id__, (gt__)->wa_active.oob); \
> > })
> >
> > +/**
> > + * XE_DEVICE_WA - Out-of-band Device workarounds, that don't fit the lifecycle any
> > + * other more specific type
> > + * @xe__: xe_device
> > + * @id__: XE_SOC_WA_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
>
> The "SOC" here is outdated. Also the wrong header is referenced.
>
> > + */
> > +#define XE_DEVICE_WA(xe__, id__) ({ \
> > + xe_assert(xe__, (xe__)->oob_initialized); \
> > + test_bit(XE_DEVICE_WA_OOB_ ## id__, (xe__)->oob); \
> > +})
> > #endif
>
> This is probably fine short-term, but I think eventually we should just
> have a single XE_WA() call that _Generic()'s on its parameter to do the
> lookup in the proper place (gt or device). If we don't want to _Generic
> it for some reason, then the existing macro should probably get renamed
> to XE_GT_WA() to clarify its purpose.
>
>
> Matt
>
> > --
> > 2.49.0
> >
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
2025-06-25 19:33 ` [PATCH v3 1/5] drm/xe: add xe_device_wa infrastructure Matt Atwood
2025-06-25 19:33 ` [PATCH v3 2/5] drm/xe: Add infrastructure for Device OOB workarounds Matt Atwood
@ 2025-06-25 19:33 ` Matt Atwood
2025-06-25 19:57 ` Matt Roper
2025-06-25 19:33 ` [PATCH v3 4/5] drm/xe: extend Wa_15015404425 to apply to PTL Matt Atwood
` (3 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 19:33 UTC (permalink / raw)
To: intel-xe; +Cc: lucas.demarchi, matthew.d.roper, rodrigo.vivi, Matt Atwood
Move Wa_15015404425 to use the new implemented OOB macro XE_DEVICE_WA()
v2: rename from SoC to Device
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/xe/xe_device_wa_oob.rules | 1 +
drivers/gpu/drm/xe/xe_mmio.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
index e69de29bb2d1..b7d12ea4d65c 100644
--- a/drivers/gpu/drm/xe/xe_device_wa_oob.rules
+++ b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
@@ -0,0 +1 @@
+15015404425 PLATFORM(LUNARLAKE)
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7357458bc0d2..4990b3a47afd 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -22,6 +22,9 @@
#include "xe_macros.h"
#include "xe_sriov.h"
#include "xe_trace.h"
+#include "xe_wa.h"
+
+#include "generated/xe_soc_wa_oob.h"
static void tiles_fini(void *arg)
{
@@ -163,9 +166,6 @@ static void mmio_flush_pending_writes(struct xe_mmio *mmio)
#define DUMMY_REG_OFFSET 0x130030
int i;
- if (mmio->tile->xe->info.platform != XE_LUNARLAKE)
- return;
-
/* 4 dummy writes */
for (i = 0; i < 4; i++)
writel(0, mmio->regs + DUMMY_REG_OFFSET);
@@ -176,8 +176,8 @@ u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg)
u32 addr = xe_mmio_adjusted_addr(mmio, reg.addr);
u8 val;
- /* Wa_15015404425 */
- mmio_flush_pending_writes(mmio);
+ if (XE_DEVICE_WA(mmio->tile->xe, 15015404425))
+ mmio_flush_pending_writes(mmio);
val = readb(mmio->regs + addr);
trace_xe_reg_rw(mmio, false, addr, val, sizeof(val));
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro
2025-06-25 19:33 ` [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro Matt Atwood
@ 2025-06-25 19:57 ` Matt Roper
2025-06-25 20:08 ` Matt Atwood
0 siblings, 1 reply; 13+ messages in thread
From: Matt Roper @ 2025-06-25 19:57 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe, lucas.demarchi, rodrigo.vivi
On Wed, Jun 25, 2025 at 12:33:38PM -0700, Matt Atwood wrote:
> Move Wa_15015404425 to use the new implemented OOB macro XE_DEVICE_WA()
>
> v2: rename from SoC to Device
>
> Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> ---
> drivers/gpu/drm/xe/xe_device_wa_oob.rules | 1 +
> drivers/gpu/drm/xe/xe_mmio.c | 10 +++++-----
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> index e69de29bb2d1..b7d12ea4d65c 100644
> --- a/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> @@ -0,0 +1 @@
> +15015404425 PLATFORM(LUNARLAKE)
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 7357458bc0d2..4990b3a47afd 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -22,6 +22,9 @@
> #include "xe_macros.h"
> #include "xe_sriov.h"
> #include "xe_trace.h"
> +#include "xe_wa.h"
> +
> +#include "generated/xe_soc_wa_oob.h"
Isn't this the wrong header name?
>
> static void tiles_fini(void *arg)
> {
> @@ -163,9 +166,6 @@ static void mmio_flush_pending_writes(struct xe_mmio *mmio)
> #define DUMMY_REG_OFFSET 0x130030
> int i;
>
> - if (mmio->tile->xe->info.platform != XE_LUNARLAKE)
> - return;
> -
> /* 4 dummy writes */
> for (i = 0; i < 4; i++)
> writel(0, mmio->regs + DUMMY_REG_OFFSET);
> @@ -176,8 +176,8 @@ u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg)
> u32 addr = xe_mmio_adjusted_addr(mmio, reg.addr);
> u8 val;
>
> - /* Wa_15015404425 */
> - mmio_flush_pending_writes(mmio);
> + if (XE_DEVICE_WA(mmio->tile->xe, 15015404425))
> + mmio_flush_pending_writes(mmio);
Moving the check out of the function to the callsite seems fine to me,
but we need to do it at all the callsites, not just read8.
Also, you have a typo in the patch subject line (s/EX/XE/).
Matt
>
> val = readb(mmio->regs + addr);
> trace_xe_reg_rw(mmio, false, addr, val, sizeof(val));
> --
> 2.49.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro
2025-06-25 19:57 ` Matt Roper
@ 2025-06-25 20:08 ` Matt Atwood
0 siblings, 0 replies; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 20:08 UTC (permalink / raw)
To: Matt Roper, intel-xe; +Cc: intel-xe, lucas.demarchi, rodrigo.vivi
On Wed, Jun 25, 2025 at 12:57:16PM -0700, Matt Roper wrote:
> On Wed, Jun 25, 2025 at 12:33:38PM -0700, Matt Atwood wrote:
> > Move Wa_15015404425 to use the new implemented OOB macro XE_DEVICE_WA()
> >
> > v2: rename from SoC to Device
> >
> > Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_device_wa_oob.rules | 1 +
> > drivers/gpu/drm/xe/xe_mmio.c | 10 +++++-----
> > 2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> > index e69de29bb2d1..b7d12ea4d65c 100644
> > --- a/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> > +++ b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
> > @@ -0,0 +1 @@
> > +15015404425 PLATFORM(LUNARLAKE)
> > diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> > index 7357458bc0d2..4990b3a47afd 100644
> > --- a/drivers/gpu/drm/xe/xe_mmio.c
> > +++ b/drivers/gpu/drm/xe/xe_mmio.c
> > @@ -22,6 +22,9 @@
> > #include "xe_macros.h"
> > #include "xe_sriov.h"
> > #include "xe_trace.h"
> > +#include "xe_wa.h"
> > +
> > +#include "generated/xe_soc_wa_oob.h"
>
> Isn't this the wrong header name?
Yes
>
> >
> > static void tiles_fini(void *arg)
> > {
> > @@ -163,9 +166,6 @@ static void mmio_flush_pending_writes(struct xe_mmio *mmio)
> > #define DUMMY_REG_OFFSET 0x130030
> > int i;
> >
> > - if (mmio->tile->xe->info.platform != XE_LUNARLAKE)
> > - return;
> > -
> > /* 4 dummy writes */
> > for (i = 0; i < 4; i++)
> > writel(0, mmio->regs + DUMMY_REG_OFFSET);
> > @@ -176,8 +176,8 @@ u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg)
> > u32 addr = xe_mmio_adjusted_addr(mmio, reg.addr);
> > u8 val;
> >
> > - /* Wa_15015404425 */
> > - mmio_flush_pending_writes(mmio);
> > + if (XE_DEVICE_WA(mmio->tile->xe, 15015404425))
> > + mmio_flush_pending_writes(mmio);
>
> Moving the check out of the function to the callsite seems fine to me,
> but we need to do it at all the callsites, not just read8.
>
> Also, you have a typo in the patch subject line (s/EX/XE/).
>
>
> Matt
>
> >
> > val = readb(mmio->regs + addr);
> > trace_xe_reg_rw(mmio, false, addr, val, sizeof(val));
> > --
> > 2.49.0
> >
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 4/5] drm/xe: extend Wa_15015404425 to apply to PTL
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
` (2 preceding siblings ...)
2025-06-25 19:33 ` [PATCH v3 3/5] drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro Matt Atwood
@ 2025-06-25 19:33 ` Matt Atwood
2025-06-25 19:33 ` [PATCH v3 5/5] drm/xe: disable wa_15015404425 for PTL B0 Matt Atwood
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 19:33 UTC (permalink / raw)
To: intel-xe; +Cc: lucas.demarchi, matthew.d.roper, rodrigo.vivi, Matt Atwood
Wa_15015404425 needs to be applied to PTL A0 to B0, a subsequent patch
will address the complexity required to do this. For now apply to PTL as
a whole.
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/xe/xe_device_wa_oob.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
index b7d12ea4d65c..3a0c4ccc4224 100644
--- a/drivers/gpu/drm/xe/xe_device_wa_oob.rules
+++ b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
@@ -1 +1,2 @@
15015404425 PLATFORM(LUNARLAKE)
+ PLATFORM(PANTHERLAKE)
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v3 5/5] drm/xe: disable wa_15015404425 for PTL B0
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
` (3 preceding siblings ...)
2025-06-25 19:33 ` [PATCH v3 4/5] drm/xe: extend Wa_15015404425 to apply to PTL Matt Atwood
@ 2025-06-25 19:33 ` Matt Atwood
2025-06-25 20:33 ` Matt Roper
2025-06-25 19:39 ` ✗ CI.checkpatch: warning for drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2) Patchwork
2025-06-25 19:39 ` ✗ CI.KUnit: failure " Patchwork
6 siblings, 1 reply; 13+ messages in thread
From: Matt Atwood @ 2025-06-25 19:33 UTC (permalink / raw)
To: intel-xe; +Cc: lucas.demarchi, matthew.d.roper, rodrigo.vivi, Matt Atwood
This workaround only applies to PTL Compute Die A0. The reality of
modern platforms is we're Multi Chip Packages with logic spread across
multiple dies. Because this information is not available during PCI
probe it becomes a bit more complicated.
This workaround needs to be applied on PTL until we prove that we are
not Compute Die A0 stepping without reading any MMIOs. So use the new
XE_DEVICE_WA infrastructure to apply early, until we can determine our
stepping.
There are at least two ways to determine Compute Die stepping. This
patch uses the Media GT stepping to map to Compute Die stepping, in this
case Compute and Media dies step synchronously.
Since we're using the Media GT information to determine Compute Die
stepping, use the XE_WA and the oob infrastructure to come back and
toggle the workaround off when we know its safe, and after GT init.
v2: rename SoC to device, avoid null pointer dereference, update commit
message.
v3: rebase
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/xe/xe_pci.c | 7 +++++++
drivers/gpu/drm/xe/xe_wa_oob.rules | 2 ++
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index a9f708608f3e..a294a1b26d8f 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -34,6 +34,9 @@
#include "xe_tile.h"
#include "xe_wa.h"
+#include "generated/xe_wa_oob.h"
+#include "generated/xe_device_wa_oob.h"
+
enum toggle_d3cold {
D3COLD_DISABLE,
D3COLD_ENABLE,
@@ -896,6 +899,10 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
drm_dbg(&xe->drm, "d3cold: capable=%s\n",
str_yes_no(xe->d3cold.capable));
+ if (xe->tiles->media_gt != NULL &&
+ XE_WA(xe->tiles->media_gt, 15015404425_disable))
+ xe->oob[XE_DEVICE_WA_OOB_15015404425] = 0;
+
return 0;
err_driver_cleanup:
diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
index 96cc33da0fb5..255e67113406 100644
--- a/drivers/gpu/drm/xe/xe_wa_oob.rules
+++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
@@ -70,3 +70,5 @@ no_media_l3 MEDIA_VERSION(3000)
# SoC workaround - currently applies to all platforms with the following
# primary GT GMDID
14022085890 GRAPHICS_VERSION(2001)
+
+15015404425_disable PLATFORM(PANTHERLAKE), MEDIA_STEP(B0, FOREVER)
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v3 5/5] drm/xe: disable wa_15015404425 for PTL B0
2025-06-25 19:33 ` [PATCH v3 5/5] drm/xe: disable wa_15015404425 for PTL B0 Matt Atwood
@ 2025-06-25 20:33 ` Matt Roper
0 siblings, 0 replies; 13+ messages in thread
From: Matt Roper @ 2025-06-25 20:33 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe, lucas.demarchi, rodrigo.vivi
On Wed, Jun 25, 2025 at 12:33:40PM -0700, Matt Atwood wrote:
> This workaround only applies to PTL Compute Die A0. The reality of
Nitpick: it would be better to just say "A-step" rather than A0 since
that's what we're implementing. The workaround is documented as no
longer being necessary from B0 onward, so "A-step" also covers any A1,
A2, etc. steppings (which may or may not exist) and matches how the
code is written.
> modern platforms is we're Multi Chip Packages with logic spread across
> multiple dies. Because this information is not available during PCI
> probe it becomes a bit more complicated.
>
> This workaround needs to be applied on PTL until we prove that we are
> not Compute Die A0 stepping without reading any MMIOs. So use the new
> XE_DEVICE_WA infrastructure to apply early, until we can determine our
> stepping.
It looks like you copied a lot of the text I wrote on an earlier review,
which was just meant for general discussion, not a long-term record of
the change. To be more clear to people reading the commit message and
trying to understand this down the road, it might be better to elaborate
a bit. Maybe something along the lines of:
Wa_15015404425 only needs to be applied on PTL platforms with an
A-step compute die. There's no direct way to map the PCI revid into
a compute die stepping, so the suggested way to figure this out is
by inspecting the media IP's stepping since on PTL the media IP
resides on the compute die. For PTL, the compute die has an A
stepping if and only if the media IP is also A-step (this
relationship isn't something guaranteed to always be true, but it
works out this way on PTL).
Unfortunately there's a bit of a chicken-and-egg problem here;
Wa_15015404425 requires that all register reads be preceded by four
dummy MMIO writes (including during early driver init and even
pre-OS firmware), but the driver needs to perform some MMIO reads
(including the GMD_ID register that holds the media IP version)
before we can determine the media stepping. To handle this safely,
we need to just assume Wa_15015404425 always applies on PTL during
the early parts of device probe, and then go back later and
deactivate the workaround if we determine that we're running on a
later stepping that doesn't require the workaround.
So we implement the overall solution as two workarounds in the
driver:
* 15015404425 - a device OOB workaround that's always active on PTL
* 15015404425_disable - a GT OOB workaround that applies to PTL
platforms with a B0 or later media stepping
The former workaround guards the extra dummy MMIO writes we do when
reading registers, and the latter workaround guards logic that
disables the former once we have the necessary information later in
the probe process.
>
> There are at least two ways to determine Compute Die stepping. This
> patch uses the Media GT stepping to map to Compute Die stepping, in this
> case Compute and Media dies step synchronously.
>
> Since we're using the Media GT information to determine Compute Die
> stepping, use the XE_WA and the oob infrastructure to come back and
> toggle the workaround off when we know its safe, and after GT init.
>
> v2: rename SoC to device, avoid null pointer dereference, update commit
> message.
> v3: rebase
>
> Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 7 +++++++
> drivers/gpu/drm/xe/xe_wa_oob.rules | 2 ++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index a9f708608f3e..a294a1b26d8f 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -34,6 +34,9 @@
> #include "xe_tile.h"
> #include "xe_wa.h"
>
> +#include "generated/xe_wa_oob.h"
> +#include "generated/xe_device_wa_oob.h"
> +
> enum toggle_d3cold {
> D3COLD_DISABLE,
> D3COLD_ENABLE,
> @@ -896,6 +899,10 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> drm_dbg(&xe->drm, "d3cold: capable=%s\n",
> str_yes_no(xe->d3cold.capable));
>
> + if (xe->tiles->media_gt != NULL &&
> + XE_WA(xe->tiles->media_gt, 15015404425_disable))
> + xe->oob[XE_DEVICE_WA_OOB_15015404425] = 0;
xe->oob is a bitmask; you're clobbering a whole word here which isn't
what you want to do (and will probably go way past the end of the
bitmask as well). We really shouldn't be mucking with the internals of
the bitmask here anyway; we should have a documented interface from
xe_rtp that allows a workaround to be disabled, and then use that here.
Also note that the condition here can also be simplified slightly if you
use the suggestion below.
> +
> return 0;
>
> err_driver_cleanup:
> diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
> index 96cc33da0fb5..255e67113406 100644
> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
> @@ -70,3 +70,5 @@ no_media_l3 MEDIA_VERSION(3000)
> # SoC workaround - currently applies to all platforms with the following
> # primary GT GMDID
> 14022085890 GRAPHICS_VERSION(2001)
> +
> +15015404425_disable PLATFORM(PANTHERLAKE), MEDIA_STEP(B0, FOREVER)
If you use MEDIA_VERSION_ANY_GT() here, then you could make this one
a device workaround as well (since it wouldn't need any specific GT
structures to lookup the media version, as long as we're past the point
where the driver looked those up). It would also have the advantage of
keeping both 15015404425 and 15015404425_disable together in the rules
file. Note that if you do this, you'll need to adjust the suggested
commit message text I wrote above accordingly.
Matt
> --
> 2.49.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ CI.checkpatch: warning for drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2)
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
` (4 preceding siblings ...)
2025-06-25 19:33 ` [PATCH v3 5/5] drm/xe: disable wa_15015404425 for PTL B0 Matt Atwood
@ 2025-06-25 19:39 ` Patchwork
2025-06-25 19:39 ` ✗ CI.KUnit: failure " Patchwork
6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2025-06-25 19:39 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe
== Series Details ==
Series: drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2)
URL : https://patchwork.freedesktop.org/series/150777/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
f8ff75ae1d2127635239b134695774ed4045d05b
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 8745f5a69fcda58c554f9f0e5e5bdc29cc3cb12a
Author: Matt Atwood <matthew.s.atwood@intel.com>
Date: Wed Jun 25 12:33:40 2025 -0700
drm/xe: disable wa_15015404425 for PTL B0
This workaround only applies to PTL Compute Die A0. The reality of
modern platforms is we're Multi Chip Packages with logic spread across
multiple dies. Because this information is not available during PCI
probe it becomes a bit more complicated.
This workaround needs to be applied on PTL until we prove that we are
not Compute Die A0 stepping without reading any MMIOs. So use the new
XE_DEVICE_WA infrastructure to apply early, until we can determine our
stepping.
There are at least two ways to determine Compute Die stepping. This
patch uses the Media GT stepping to map to Compute Die stepping, in this
case Compute and Media dies step synchronously.
Since we're using the Media GT information to determine Compute Die
stepping, use the XE_WA and the oob infrastructure to come back and
toggle the workaround off when we know its safe, and after GT init.
v2: rename SoC to device, avoid null pointer dereference, update commit
message.
v3: rebase
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
+ /mt/dim checkpatch 74f3ed8bab4e5ef51f1c266e8c7ffd1f2a052a73 drm-intel
22a4dc42eab7 drm/xe: add xe_device_wa infrastructure
-:42: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#42:
new file mode 100644
-:73: CHECK:BOOL_COMPARISON: Using comparison to false is error prone
#73: FILE: drivers/gpu/drm/xe/xe_gen_wa_oob.c:99:
+ if (device == false)
-:86: CHECK:BOOL_COMPARISON: Using comparison to false is error prone
#86: FILE: drivers/gpu/drm/xe/xe_gen_wa_oob.c:123:
+ if (device == false)
-:99: WARNING:LINE_SPACING: Missing a blank line after declarations
#99: FILE: drivers/gpu/drm/xe/xe_gen_wa_oob.c:166:
+ char *device = strstr(args[ARGS_CHEADER].fn, "device_");
+ if (device == NULL)
-:99: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!device"
#99: FILE: drivers/gpu/drm/xe/xe_gen_wa_oob.c:166:
+ if (device == NULL)
-:104: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "device"
#104: FILE: drivers/gpu/drm/xe/xe_gen_wa_oob.c:171:
+ bool prefix = device != NULL ? true : false;
total: 0 errors, 2 warnings, 4 checks, 78 lines checked
347eaf10ed50 drm/xe: Add infrastructure for Device OOB workarounds
-:83: WARNING:LONG_LINE: line length of 113 exceeds 100 columns
#83: FILE: drivers/gpu/drm/xe/xe_rtp.h:425:
+ struct xe_gt * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_GT }, \
-:84: WARNING:LONG_LINE: line length of 111 exceeds 100 columns
#84: FILE: drivers/gpu/drm/xe/xe_rtp.h:426:
+ struct xe_device * : (struct xe_rtp_process_ctx){ { (void *)(arg__) }, XE_RTP_PROCESS_TYPE_DEVICE })
-:222: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'xe__' - possible side-effects?
#222: FILE: drivers/gpu/drm/xe/xe_wa.h:43:
+#define XE_DEVICE_WA(xe__, id__) ({ \
+ xe_assert(xe__, (xe__)->oob_initialized); \
+ test_bit(XE_DEVICE_WA_OOB_ ## id__, (xe__)->oob); \
+})
total: 0 errors, 2 warnings, 1 checks, 171 lines checked
4fba0ac8b6b7 drm/xe: Move Wa_15015404425 to use the new EX_DEVICE_WA macro
88f6fc810099 drm/xe: extend Wa_15015404425 to apply to PTL
8745f5a69fcd drm/xe: disable wa_15015404425 for PTL B0
-:48: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "xe->tiles->media_gt"
#48: FILE: drivers/gpu/drm/xe/xe_pci.c:902:
+ if (xe->tiles->media_gt != NULL &&
total: 0 errors, 0 warnings, 1 checks, 24 lines checked
^ permalink raw reply [flat|nested] 13+ messages in thread* ✗ CI.KUnit: failure for drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2)
2025-06-25 19:33 [PATCH v2 0/5] drm/xe: Create and use XE_DEVICE_WA infrastructure Matt Atwood
` (5 preceding siblings ...)
2025-06-25 19:39 ` ✗ CI.checkpatch: warning for drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2) Patchwork
@ 2025-06-25 19:39 ` Patchwork
6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2025-06-25 19:39 UTC (permalink / raw)
To: Matt Atwood; +Cc: intel-xe
== Series Details ==
Series: drm/xe: Create and use XE_DEVICE_WA infrastructure (rev2)
URL : https://patchwork.freedesktop.org/series/150777/
State : failure
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
ERROR:root:../drivers/gpu/drm/xe/xe_mmio.c:27:10: fatal error: generated/xe_soc_wa_oob.h: No such file or directory
27 | #include "generated/xe_soc_wa_oob.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[7]: *** [../scripts/Makefile.build:287: drivers/gpu/drm/xe/xe_mmio.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [../scripts/Makefile.build:554: drivers/gpu/drm/xe] Error 2
make[5]: *** [../scripts/Makefile.build:554: drivers/gpu/drm] Error 2
make[4]: *** [../scripts/Makefile.build:554: drivers/gpu] Error 2
make[3]: *** [../scripts/Makefile.build:554: drivers] Error 2
make[2]: *** [/kernel/Makefile:2003: .] Error 2
make[1]: *** [/kernel/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
[19:39:02] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[19:39:06] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 13+ messages in thread