From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
Date: Mon, 22 Jul 2019 12:41:36 +0100 [thread overview]
Message-ID: <65da19be-2696-8d60-e055-63a37101cf6b@linux.intel.com> (raw)
In-Reply-To: <20190720143132.17522-1-chris@chris-wilson.co.uk>
On 20/07/2019 15:31, Chris Wilson wrote:
> Enabling atomic operations in L3 leads to unrecoverable GPU hangs, as
> the machine stops responding milliseconds after receipt of the reset
> request [GDRT]. By disabling the cached atomics, the hang do not occur
> and we presume the GPU would reset normally for similar hangs.
>
> Reported-by: Jason Ekstrand <jason@jlekstrand.net>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110998
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jason Ekstrand <jason@jlekstrand.net>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> ---
> Jason reports that Windows is not clearing L3SQCREG4:22 and does not
> suffer the same GPU hang so it is likely some other w/a that interacts
> badly. Fwiw, these 3 are the only registers I could find that mention
> atomic ops (and appear to be part of the same chain for memory access).
Bit-toggling itself looks fine to me and matches what I could find in
the docs. (All three bits across three registers should be equal.)
What I am curious about is what are the other consequences of disabling
L3 atomics? Performance drop somewhere?
Regards,
Tvrtko
> ---
> drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++
> drivers/gpu/drm/i915/i915_reg.h | 7 +++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 704ace01e7f5..ac94ed3ba7b6 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1349,6 +1349,14 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
> wa_write_or(wal,
> GEN8_L3SQCREG4,
> GEN8_LQSC_FLUSH_COHERENT_LINES);
> +
> + /* Disable atomics in L3 to prevent unrecoverable hangs */
> + wa_write_masked_or(wal, GEN9_SCRATCH_LNCF1,
> + GEN9_LNCF_NONIA_COHERENT_ATOMICS_ENABLE, 0);
> + wa_write_masked_or(wal, GEN8_L3SQCREG4,
> + GEN8_LQSQ_NONIA_COHERENT_ATOMICS_ENABLE, 0);
> + wa_write_masked_or(wal, GEN9_SCRATCH1,
> + EVICTION_PERF_FIX_ENABLE, 0);
> }
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 24f2a52a2b42..e23b2200e7fc 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -7728,6 +7728,7 @@ enum {
> #define GEN11_LQSC_CLEAN_EVICT_DISABLE (1 << 6)
> #define GEN8_LQSC_RO_PERF_DIS (1 << 27)
> #define GEN8_LQSC_FLUSH_COHERENT_LINES (1 << 21)
> +#define GEN8_LQSQ_NONIA_COHERENT_ATOMICS_ENABLE REG_BIT(22)
>
> /* GEN8 chicken */
> #define HDC_CHICKEN0 _MMIO(0x7300)
> @@ -11202,6 +11203,12 @@ enum skl_power_gate {
> /* Media decoder 2 MOCS registers */
> #define GEN11_MFX2_MOCS(i) _MMIO(0x10000 + (i) * 4)
>
> +#define GEN9_SCRATCH_LNCF1 _MMIO(0xb008)
> +#define GEN9_LNCF_NONIA_COHERENT_ATOMICS_ENABLE REG_BIT(0)
> +
> +#define GEN9_SCRATCH1 _MMIO(0xb11c)
> +#define EVICTION_PERF_FIX_ENABLE REG_BIT(8)
> +
> #define GEN10_SCRATCH_LNCF2 _MMIO(0xb0a0)
> #define PMFLUSHDONE_LNICRSDROP (1 << 20)
> #define PMFLUSH_GAPL3UNBLOCK (1 << 21)
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-07-22 11:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-20 14:31 [PATCH] drm/i915: Disable atomics in L3 for gen9 Chris Wilson
2019-07-20 15:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-07-20 16:23 ` ✓ Fi.CI.IGT: " Patchwork
2019-07-22 11:41 ` Tvrtko Ursulin [this message]
2019-07-23 11:55 ` [PATCH] " Chris Wilson
2019-07-23 22:19 ` Francisco Jerez
2019-07-24 14:34 ` Chris Wilson
2019-07-24 20:02 ` Francisco Jerez
2020-11-09 19:52 ` [Intel-gfx] " Jason Ekstrand
2020-11-09 20:15 ` Chris Wilson
2020-11-09 20:48 ` Ville Syrjälä
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=65da19be-2696-8d60-e055-63a37101cf6b@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.