[PATCH v4 3/5] drm/xe: Move Wa_15015404425 to use the new XE_DEVICE_WA macro

Lucas De Marchi lucas.demarchi at intel.com
Thu Jun 26 22:37:10 UTC 2025


On Wed, Jun 25, 2025 at 01:07:48PM -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 at 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)

I was wondering how you'd match a "device" WA. It seems the only thing
we can use is PLATFORM. Maybe we should error out if a match that
doesn't make sense is used?

>diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
>index 7357458bc0d2..8226b220940f 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_device_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);

why move the check. There are 2 other calls mmio_flush_pending_writes()
that are now not protected: see the read16 and read32 impl.

Lucas De Marchi

>
> 	val = readb(mmio->regs + addr);
> 	trace_xe_reg_rw(mmio, false, addr, val, sizeof(val));
>-- 
>2.49.0
>


More information about the Intel-xe mailing list