From: Matt Atwood <matthew.s.atwood@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>,
<tejas.upadhyay@intel.com>, <lucas.demarchi@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: "Upadhyay, Tejas" <tejas.upadhyay@intel.com>,
"De Marchi, Lucas" <lucas.demarchi@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe/xe3: Extend wa_15015404425 for xe3
Date: Fri, 7 Feb 2025 09:03:23 -0800 [thread overview]
Message-ID: <Z6Y827Qs2KON-H0P@msatwood-mobl> (raw)
In-Reply-To: <20250207162406.GW5109@mdroper-desk1.amr.corp.intel.com>
On Fri, Feb 07, 2025 at 08:24:06AM -0800, Matt Roper wrote:
> On Thu, Feb 06, 2025 at 08:56:32PM -0800, Upadhyay, Tejas wrote:
> >
> >
> > > -----Original Message-----
> > > From: De Marchi, Lucas <lucas.demarchi@intel.com>
> > > Sent: Friday, February 7, 2025 5:03 AM
> > > To: Atwood, Matthew S <matthew.s.atwood@intel.com>
> > > Cc: Roper, Matthew D <matthew.d.roper@intel.com>; intel-
> > > xe@lists.freedesktop.org; Upadhyay, Tejas <tejas.upadhyay@intel.com>
> > > Subject: Re: [PATCH] drm/xe/xe3: Extend wa_15015404425 for xe3
> > >
> > > On Thu, Feb 06, 2025 at 09:12:49AM -0800, Matt Atwood wrote:
> > > >On Thu, Jan 30, 2025 at 09:30:30AM -0800, Matt Roper wrote:
> > > >> On Tue, Jan 28, 2025 at 04:55:51PM -0800, Matt Atwood wrote:
> > > >> > From: Tejas Upadhyay <tejas.upadhyay@intel.com>
> > > >> >
> > > >> > wa_15015404425 applies to xe3 A0 step as well.
> > > >>
> > > >> We really need a better commit message explaining how this workaround
> > > >> is different from our usual ones and why it needs to be handled in a
> > > >> special way that's different from all of our other workarounds,
> > > >> especially since someone who just quickly skims the workaround
> > > >> database without digging into the details is going to incorrectly
> > > >> think this just applies to Xe2 media and isn't relevant to PTL.
> > > >Ack.
> > > >>
> > > >> I was kind of hoping we'd add a more well-defined infrastructure for
> > > >> handling device / SoC workarounds. Adding quick hacks like this is
> > > >> going to get out of hand quickly if more of these start showing up.
> > > >Any particular ideas here?
> > >
> > > at the very least, use XE_WA(). You may need to extend the matches it knows
> > > about to implement what you need here.
> >
> > As far as I remember, init of wa_oob was little late so we could not use XE_WA. I am not sure if init wa_oob moved elsewhere and we are good here!
> >
> > I was seeing below assert and thus we decided to go with what we have here,
> >
> > It asserts,
> > [ 778.229096] xe 0000:00:02.0: [drm] [drm] Assertion `(gt)->wa_active.oob_initialized` failed!
> > platform: LUNARLAKE subplatform: 1
> > graphics: (null) 0.00 step **
> > media: (null) 0.00 step **
> > tile: 0 VRAM 0 B
> > GT: 0 type 0
> > [ 778.229121] WARNING: CPU: 1 PID: 1567 at drivers/gpu/drm/xe/xe_mmio.c:133 mmio_flush_pending_writes+0x33d/0x350 [xe]
>
> You can't use XE_WA unmodified since it's currently GT-centric and
> relies on various stuff in the GT already being initialized, as you see
> above. However you can either extend it to also support device-level
> workarounds, or at least create a similar XE_DEVICE_WA() framework that
> works in a similar way. Device workarounds ultimately depend on the
> platform and an SoC stepping derived from the PCI revid, and that
> information is immediately available on probe without needing to bring
> up the GTs.
Ack.
>
>
> Matt
>
> >
> > Tejas
> > >
> > > Lucas De Marchi
> > >
> > > >+Lucas
> > > >>
> > > >>
> > > >> Matt
> > > >>
> > > >> >
> > > >> > v2: query based off SOC stepping
> > > >> >
> > > >> > Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
> > > >> > Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> > > >> > ---
> > > >> > drivers/gpu/drm/xe/xe_mmio.c | 13 +++++++------
> > > >> > drivers/gpu/drm/xe/xe_step.h | 2 ++
> > > >> > 2 files changed, 9 insertions(+), 6 deletions(-)
> > > >> >
> > > >> > diff --git a/drivers/gpu/drm/xe/xe_mmio.c
> > > >> > b/drivers/gpu/drm/xe/xe_mmio.c index d321a21aacf0..98d068ad33bb
> > > >> > 100644
> > > >> > --- a/drivers/gpu/drm/xe/xe_mmio.c
> > > >> > +++ b/drivers/gpu/drm/xe/xe_mmio.c
> > > >> > @@ -150,14 +150,15 @@ int xe_mmio_init(struct xe_device *xe)
> > > >> > static void mmio_flush_pending_writes(struct xe_mmio *mmio) {
> > > >> > #define DUMMY_REG_OFFSET 0x130030
> > > >> > + struct xe_device *xe = tile_to_xe(mmio->tile);
> > > >> > 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);
> > > >> > + if (xe->info.platform == XE_LUNARLAKE ||
> > > >> > + (xe->info.platform == XE_PANTHERLAKE &&
> > > >> > + xe->info.revid == PTL_SOC_STEP_A0))
> > > >> > + /* 4 dummy writes */
> > > >> > + for (i = 0; i < 4; i++)
> > > >> > + writel(0, mmio->regs + DUMMY_REG_OFFSET);
> > > >> > }
> > > >> >
> > > >> > u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg) diff
> > > >> > --git a/drivers/gpu/drm/xe/xe_step.h b/drivers/gpu/drm/xe/xe_step.h
> > > >> > index 686cb59200c2..879486a818e9 100644
> > > >> > --- a/drivers/gpu/drm/xe/xe_step.h
> > > >> > +++ b/drivers/gpu/drm/xe/xe_step.h
> > > >> > @@ -20,4 +20,6 @@ static inline u32 xe_step_to_gmdid(enum xe_step
> > > >> > step) { return step - STEP_A0; }
> > > >> >
> > > >> > const char *xe_step_name(enum xe_step step);
> > > >> >
> > > >> > +#define PTL_SOC_STEP_A0 0x0
> > > >> > +
> > > >> > #endif
> > > >> > --
> > > >> > 2.45.0
> > > >> >
> > > >>
> > > >> --
> > > >> Matt Roper
> > > >> Graphics Software Engineer
> > > >> Linux GPU Platform Enablement
> > > >> Intel Corporation
>
> --
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation
prev parent reply other threads:[~2025-02-07 17:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 0:55 [PATCH] drm/xe/xe3: Extend wa_15015404425 for xe3 Matt Atwood
2025-01-29 2:19 ` ✓ CI.Patch_applied: success for " Patchwork
2025-01-29 2:19 ` ✓ CI.checkpatch: " Patchwork
2025-01-29 2:21 ` ✓ CI.KUnit: " Patchwork
2025-01-29 2:37 ` ✓ CI.Build: " Patchwork
2025-01-29 2:39 ` ✗ CI.Hooks: failure " Patchwork
2025-01-29 2:41 ` ✓ CI.checksparse: success " Patchwork
2025-01-29 3:00 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-29 16:38 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-30 17:30 ` [PATCH] " Matt Roper
2025-02-06 17:12 ` Matt Atwood
2025-02-06 23:33 ` Lucas De Marchi
2025-02-07 4:56 ` Upadhyay, Tejas
2025-02-07 16:24 ` Matt Roper
2025-02-07 17:03 ` Matt Atwood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z6Y827Qs2KON-H0P@msatwood-mobl \
--to=matthew.s.atwood@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=tejas.upadhyay@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox