summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-09-12 10:29:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-09-12 12:59:45 +0100
commit582a6f90aa0d9103ab834b3a48a5bb7e4d07cac6 (patch)
treebf8a487ba528cd54d535bb9ef06e90a3043d17ed
parente3cb653d5cc42c2073ad174ae1130dc9e39266e9 (diff)
drm/i915/execlists: Add a paranoid flush of the CSB pointers upon reset
After a GPU reset, we need to drain all the CS events so that we have an accurate picture of the execlists state at the time of the reset. Be paranoid and force a read of the CSB write pointer from memory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190912092933.4729-1-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/gt/intel_lrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index dcdf7cf66e7e..dbc90da2341a 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -2359,6 +2359,10 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
struct i915_request *rq;
u32 *regs;
+ mb(); /* paranoia: read the CSB pointers from after the reset */
+ clflush(execlists->csb_write);
+ mb();
+
process_csb(engine); /* drain preemption events */
/* Following the reset, we need to reload the CSB read/write pointers */