All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Disable atomics in L3 for gen9
@ 2019-07-20 14:31 Chris Wilson
  2019-07-20 15:10 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Chris Wilson @ 2019-07-20 14:31 UTC (permalink / raw)
  To: intel-gfx

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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Disable atomics in L3 for gen9
  2019-07-20 14:31 [PATCH] drm/i915: Disable atomics in L3 for gen9 Chris Wilson
@ 2019-07-20 15:10 ` Patchwork
  2019-07-20 16:23 ` ✓ Fi.CI.IGT: " Patchwork
  2019-07-22 11:41 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-07-20 15:10 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Disable atomics in L3 for gen9
URL   : https://patchwork.freedesktop.org/series/63969/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6515 -> Patchwork_13710
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/

Known issues
------------

  Here are the changes found in Patchwork_13710 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@read_all_entries:
    - fi-ilk-650:         [PASS][1] -> [DMESG-WARN][2] ([fdo#106387])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/fi-ilk-650/igt@debugfs_test@read_all_entries.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/fi-ilk-650/igt@debugfs_test@read_all_entries.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][3] ([fdo#107718]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@i915_selftest@live_contexts:
    - fi-skl-iommu:       [INCOMPLETE][5] ([fdo#111050]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/fi-skl-iommu/igt@i915_selftest@live_contexts.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/fi-skl-iommu/igt@i915_selftest@live_contexts.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [FAIL][7] ([fdo#103167]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  * igt@prime_busy@basic-wait-before-default:
    - fi-icl-u3:          [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/fi-icl-u3/igt@prime_busy@basic-wait-before-default.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/fi-icl-u3/igt@prime_busy@basic-wait-before-default.html

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#111050]: https://bugs.freedesktop.org/show_bug.cgi?id=111050


Participating hosts (53 -> 45)
------------------------------

  Missing    (8): fi-kbl-soraka fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-icl-guc fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_6515 -> Patchwork_13710

  CI_DRM_6515: a9fbb0055257ca5040e81c155212609c1bd6dc0e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5104: 10288a94dccead63efbd59d872c8c4ce9cf19788 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13710: 4213df462a8c3ec70300485211934a5dd74469ee @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

4213df462a8c drm/i915: Disable atomics in L3 for gen9

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Disable atomics in L3 for gen9
  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 ` Patchwork
  2019-07-22 11:41 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-07-20 16:23 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Disable atomics in L3 for gen9
URL   : https://patchwork.freedesktop.org/series/63969/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6515_full -> Patchwork_13710_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_13710_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-apl:          [PASS][1] -> [DMESG-WARN][2] ([fdo#108566]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-apl1/igt@gem_ctx_isolation@rcs0-s3.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-apl6/igt@gem_ctx_isolation@rcs0-s3.html

  * igt@gem_eio@reset-stress:
    - shard-snb:          [PASS][3] -> [FAIL][4] ([fdo#109661])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-snb2/igt@gem_eio@reset-stress.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-snb1/igt@gem_eio@reset-stress.html

  * igt@gem_workarounds@suspend-resume:
    - shard-skl:          [PASS][5] -> [INCOMPLETE][6] ([fdo#104108])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl6/igt@gem_workarounds@suspend-resume.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl9/igt@gem_workarounds@suspend-resume.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-skl:          [PASS][7] -> [INCOMPLETE][8] ([fdo#109507])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl5/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - shard-iclb:         [PASS][9] -> [FAIL][10] ([fdo#103167]) +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [PASS][11] -> [FAIL][12] ([fdo#103166])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-iclb4/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_psr@psr2_primary_blt:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#109441])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-iclb2/igt@kms_psr@psr2_primary_blt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-iclb6/igt@kms_psr@psr2_primary_blt.html

  
#### Possible fixes ####

  * igt@i915_suspend@forcewake:
    - shard-apl:          [DMESG-WARN][15] ([fdo#108566]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-apl3/igt@i915_suspend@forcewake.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-apl3/igt@i915_suspend@forcewake.html

  * igt@kms_draw_crc@draw-method-xrgb8888-blt-xtiled:
    - shard-skl:          [FAIL][17] ([fdo#103184] / [fdo#103232]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl3/igt@kms_draw_crc@draw-method-xrgb8888-blt-xtiled.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl6/igt@kms_draw_crc@draw-method-xrgb8888-blt-xtiled.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
    - shard-iclb:         [FAIL][19] ([fdo#103167]) -> [PASS][20] +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt:
    - shard-skl:          [FAIL][21] ([fdo#103167] / [fdo#110379]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl3/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl6/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [FAIL][23] ([fdo#108145] / [fdo#110403]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [SKIP][25] ([fdo#109441]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@perf@blocking:
    - shard-skl:          [FAIL][27] ([fdo#110728]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6515/shard-skl5/igt@perf@blocking.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/shard-skl4/igt@perf@blocking.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#110379]: https://bugs.freedesktop.org/show_bug.cgi?id=110379
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
  [fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6515 -> Patchwork_13710

  CI_DRM_6515: a9fbb0055257ca5040e81c155212609c1bd6dc0e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5104: 10288a94dccead63efbd59d872c8c4ce9cf19788 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13710: 4213df462a8c3ec70300485211934a5dd74469ee @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13710/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
  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
  2019-07-23 11:55   ` Chris Wilson
  2 siblings, 1 reply; 11+ messages in thread
From: Tvrtko Ursulin @ 2019-07-22 11:41 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
  2019-07-22 11:41 ` [PATCH] " Tvrtko Ursulin
@ 2019-07-23 11:55   ` Chris Wilson
  2019-07-23 22:19     ` Francisco Jerez
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2019-07-23 11:55 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2019-07-22 12:41:36)
> 
> 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?

The test I have where it goes from dead to passing, that's a considerable
performance improvement ;)

I imagine not being able to use L3 for atomics is pretty dire, whether that
has any impact, I have no clue.

It is still very likely that we see this because we are doing something
wrong elsewhere.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
  2019-07-23 11:55   ` Chris Wilson
@ 2019-07-23 22:19     ` Francisco Jerez
  2019-07-24 14:34       ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Francisco Jerez @ 2019-07-23 22:19 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, intel-gfx


[-- Attachment #1.1.1: Type: text/plain, Size: 2755 bytes --]

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Tvrtko Ursulin (2019-07-22 12:41:36)
>> 
>> 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?
>
> The test I have where it goes from dead to passing, that's a considerable
> performance improvement ;)
>
> I imagine not being able to use L3 for atomics is pretty dire, whether that
> has any impact, I have no clue.
>
> It is still very likely that we see this because we are doing something
> wrong elsewhere.

This reminds me of f3fc4884ebe6ae649d3723be14b219230d3b7fd2 followed by
d351f6d94893f3ba98b1b20c5ef44c35fc1da124 due to the massive impact (of
the order of 20x IIRC) using the L3 turned out to have on the
performance of HDC atomics, on at least that platform.  It seems
unfortunate that we're going to lose L3 atomics on Gen9 now, even though
it's only buffer atomics which are broken IIUC, and even though the
Windows driver is somehow getting away without disabling them.  Some of
our setup must be wrong either in the kernel or in userspace...  Are
these registers at least whitelisted so userspace can re-enable L3
atomics once the problem is addressed?  Wouldn't it be a more specific
workaround for userspace to simply use a non-L3-cacheable MOCS for
(rarely used) buffer surfaces, so it could benefit from L3 atomics
elsewhere?


> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
  2019-07-23 22:19     ` Francisco Jerez
@ 2019-07-24 14:34       ` Chris Wilson
  2019-07-24 20:02         ` Francisco Jerez
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2019-07-24 14:34 UTC (permalink / raw)
  To: Francisco Jerez, Tvrtko Ursulin, intel-gfx

Quoting Francisco Jerez (2019-07-23 23:19:13)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Quoting Tvrtko Ursulin (2019-07-22 12:41:36)
> >> 
> >> 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?
> >
> > The test I have where it goes from dead to passing, that's a considerable
> > performance improvement ;)
> >
> > I imagine not being able to use L3 for atomics is pretty dire, whether that
> > has any impact, I have no clue.
> >
> > It is still very likely that we see this because we are doing something
> > wrong elsewhere.
> 
> This reminds me of f3fc4884ebe6ae649d3723be14b219230d3b7fd2 followed by
> d351f6d94893f3ba98b1b20c5ef44c35fc1da124 due to the massive impact (of
> the order of 20x IIRC) using the L3 turned out to have on the
> performance of HDC atomics, on at least that platform.  It seems
> unfortunate that we're going to lose L3 atomics on Gen9 now, even though
> it's only buffer atomics which are broken IIUC, and even though the
> Windows driver is somehow getting away without disabling them.  Some of
> our setup must be wrong either in the kernel or in userspace...  Are
> these registers at least whitelisted so userspace can re-enable L3
> atomics once the problem is addressed?  Wouldn't it be a more specific
> workaround for userspace to simply use a non-L3-cacheable MOCS for
> (rarely used) buffer surfaces, so it could benefit from L3 atomics
> elsewhere?

If it was the case that disabling L3 atomics was the only way to prevent
the machine lockup under this scenario, then I think it is
unquestionably the right thing to do, and we could not leave it to
userspace to dtrt. We should never add non-context saved unsafe
registers to the whitelist (if setting a register may cause data
corruption or worse in another context/process, that is bad) despite our
repeated transgressions. However, there's no evidence to say that it does
prevent the machine lockup as it prevents the GPU hang that lead to the
lockup on reset.

Other than GPGPU requiring a flush around every sneeze, I did not see
anything in the gen9 w/a list that seemed like a match. Nevertheless, I
expect there is a more precise w/a than a blanket disable.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] drm/i915: Disable atomics in L3 for gen9
  2019-07-24 14:34       ` Chris Wilson
@ 2019-07-24 20:02         ` Francisco Jerez
  2020-11-09 19:52           ` [Intel-gfx] " Jason Ekstrand
  0 siblings, 1 reply; 11+ messages in thread
From: Francisco Jerez @ 2019-07-24 20:02 UTC (permalink / raw)
  To: Chris Wilson, Tvrtko Ursulin, intel-gfx


[-- Attachment #1.1.1: Type: text/plain, Size: 4619 bytes --]

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Francisco Jerez (2019-07-23 23:19:13)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> 
>> > Quoting Tvrtko Ursulin (2019-07-22 12:41:36)
>> >> 
>> >> 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?
>> >
>> > The test I have where it goes from dead to passing, that's a considerable
>> > performance improvement ;)
>> >
>> > I imagine not being able to use L3 for atomics is pretty dire, whether that
>> > has any impact, I have no clue.
>> >
>> > It is still very likely that we see this because we are doing something
>> > wrong elsewhere.
>> 
>> This reminds me of f3fc4884ebe6ae649d3723be14b219230d3b7fd2 followed by
>> d351f6d94893f3ba98b1b20c5ef44c35fc1da124 due to the massive impact (of
>> the order of 20x IIRC) using the L3 turned out to have on the
>> performance of HDC atomics, on at least that platform.  It seems
>> unfortunate that we're going to lose L3 atomics on Gen9 now, even though
>> it's only buffer atomics which are broken IIUC, and even though the
>> Windows driver is somehow getting away without disabling them.  Some of
>> our setup must be wrong either in the kernel or in userspace...  Are
>> these registers at least whitelisted so userspace can re-enable L3
>> atomics once the problem is addressed?  Wouldn't it be a more specific
>> workaround for userspace to simply use a non-L3-cacheable MOCS for
>> (rarely used) buffer surfaces, so it could benefit from L3 atomics
>> elsewhere?
>
> If it was the case that disabling L3 atomics was the only way to prevent
> the machine lockup under this scenario, then I think it is
> unquestionably the right thing to do, and we could not leave it to
> userspace to dtrt. We should never add non-context saved unsafe
> registers to the whitelist (if setting a register may cause data
> corruption or worse in another context/process, that is bad) despite our
> repeated transgressions. However, there's no evidence to say that it does
> prevent the machine lockup as it prevents the GPU hang that lead to the
> lockup on reset.
>
> Other than GPGPU requiring a flush around every sneeze, I did not see
> anything in the gen9 w/a list that seemed like a match. Nevertheless, I
> expect there is a more precise w/a than a blanket disable.
> -Chris

Supposedly there is a more precise one (setting the surface state MOCS
to UC for buffer images), but it relies on userspace doing the right
thing for the machine not to lock up.  There is a good chance that the
reason why L3 atomics hang on such buffers is ultimately under userspace
control, in which case we'll eventually have to undo the programming
done in this patch in order to re-enable L3 atomics once the problem is
addressed.  That means that userspace will have the freedom to hang the
machine hard once again, which sounds really bad, but it's no real news
for us (*cough* HSW *cough*), and it might be the only way to match the
performance of the Windows driver.

What can we do here?  Add an i915 option to enable performance features
that can lead to the system hanging hard under malicious (or
incompetent) userspace programming?  Probably only the user can tell
whether the trade-off between performance and security of the system is
acceptable...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Disable atomics in L3 for gen9
  2019-07-24 20:02         ` Francisco Jerez
@ 2020-11-09 19:52           ` Jason Ekstrand
  2020-11-09 20:15             ` Chris Wilson
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Ekstrand @ 2020-11-09 19:52 UTC (permalink / raw)
  To: Francisco Jerez; +Cc: Intel GFX, Marcin Ślusarz, Chris Wilson

We need to land this patch.  The number of bugs we have piling up in
Mesa gitlab related to this is getting a lot larger than I'd like.
I've gone back and forth with various HW and SW people internally for
countless e-mail threads and there is no other good workaround.  Yes,
the perf hit to atomics sucks but, fortunately, most games don't use
them heavily enough for it to make a significant impact.  We should
just eat the perf hit and fix the hangs.

Reviewed-by: Jason Ekstrand <jason@jlesktrand.net>

--Jason

On Wed, Jul 24, 2019 at 3:02 PM Francisco Jerez <currojerez@riseup.net> wrote:
>
> Chris Wilson <chris@chris-wilson.co.uk> writes:
>
> > Quoting Francisco Jerez (2019-07-23 23:19:13)
> >> Chris Wilson <chris@chris-wilson.co.uk> writes:
> >>
> >> > Quoting Tvrtko Ursulin (2019-07-22 12:41:36)
> >> >>
> >> >> 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?
> >> >
> >> > The test I have where it goes from dead to passing, that's a considerable
> >> > performance improvement ;)
> >> >
> >> > I imagine not being able to use L3 for atomics is pretty dire, whether that
> >> > has any impact, I have no clue.
> >> >
> >> > It is still very likely that we see this because we are doing something
> >> > wrong elsewhere.
> >>
> >> This reminds me of f3fc4884ebe6ae649d3723be14b219230d3b7fd2 followed by
> >> d351f6d94893f3ba98b1b20c5ef44c35fc1da124 due to the massive impact (of
> >> the order of 20x IIRC) using the L3 turned out to have on the
> >> performance of HDC atomics, on at least that platform.  It seems
> >> unfortunate that we're going to lose L3 atomics on Gen9 now, even though
> >> it's only buffer atomics which are broken IIUC, and even though the
> >> Windows driver is somehow getting away without disabling them.  Some of
> >> our setup must be wrong either in the kernel or in userspace...  Are
> >> these registers at least whitelisted so userspace can re-enable L3
> >> atomics once the problem is addressed?  Wouldn't it be a more specific
> >> workaround for userspace to simply use a non-L3-cacheable MOCS for
> >> (rarely used) buffer surfaces, so it could benefit from L3 atomics
> >> elsewhere?
> >
> > If it was the case that disabling L3 atomics was the only way to prevent
> > the machine lockup under this scenario, then I think it is
> > unquestionably the right thing to do, and we could not leave it to
> > userspace to dtrt. We should never add non-context saved unsafe
> > registers to the whitelist (if setting a register may cause data
> > corruption or worse in another context/process, that is bad) despite our
> > repeated transgressions. However, there's no evidence to say that it does
> > prevent the machine lockup as it prevents the GPU hang that lead to the
> > lockup on reset.
> >
> > Other than GPGPU requiring a flush around every sneeze, I did not see
> > anything in the gen9 w/a list that seemed like a match. Nevertheless, I
> > expect there is a more precise w/a than a blanket disable.
> > -Chris
>
> Supposedly there is a more precise one (setting the surface state MOCS
> to UC for buffer images), but it relies on userspace doing the right
> thing for the machine not to lock up.  There is a good chance that the
> reason why L3 atomics hang on such buffers is ultimately under userspace
> control, in which case we'll eventually have to undo the programming
> done in this patch in order to re-enable L3 atomics once the problem is
> addressed.  That means that userspace will have the freedom to hang the
> machine hard once again, which sounds really bad, but it's no real news
> for us (*cough* HSW *cough*), and it might be the only way to match the
> performance of the Windows driver.
>
> What can we do here?  Add an i915 option to enable performance features
> that can lead to the system hanging hard under malicious (or
> incompetent) userspace programming?  Probably only the user can tell
> whether the trade-off between performance and security of the system is
> acceptable...
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Disable atomics in L3 for gen9
  2020-11-09 19:52           ` [Intel-gfx] " Jason Ekstrand
@ 2020-11-09 20:15             ` Chris Wilson
  2020-11-09 20:48               ` Ville Syrjälä
  0 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2020-11-09 20:15 UTC (permalink / raw)
  To: Francisco Jerez, Jason Ekstrand; +Cc: Intel GFX, Marcin Ślusarz

Quoting Jason Ekstrand (2020-11-09 19:52:26)
> We need to land this patch.  The number of bugs we have piling up in
> Mesa gitlab related to this is getting a lot larger than I'd like.
> I've gone back and forth with various HW and SW people internally for
> countless e-mail threads and there is no other good workaround.  Yes,
> the perf hit to atomics sucks but, fortunately, most games don't use
> them heavily enough for it to make a significant impact.  We should
> just eat the perf hit and fix the hangs.

Drat, I thought you had found an alternative fix in the
bad GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC w/a.

So be it.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Disable atomics in L3 for gen9
  2020-11-09 20:15             ` Chris Wilson
@ 2020-11-09 20:48               ` Ville Syrjälä
  0 siblings, 0 replies; 11+ messages in thread
From: Ville Syrjälä @ 2020-11-09 20:48 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel GFX, Marcin Ślusarz

On Mon, Nov 09, 2020 at 08:15:05PM +0000, Chris Wilson wrote:
> Quoting Jason Ekstrand (2020-11-09 19:52:26)
> > We need to land this patch.  The number of bugs we have piling up in
> > Mesa gitlab related to this is getting a lot larger than I'd like.
> > I've gone back and forth with various HW and SW people internally for
> > countless e-mail threads and there is no other good workaround.  Yes,
> > the perf hit to atomics sucks but, fortunately, most games don't use
> > them heavily enough for it to make a significant impact.  We should
> > just eat the perf hit and fix the hangs.
> 
> Drat, I thought you had found an alternative fix in the
> bad GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC w/a.
> 
> So be it.

I don't suppose this could be just lack of programming the magic
MOCS entry for L3 evictions?

--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -132,6 +132,9 @@ static const struct drm_i915_mocs_entry skl_mocs_table[] = {
        MOCS_ENTRY(I915_MOCS_CACHED,
                   LE_3_WB | LE_TC_2_LLC_ELLC | LE_LRUM(3),
                   L3_3_WB)
+       MOCS_ENTRY(63,
+                  LE_3_WB | LE_TC_1_LLC | LE_LRUM(3),
+                  L3_1_UC)
 };
 
 /* NOTE: the LE_TGT_CACHE is not used on Broxton */

The code seems to claim we can't even program that on gen9, but there's
nothing in the current spec to back that up AFAICS.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-09 20:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] " Tvrtko Ursulin
2019-07-23 11:55   ` 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ä

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.