All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/9] drm/i915/gt: Sanitize GT first
@ 2020-04-27  8:54 Chris Wilson
  2020-04-27  8:54 ` [Intel-gfx] [PATCH 2/9] drm/i915/gt: Fix up clock frequency Chris Wilson
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Chris Wilson @ 2020-04-27  8:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson

We see that if the HW doesn't actually sleep, the HW may eat the poison
we set in its write-only HWSP during sanitize:

  intel_gt_resume.part.8: 0000:00:02.0
  __gt_unpark: 0000:00:02.0
  gt_sanitize: 0000:00:02.0 force:yes
  process_csb: 0000:00:02.0 vcs0: cs-irq head=5, tail=90
  process_csb: 0000:00:02.0 vcs0: csb[0]: status=0x5a5a5a5a:0x5a5a5a5a
  assert_pending_valid: Nothing pending for promotion!

The CS TAIL pointer should have been reset by reset_csb_pointers(), so
in this case it is likely that we have read back from the CPU cache and
so we must clflush our control over that page. In doing so, push the
sanitisation to the start of the GT sequence so that our poisoning is
assuredly before we start talking to the HW.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.c | 3 ++-
 drivers/gpu/drm/i915/gt/intel_lrc.c   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index 4c4c74ef4f21..5097786f4375 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -198,11 +198,12 @@ int intel_gt_resume(struct intel_gt *gt)
 	 * Only the kernel contexts should remain pinned over suspend,
 	 * allowing us to fixup the user contexts on their first pin.
 	 */
+	gt_sanitize(gt, true);
+
 	intel_gt_pm_get(gt);
 
 	intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
 	intel_rc6_sanitize(&gt->rc6);
-	gt_sanitize(gt, true);
 	if (intel_gt_is_wedged(gt)) {
 		err = -EIO;
 		goto out_fw;
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index c8014c265ffb..cd6afa2cf5fd 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3931,6 +3931,9 @@ static void execlists_sanitize(struct intel_engine_cs *engine)
 	 * reset the value in the HWSP.
 	 */
 	intel_timeline_reset_seqno(engine->kernel_context->timeline);
+
+	/* And scrub the dirty cachelines for the HWSP */
+	clflush_cache_range(engine->status_page.addr, PAGE_SIZE);
 }
 
 static void enable_error_interrupt(struct intel_engine_cs *engine)
-- 
2.20.1

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

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

end of thread, other threads:[~2020-04-27 22:37 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27  8:54 [Intel-gfx] [PATCH 1/9] drm/i915/gt: Sanitize GT first Chris Wilson
2020-04-27  8:54 ` [Intel-gfx] [PATCH 2/9] drm/i915/gt: Fix up clock frequency Chris Wilson
2020-04-27 19:52   ` Andi Shyti
2020-04-27 20:03     ` Chris Wilson
2020-04-27  8:54 ` [Intel-gfx] [PATCH 3/9] drm/i915/execlists: Check preempt-timeout target before submit_ports Chris Wilson
2020-04-27  8:54 ` [Intel-gfx] [PATCH 4/9] drm/i915/gt: Always enable busy-stats for execlists Chris Wilson
2020-04-27  8:54 ` [Intel-gfx] [PATCH 5/9] drm/i915/gt: Move rps.enabled/active to flags Chris Wilson
2020-04-27 19:53   ` Andi Shyti
2020-04-27  8:54 ` [Intel-gfx] [PATCH 6/9] drm/i915/gt: Track use of RPS interrupts in flags Chris Wilson
2020-04-27  8:54 ` [Intel-gfx] [PATCH 7/9] drm/i915/gt: Switch to manual evaluation of RPS Chris Wilson
2020-04-27 16:39   ` Andi Shyti
2020-04-27  8:54 ` [Intel-gfx] [PATCH 8/9] drm/i915/gt: Apply the aggressive downclocking to parking Chris Wilson
2020-04-27 20:38   ` Andi Shyti
2020-04-27  8:54 ` [Intel-gfx] [PATCH 9/9] drm/i915/gt: Restore aggressive post-boost downclocking Chris Wilson
2020-04-27 12:40   ` Chris Wilson
2020-04-27 17:06     ` Chris Wilson
2020-04-27 20:42       ` Andi Shyti
2020-04-27  9:41 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/gt: Sanitize GT first Patchwork
2020-04-27  9:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-04-27 10:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-04-27 11:10 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-04-27 19:51 ` [Intel-gfx] [PATCH 1/9] " Andi Shyti

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.