intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs
@ 2017-07-04 12:22 Chris Wilson
  2017-07-04 12:22 ` [PATCH 02/10] drm/i915: Reset context image on engines after triggering the reset Chris Wilson
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

As part of the knowing whether there is outstanding data in the CSB,
also check whether there is an outstanding IRQ notification.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 643f56b8b87c..a7a99c779e0b 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3390,8 +3390,10 @@ static int i915_engine_info(struct seq_file *m, void *unused)
 			ptr = I915_READ(RING_CONTEXT_STATUS_PTR(engine));
 			read = GEN8_CSB_READ_PTR(ptr);
 			write = GEN8_CSB_WRITE_PTR(ptr);
-			seq_printf(m, "\tExeclist CSB read %d, write %d\n",
-				   read, write);
+			seq_printf(m, "\tExeclist CSB read %d, write %d, interrupt posted? %s\n",
+				   read, write,
+				   yesno(test_bit(ENGINE_IRQ_EXECLIST,
+						  &engine->irq_posted)));
 			if (read >= GEN8_CSB_ENTRIES)
 				read = 0;
 			if (write >= GEN8_CSB_ENTRIES)
-- 
2.13.2

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

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

* [PATCH 02/10] drm/i915: Reset context image on engines after triggering the reset
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 03/10] drm/i915: Serialize per-engine resets against new requests Chris Wilson
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

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>
---
 drivers/gpu/drm/i915/i915_drv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9167a73f3c69..9a3bf9c07860 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) {
-- 
2.13.2

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

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

* [PATCH 03/10] drm/i915: Serialize per-engine resets against new requests
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
  2017-07-04 12:22 ` [PATCH 02/10] drm/i915: Reset context image on engines after triggering the reset Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 04/10] drm/i915: Flush the execlist ports if idle Chris Wilson
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

We rely on disabling the execlists (by stopping the tasklet) to prevent
new requests from submitting to the engine ELSP before we are ready.
However, we re-enable the engine before we call init_hw which gives
userspace the opportunity to subit a new request which is then
overwritten by init_hw -- but not before the HW may have started
executing. The subsequent out-of-order CSB is detected by our sanity
checks in intel_lrc_irq_handler().

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: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 9a3bf9c07860..f5da4b8268f7 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1951,6 +1951,12 @@ int i915_reset_engine(struct intel_engine_cs *engine)
 	}
 
 	ret = intel_gpu_reset(engine->i915, intel_engine_flag(engine));
+	if (ret) {
+		/* If we fail here, we expect to fallback to a global reset */
+		DRM_DEBUG_DRIVER("Failed to reset %s, ret=%d\n",
+				 engine->name, ret);
+		goto out;
+	}
 
 	/*
 	 * The request that caused the hang is stuck on elsp, we know the
@@ -1959,15 +1965,6 @@ int i915_reset_engine(struct intel_engine_cs *engine)
 	 */
 	i915_gem_reset_engine(engine, active_request);
 
-	i915_gem_reset_finish_engine(engine);
-
-	if (ret) {
-		/* If we fail here, we expect to fallback to a global reset */
-		DRM_DEBUG_DRIVER("Failed to reset %s, ret=%d\n",
-				 engine->name, ret);
-		goto out;
-	}
-
 	/*
 	 * The engine and its registers (and workarounds in case of render)
 	 * have been reset to their default values. Follow the init_ring
@@ -1979,6 +1976,7 @@ int i915_reset_engine(struct intel_engine_cs *engine)
 
 	error->reset_engine_count[engine->id]++;
 out:
+	i915_gem_reset_finish_engine(engine);
 	return ret;
 }
 
-- 
2.13.2

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

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

* [PATCH 04/10] drm/i915: Flush the execlist ports if idle
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
  2017-07-04 12:22 ` [PATCH 02/10] drm/i915: Reset context image on engines after triggering the reset Chris Wilson
  2017-07-04 12:22 ` [PATCH 03/10] drm/i915: Serialize per-engine resets against new requests Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 05/10] drm/i915: Check execlist/ring status during hangcheck Chris Wilson
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

When doing a GPU reset, the CSB register will be trashed and we will
lose any context-switch notifications that happened since the tasklet
was disabled. If we find that all requests on this engine were
completed, we want to make sure that the ELSP tracker is similarly empty
so that we do not feed back in the completed requests upon recovering
from the reset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 36 ++++++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 699868d81de8..b0738d2b2a7f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1306,6 +1306,31 @@ static void reset_common_ring(struct intel_engine_cs *engine,
 {
 	struct execlist_port *port = engine->execlist_port;
 	struct intel_context *ce;
+	unsigned int n;
+
+	/*
+	 * Catch up with any missed context-switch interrupts.
+	 *
+	 * Ideally we would just read the remaining CSB entries now that we
+	 * know the gpu is idle. However, the CSB registers are sometimes^W
+	 * often trashed across a GPU reset! Instead we have to rely on
+	 * guessing the missed context-switch events by looking at what
+	 * requests were completed.
+	 */
+	if (!request) {
+		for (n = 0; n < ARRAY_SIZE(engine->execlist_port); n++)
+			i915_gem_request_put(port_request(&port[n]));
+		memset(engine->execlist_port, 0, sizeof(engine->execlist_port));
+		return;
+	}
+
+	if (request->ctx != port_request(port)->ctx) {
+		i915_gem_request_put(port_request(port));
+		port[0] = port[1];
+		memset(&port[1], 0, sizeof(port[1]));
+	}
+
+	GEM_BUG_ON(request->ctx != port_request(port)->ctx);
 
 	/* If the request was innocent, we leave the request in the ELSP
 	 * and will try to replay it on restarting. The context image may
@@ -1317,7 +1342,7 @@ static void reset_common_ring(struct intel_engine_cs *engine,
 	 * and have to at least restore the RING register in the context
 	 * image back to the expected values to skip over the guilty request.
 	 */
-	if (!request || request->fence.error != -EIO)
+	if (request->fence.error != -EIO)
 		return;
 
 	/* We want a simple context + ring to execute the breadcrumb update.
@@ -1339,15 +1364,6 @@ static void reset_common_ring(struct intel_engine_cs *engine,
 	request->ring->head = request->postfix;
 	intel_ring_update_space(request->ring);
 
-	/* Catch up with any missed context-switch interrupts */
-	if (request->ctx != port_request(port)->ctx) {
-		i915_gem_request_put(port_request(port));
-		port[0] = port[1];
-		memset(&port[1], 0, sizeof(port[1]));
-	}
-
-	GEM_BUG_ON(request->ctx != port_request(port)->ctx);
-
 	/* Reset WaIdleLiteRestore:bdw,skl as well */
 	request->tail =
 		intel_ring_wrap(request->ring,
-- 
2.13.2

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

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

* [PATCH 05/10] drm/i915: Check execlist/ring status during hangcheck
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (2 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 04/10] drm/i915: Flush the execlist ports if idle Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 06/10] drm/i915: Check the execlist queue for pending requests before declaring idle Chris Wilson
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

Before we declare an engine as idle, check if there are any pending
execlist context-switches and if the ring itself reports as idle.
Otherwise, we may be left in a situation where we miss a crucial
execlist event (or something more sinister) yet the requests complete.
Since the seqno write happens, we believe the engine to be truly idle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_hangcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c
index 9b0ece427bdc..d9d87d96fb69 100644
--- a/drivers/gpu/drm/i915/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/intel_hangcheck.c
@@ -324,7 +324,7 @@ hangcheck_get_action(struct intel_engine_cs *engine,
 	if (engine->hangcheck.seqno != hc->seqno)
 		return ENGINE_ACTIVE_SEQNO;
 
-	if (i915_seqno_passed(hc->seqno, intel_engine_last_submit(engine)))
+	if (intel_engine_is_idle(engine))
 		return ENGINE_IDLE;
 
 	return engine_stuck(engine, hc->acthd);
-- 
2.13.2

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

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

* [PATCH 06/10] drm/i915: Check the execlist queue for pending requests before declaring idle
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (3 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 05/10] drm/i915: Check execlist/ring status during hangcheck Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 07/10] drm/i915: Clear execlist port[] before updating seqno on wedging Chris Wilson
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

