Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/8] drm/i915: Verify engine workaround state at runtime
Date: Fri, 30 Nov 2018 11:31:57 +0000	[thread overview]
Message-ID: <20181130113201.13007-5-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20181130113201.13007-1-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Analogue to the previous patch we add at runtime verification that after
engine reset all respective workarounds have been correctly applied.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c          | 3 +++
 drivers/gpu/drm/i915/intel_workarounds.c | 6 ++++++
 drivers/gpu/drm/i915/intel_workarounds.h | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 14d019c9455b..a5add317a06b 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2382,6 +2382,9 @@ int i915_reset_engine(struct intel_engine_cs *engine, const char *msg)
 	if (ret)
 		goto out;
 
+	/* Catch engine workarounds not restored by engine re-init. */
+	intel_engine_workarounds_verify(engine, engine->name);
+
 out:
 	intel_engine_cancel_stop_cs(engine);
 	i915_gem_reset_finish_engine(engine);
diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c
index a5c0d206b2a4..2d17d8a36a57 100644
--- a/drivers/gpu/drm/i915/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/intel_workarounds.c
@@ -1313,6 +1313,12 @@ void intel_engine_workarounds_apply(struct intel_engine_cs *engine)
 	wa_list_apply(engine->i915, &engine->wa_list);
 }
 
+void intel_engine_workarounds_verify(struct intel_engine_cs *engine,
+				     const char *from)
+{
+	wa_list_verify(engine->i915, &engine->wa_list, from);
+}
+
 #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
 #include "selftests/intel_workarounds.c"
 #endif
diff --git a/drivers/gpu/drm/i915/intel_workarounds.h b/drivers/gpu/drm/i915/intel_workarounds.h
index 845c18dc110d..f72cfda32d68 100644
--- a/drivers/gpu/drm/i915/intel_workarounds.h
+++ b/drivers/gpu/drm/i915/intel_workarounds.h
@@ -40,5 +40,7 @@ void intel_whitelist_workarounds_apply(struct intel_engine_cs *engine);
 
 void intel_engine_workarounds_init(struct intel_engine_cs *engine);
 void intel_engine_workarounds_apply(struct intel_engine_cs *engine);
+void intel_engine_workarounds_verify(struct intel_engine_cs *engine,
+				     const char *from);
 
 #endif
-- 
2.19.1

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

  parent reply	other threads:[~2018-11-30 11:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 11:31 [PATCH 0/8] Restore workarounds after engine reset and unify their handling Tvrtko Ursulin
2018-11-30 11:31 ` [PATCH 1/8] drm/i915: Record GT workarounds in a list Tvrtko Ursulin
2018-11-30 11:31 ` [PATCH 2/8] drm/i915: Introduce per-engine workarounds Tvrtko Ursulin
2018-11-30 11:31 ` [PATCH 3/8] drm/i915: Verify GT workaround state at runtime Tvrtko Ursulin
2018-11-30 11:38   ` Chris Wilson
2018-11-30 12:02     ` Tvrtko Ursulin
2018-11-30 14:36       ` Chris Wilson
2018-11-30 11:54   ` Chris Wilson
2018-11-30 15:21     ` Tvrtko Ursulin
2018-11-30 11:31 ` Tvrtko Ursulin [this message]
2018-11-30 11:31 ` [PATCH 5/8] drm/i915/selftests: Add tests for GT and engine workaround verification Tvrtko Ursulin
2018-11-30 11:43   ` Chris Wilson
2018-11-30 15:15     ` Tvrtko Ursulin
2018-11-30 15:21       ` Chris Wilson
2018-11-30 11:31 ` [PATCH 6/8] drm/i915: Move register white-listing to the common workaround framework Tvrtko Ursulin
2018-11-30 11:45   ` Chris Wilson
2018-11-30 15:16     ` Tvrtko Ursulin
2018-11-30 11:32 ` [PATCH 7/8] drm/i915: Fuse per-context workaround handling with the common framework Tvrtko Ursulin
2018-11-30 11:47   ` Chris Wilson
2018-11-30 15:17     ` Tvrtko Ursulin
2018-11-30 11:32 ` [PATCH 8/8] drm/i915: Trim unused workaround list entries Tvrtko Ursulin
2018-11-30 11:49   ` Chris Wilson
2018-11-30 15:18     ` Tvrtko Ursulin
2018-11-30 12:06 ` ✗ Fi.CI.BAT: failure for Restore workarounds after engine reset and unify their handling Patchwork

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=20181130113201.13007-5-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox