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

Matt Roper matthew.d.roper at intel.com
Wed Jun 25 19:57:16 UTC 2025


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 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)
> 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


More information about the Intel-xe mailing list