Including a check against the execlist queue before calling the engine
idle and passing hangcheck.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index a55cd72aeeff..00682c7aae9c 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1282,6 +1282,10 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
 	if (port_request(&engine->execlist_port[0]))
 		return false;
 
+	/* ELSP is empty, but there are ready requests? */
+	if (READ_ONCE(engine->execlist_first))
+		return false;
+
 	/* Ring stopped? */
 	if (!ring_is_idle(engine))
 		return false;
-- 
2.13.2

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

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

* [PATCH 07/10] drm/i915: Clear execlist port[] before updating seqno on wedging
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (4 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 06/10] drm/i915: Check the execlist queue for pending requests before declaring idle Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 08/10] drm/i915: Wake up waiters after setting the WEDGED bit Chris Wilson
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

When we wedge the device, we clear out the in-flight requests and
advance the breadcrumb to indicate they are complete. However, the
breadcrumb advance includes an assert that the engine is idle, so that
advancement needs to be the last step to ensure we pass our own sanity
checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1b2dfa8bdeef..f387367c670e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3050,13 +3050,6 @@ static void engine_set_wedged(struct intel_engine_cs *engine)
 			dma_fence_set_error(&request->fence, -EIO);
 	spin_unlock_irqrestore(&engine->timeline->lock, flags);
 
-	/* Mark all pending requests as complete so that any concurrent
-	 * (lockless) lookup doesn't try and wait upon the request as we
-	 * reset it.
-	 */
-	intel_engine_init_global_seqno(engine,
-				       intel_engine_last_submit(engine));
-
 	/*
 	 * Clear the execlists queue up before freeing the requests, as those
 	 * are the ones that keep the context and ringbuffer backing objects
@@ -3085,6 +3078,13 @@ static void engine_set_wedged(struct intel_engine_cs *engine)
 		 */
 		clear_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted);
 	}
+
+	/* Mark all pending requests as complete so that any concurrent
+	 * (lockless) lookup doesn't try and wait upon the request as we
+	 * reset it.
+	 */
+	intel_engine_init_global_seqno(engine,
+				       intel_engine_last_submit(engine));
 }
 
 static int __i915_gem_set_wedged_BKL(void *data)
-- 
2.13.2

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

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

* [PATCH 08/10] drm/i915: Wake up waiters after setting the WEDGED bit
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (5 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 07/10] drm/i915: Clear execlist port[] before updating seqno on wedging Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 09/10] drm/i915: Assert that machine is wedged for nop_submit_request Chris Wilson
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

After setting the WEDGED bit, make sure that we do wake up waiters as
they may not be waiting for a request completion yet, just for its
execution.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f387367c670e..074c37378dac 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3093,10 +3093,12 @@ static int __i915_gem_set_wedged_BKL(void *data)
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
 
-	set_bit(I915_WEDGED, &i915->gpu_error.flags);
 	for_each_engine(engine, i915, id)
 		engine_set_wedged(engine);
 
+	set_bit(I915_WEDGED, &i915->gpu_error.flags);
+	wake_up_all(&i915->gpu_error.reset_queue);
+
 	return 0;
 }
 
-- 
2.13.2

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

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

* [PATCH 09/10] drm/i915: Assert that machine is wedged for nop_submit_request
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (6 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 08/10] drm/i915: Wake up waiters after setting the WEDGED bit Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 12:22 ` [PATCH 10/10] drm/i915: Clear engine irq posted following a reset Chris Wilson
  2017-07-04 13:28 ` ✓ Fi.CI.BAT: success for series starting with [01/10] drm/i915: Report execlists irq bit in debugfs Patchwork
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

