summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-07-21 13:32:20 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-07-27 09:38:44 +0200
commitb4f3e1631f5e8fcfb1da84cbd5d3ec581480954a (patch)
tree19b773a159821c73069214751f73beddd6c3e5cd
parent4d73da937fcf5f1bc0e58f6f34b2c32355e64f74 (diff)
drm/i915: Reset context image on engines after triggering the reset
We try to fixup the context image after the reset to ensure that there are no more pending writes from the hw that may conflict and to fixup any that were in flight. Fixes: a1ef70e14453 ("drm/i915: Add support for per engine reset recovery") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michel Thierry <michel.thierry@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170721123238.16428-2-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 6b583dc2eb1f..853d6741d3a5 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1950,6 +1950,8 @@ int i915_reset_engine(struct intel_engine_cs *engine)
goto out;
}
+ ret = intel_gpu_reset(engine->i915, intel_engine_flag(engine));
+
/*
* The request that caused the hang is stuck on elsp, we know the
* active request and can drop it, adjust head to skip the offending
@@ -1957,9 +1959,6 @@ int i915_reset_engine(struct intel_engine_cs *engine)
*/
i915_gem_reset_engine(engine, active_request);
- /* Finally, reset just this engine. */
- ret = intel_gpu_reset(engine->i915, intel_engine_flag(engine));
-
i915_gem_reset_finish_engine(engine);
if (ret) {