All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915: Stop allowing the device to be unwedged
@ 2017-03-08 11:40 ` Chris Wilson
  0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2017-03-08 11:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, Tvrtko Ursulin, Mika Kuoppala, # v4 . 9+

Since commit 821ed7df6e2a ("drm/i915: Update reset path to fix
incomplete requests"), setting the device as wedged is permanent as we
cannot recover the engine->submit_request. Stop clearing the I915_WEDGED
status to prevent userspace can getting itself in a muddle.

To fix this correctly, we need to stop overriding engine->submit_request
for the inflight requests and instead need to track the errors in
flight. In the meantime, let's start with the correctness fix.

Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: <stable@vger.kernel.org> # v4.9+
---
 drivers/gpu/drm/i915/i915_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index b1e9027a4f80..1c4f0a21eb22 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1824,8 +1824,11 @@ void i915_reset(struct drm_i915_private *dev_priv)
 	if (!test_and_clear_bit(I915_RESET_IN_PROGRESS, &error->flags))
 		return;
 
-	/* Clear any previous failed attempts at recovery. Time to try again. */
-	__clear_bit(I915_WEDGED, &error->flags);
+	if (test_bit(I915_WEDGED, &error->flags)) {
+		wake_up_bit(&error->flags, I915_RESET_IN_PROGRESS);
+		goto out;
+	}
+
 	error->reset_count++;
 
 	pr_notice("drm/i915: Resetting chip after gpu hang\n");
@@ -1874,6 +1877,7 @@ void i915_reset(struct drm_i915_private *dev_priv)
 wakeup:
 	i915_gem_reset_finish(dev_priv);
 	enable_irq(dev_priv->drm.irq);
+out:
 	wake_up_bit(&error->flags, I915_RESET_IN_PROGRESS);
 	return;
 
-- 
2.11.0

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

end of thread, other threads:[~2017-03-08 15:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 11:40 [PATCH 1/4] drm/i915: Stop allowing the device to be unwedged Chris Wilson
2017-03-08 11:40 ` Chris Wilson
2017-03-08 11:40 ` [PATCH 2/4] drm/i915: Track the error through the sw-fence Chris Wilson
2017-03-08 11:40 ` [PATCH 3/4] drm/i915: Skip cancelled requests in flight Chris Wilson
2017-03-08 11:49   ` Chris Wilson
2017-03-08 12:14   ` [PATCH v2] " Chris Wilson
2017-03-08 15:38     ` Chris Wilson
2017-03-08 11:40 ` [PATCH 4/4] Revert "drm/i915: Stop allowing the device to be unwedged" Chris Wilson
2017-03-08 11:45 ` [PATCH 1/4] drm/i915: Stop allowing the device to be unwedged Chris Wilson
2017-03-08 11:45   ` Chris Wilson
2017-03-08 14:23 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] drm/i915: Stop allowing the device to be unwedged (rev2) Patchwork
2017-03-08 14:29   ` Chris Wilson

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.