We should only ever do nop_submit_request when the machine is wedged, so
assert it is so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 074c37378dac..a055736bfcd8 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3025,6 +3025,7 @@ void i915_gem_reset_finish(struct drm_i915_private *dev_priv)
 
 static void nop_submit_request(struct drm_i915_gem_request *request)
 {
+	GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
 	dma_fence_set_error(&request->fence, -EIO);
 	i915_gem_request_submit(request);
 	intel_engine_init_global_seqno(request->engine, request->global_seqno);
-- 
2.13.2

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

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

* [PATCH 10/10] drm/i915: Clear engine irq posted following a reset
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (7 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 09/10] drm/i915: Assert that machine is wedged for nop_submit_request Chris Wilson
@ 2017-07-04 12:22 ` Chris Wilson
  2017-07-04 13:28 ` ✓ Fi.CI.BAT: success for series starting with [01/10] drm/i915: Report execlists irq bit in debugfs Patchwork
  9 siblings, 0 replies; 11+ messages in thread
From: Chris Wilson @ 2017-07-04 12:22 UTC (permalink / raw)
  To: intel-gfx

When the GPU is reset, we want to discard all pending notifications as
either we have manually completed them, or they are no longer
applicable. Make sure we do reset the engine->irq_posted prior to
re-enabling the engine (e.g. the interrupt tasklets) in
i915_gem_reset_finish_engine().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a055736bfcd8..1564cadda94d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2963,6 +2963,8 @@ static bool i915_gem_reset_request(struct drm_i915_gem_request *request)
 void i915_gem_reset_engine(struct intel_engine_cs *engine,
 			   struct drm_i915_gem_request *request)
 {
+	engine->irq_posted = 0;
+
 	if (request && i915_gem_reset_request(request)) {
 		DRM_DEBUG_DRIVER("resetting %s to restart from tail of request 0x%x\n",
 				 engine->name, request->global_seqno);
-- 
2.13.2

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

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

* ✓ Fi.CI.BAT: success for series starting with [01/10] drm/i915: Report execlists irq bit in debugfs
  2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
                   ` (8 preceding siblings ...)
  2017-07-04 12:22 ` [PATCH 10/10] drm/i915: Clear engine irq posted following a reset Chris Wilson
@ 2017-07-04 13:28 ` Patchwork
  9 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2017-07-04 13:28 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/10] drm/i915: Report execlists irq bit in debugfs
URL   : https://patchwork.freedesktop.org/series/26806/
State : success

== Summary ==

Series 26806v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/26806/revisions/1/mbox/

Test gem_ringfill:
        Subgroup basic-default-hang:
                dmesg-warn -> INCOMPLETE (fi-blb-e6850) fdo#101600 +1

fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600

fi-bdw-5557u     total:279  pass:264  dwarn:0   dfail:0   fail:3   skip:11  time:442s
fi-bdw-gvtdvm    total:279  pass:257  dwarn:8   dfail:0   fail:0   skip:14  time:431s
fi-blb-e6850     total:146  pass:113  dwarn:0   dfail:0   fail:0   skip:32 
fi-bsw-n3050     total:279  pass:239  dwarn:0   dfail:0   fail:3   skip:36  time:522s
fi-bxt-j4205     total:279  pass:256  dwarn:0   dfail:0   fail:3   skip:19  time:500s
fi-byt-j1900     total:279  pass:250  dwarn:1   dfail:0   fail:3   skip:24  time:478s
fi-byt-n2820     total:279  pass:246  dwarn:1   dfail:0   fail:3   skip:28  time:480s
fi-glk-2a        total:279  pass:256  dwarn:0   dfail:0   fail:3   skip:19  time:583s
fi-hsw-4770      total:279  pass:259  dwarn:0   dfail:0   fail:3   skip:16  time:427s
fi-hsw-4770r     total:279  pass:259  dwarn:0   dfail:0   fail:3   skip:16  time:406s
fi-ilk-650       total:279  pass:225  dwarn:0   dfail:0   fail:3   skip:50  time:416s
fi-ivb-3520m     total:279  pass:257  dwarn:0   dfail:0   fail:3   skip:18  time:487s
fi-ivb-3770      total:279  pass:257  dwarn:0   dfail:0   fail:3   skip:18  time:466s
fi-kbl-7500u     total:279  pass:257  dwarn:0   dfail:0   fail:3   skip:18  time:458s
fi-kbl-7560u     total:279  pass:265  dwarn:0   dfail:0   fail:3   skip:10  time:563s
fi-kbl-r         total:279  pass:256  dwarn:1   dfail:0   fail:3   skip:18  time:564s
fi-pnv-d510      total:146  pass:112  dwarn:0   dfail:0   fail:0   skip:33 
fi-skl-6260u     total:279  pass:265  dwarn:0   dfail:0   fail:3   skip:10  time:452s
fi-skl-6700hq    total:279  pass:219  dwarn:1   dfail:0   fail:33  skip:24  time:306s
fi-skl-6700k     total:279  pass:257  dwarn:0   dfail:0   fail:3   skip:18  time:461s
fi-skl-6770hq    total:279  pass:265  dwarn:0   dfail:0   fail:3   skip:10  time:466s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:445s
fi-snb-2520m     total:279  pass:247  dwarn:0   dfail:0   fail:3   skip:28  time:539s
fi-snb-2600      total:279  pass:246  dwarn:0   dfail:0   fail:3   skip:29  time:407s

89dc45e4c8f6a5da4ea3d3acdda73cab6f436cfc drm-tip: 2017y-07m-04d-12h-16m-28s UTC integration manifest
36eb0b4 drm/i915: Clear engine irq posted following a reset
3dd42ed drm/i915: Assert that machine is wedged for nop_submit_request
466949e drm/i915: Wake up waiters after setting the WEDGED bit
0c4cbde drm/i915: Clear execlist port[] before updating seqno on wedging
3ed2da6 drm/i915: Check the execlist queue for pending requests before declaring idle
833dc23 drm/i915: Check execlist/ring status during hangcheck
c189186 drm/i915: Flush the execlist ports if idle
073e7d1 drm/i915: Serialize per-engine resets against new requests
3659769 drm/i915: Reset context image on engines after triggering the reset
6842bd3 drm/i915: Report execlists irq bit in debugfs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5105/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-07-04 13:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 12:22 [PATCH 01/10] drm/i915: Report execlists irq bit in debugfs Chris Wilson
2017-07-04 12:22 ` [PATCH 02/10] drm/i915: Reset context image on engines after triggering the reset Chris Wilson
2017-07-04 12:22 ` [PATCH 03/10] drm/i915: Serialize per-engine resets against new requests Chris Wilson
2017-07-04 12:22 ` [PATCH 04/10] drm/i915: Flush the execlist ports if idle Chris Wilson
2017-07-04 12:22 ` [PATCH 05/10] drm/i915: Check execlist/ring status during hangcheck Chris Wilson
2017-07-04 12:22 ` [PATCH 06/10] drm/i915: Check the execlist queue for pending requests before declaring idle Chris Wilson
2017-07-04 12:22 ` [PATCH 07/10] drm/i915: Clear execlist port[] before updating seqno on wedging Chris Wilson
2017-07-04 12:22 ` [PATCH 08/10] drm/i915: Wake up waiters after setting the WEDGED bit Chris Wilson
2017-07-04 12:22 ` [PATCH 09/10] drm/i915: Assert that machine is wedged for nop_submit_request Chris Wilson
2017-07-04 12:22 ` [PATCH 10/10] drm/i915: Clear engine irq posted following a reset Chris Wilson
2017-07-04 13:28 ` ✓ Fi.CI.BAT: success for series starting with [01/10] drm/i915: Report execlists irq bit in debugfs Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).