All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Mark manually wedged engines as guilty
@ 2017-03-25 13:47 Chris Wilson
  2017-03-25 14:19 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-03-27 14:20 ` [PATCH] " Mika Kuoppala
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-25 13:47 UTC (permalink / raw)
  To: intel-gfx

Use the incoming value from debugfs/i915_wedged to select which engines
to marked as guilty in order to force us to reset those requests
(required to quickly bypass simulated hangs).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index dbd97fd52b00..db5d8efd07d1 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4031,7 +4031,9 @@ i915_wedged_get(void *data, u64 *val)
 static int
 i915_wedged_set(void *data, u64 val)
 {
-	struct drm_i915_private *dev_priv = data;
+	struct drm_i915_private *i915 = data;
+	struct intel_engine_cs *engine;
+	unsigned int tmp;
 
 	/*
 	 * There is no safeguard against this debugfs entry colliding
@@ -4041,13 +4043,17 @@ i915_wedged_set(void *data, u64 val)
 	 * while it is writing to 'i915_wedged'
 	 */
 
-	if (i915_reset_backoff(&dev_priv->gpu_error))
+	if (i915_reset_backoff(&i915->gpu_error))
 		return -EAGAIN;
 
-	i915_handle_error(dev_priv, val,
-			  "Manually setting wedged to %llu", val);
+	for_each_engine_masked(engine, i915, val, tmp) {
+		engine->hangcheck.seqno = intel_engine_get_seqno(engine);
+		engine->hangcheck.stalled = true;
+	}
+
+	i915_handle_error(i915, val, "Manually setting wedged to %llu", val);
 
-	wait_on_bit(&dev_priv->gpu_error.flags,
+	wait_on_bit(&i915->gpu_error.flags,
 		    I915_RESET_HANDOFF,
 		    TASK_UNINTERRUPTIBLE);
 
-- 
2.11.0

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Mark manually wedged engines as guilty
  2017-03-25 13:47 [PATCH] drm/i915: Mark manually wedged engines as guilty Chris Wilson
@ 2017-03-25 14:19 ` Patchwork
  2017-03-27 14:41   ` Chris Wilson
  2017-03-27 14:20 ` [PATCH] " Mika Kuoppala
  1 sibling, 1 reply; 5+ messages in thread
From: Patchwork @ 2017-03-25 14:19 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Mark manually wedged engines as guilty
URL   : https://patchwork.freedesktop.org/series/21882/
State : success

== Summary ==

Series 21882v1 drm/i915: Mark manually wedged engines as guilty
https://patchwork.freedesktop.org/api/1.0/series/21882/revisions/1/mbox/

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 462s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 454s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 591s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 536s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 580s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 509s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 497s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 433s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 430s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 447s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 508s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 513s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 484s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 492s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 605s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 484s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 516s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 459s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 546s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 416s

5930ef736d17adf7f398f5b3cf01815c53798485 drm-tip: 2017y-03m-25d-13h-17m-45s UTC integration manifest
4cde0c2 drm/i915: Mark manually wedged engines as guilty

== Logs ==

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

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

* Re: [PATCH] drm/i915: Mark manually wedged engines as guilty
  2017-03-25 13:47 [PATCH] drm/i915: Mark manually wedged engines as guilty Chris Wilson
  2017-03-25 14:19 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-27 14:20 ` Mika Kuoppala
  2017-03-27 14:35   ` Chris Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Mika Kuoppala @ 2017-03-27 14:20 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Use the incoming value from debugfs/i915_wedged to select which engines
> to marked as guilty in order to force us to reset those requests
> (required to quickly bypass simulated hangs).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index dbd97fd52b00..db5d8efd07d1 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4031,7 +4031,9 @@ i915_wedged_get(void *data, u64 *val)
>  static int
>  i915_wedged_set(void *data, u64 val)
>  {
> -	struct drm_i915_private *dev_priv = data;
> +	struct drm_i915_private *i915 = data;
> +	struct intel_engine_cs *engine;
> +	unsigned int tmp;
>  
>  	/*
>  	 * There is no safeguard against this debugfs entry colliding
> @@ -4041,13 +4043,17 @@ i915_wedged_set(void *data, u64 val)
>  	 * while it is writing to 'i915_wedged'
>  	 */
>  
> -	if (i915_reset_backoff(&dev_priv->gpu_error))
> +	if (i915_reset_backoff(&i915->gpu_error))
>  		return -EAGAIN;
>  
> -	i915_handle_error(dev_priv, val,
> -			  "Manually setting wedged to %llu", val);
> +	for_each_engine_masked(engine, i915, val, tmp) {
> +		engine->hangcheck.seqno = intel_engine_get_seqno(engine);
> +		engine->hangcheck.stalled = true;

Can't decide if we should clean the engine mask we pass to
i915_handle_error here or not.

Well the -1 igt will pass will atleast be visible in logs now.

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> +	}
> +
> +	i915_handle_error(i915, val, "Manually setting wedged to %llu", val);
>  
> -	wait_on_bit(&dev_priv->gpu_error.flags,
> +	wait_on_bit(&i915->gpu_error.flags,
>  		    I915_RESET_HANDOFF,
>  		    TASK_UNINTERRUPTIBLE);
>  
> -- 
> 2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Mark manually wedged engines as guilty
  2017-03-27 14:20 ` [PATCH] " Mika Kuoppala
@ 2017-03-27 14:35   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-27 14:35 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Mon, Mar 27, 2017 at 05:20:25PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Use the incoming value from debugfs/i915_wedged to select which engines
> > to marked as guilty in order to force us to reset those requests
> > (required to quickly bypass simulated hangs).
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++++++++-----
> >  1 file changed, 11 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index dbd97fd52b00..db5d8efd07d1 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -4031,7 +4031,9 @@ i915_wedged_get(void *data, u64 *val)
> >  static int
> >  i915_wedged_set(void *data, u64 val)
> >  {
> > -	struct drm_i915_private *dev_priv = data;
> > +	struct drm_i915_private *i915 = data;
> > +	struct intel_engine_cs *engine;
> > +	unsigned int tmp;
> >  
> >  	/*
> >  	 * There is no safeguard against this debugfs entry colliding
> > @@ -4041,13 +4043,17 @@ i915_wedged_set(void *data, u64 val)
> >  	 * while it is writing to 'i915_wedged'
> >  	 */
> >  
> > -	if (i915_reset_backoff(&dev_priv->gpu_error))
> > +	if (i915_reset_backoff(&i915->gpu_error))
> >  		return -EAGAIN;
> >  
> > -	i915_handle_error(dev_priv, val,
> > -			  "Manually setting wedged to %llu", val);
> > +	for_each_engine_masked(engine, i915, val, tmp) {
> > +		engine->hangcheck.seqno = intel_engine_get_seqno(engine);
> > +		engine->hangcheck.stalled = true;
> 
> Can't decide if we should clean the engine mask we pass to
> i915_handle_error here or not.
> 
> Well the -1 igt will pass will atleast be visible in logs now.

Yes. -1 otherwise known as 18446744073709551615 is super ugly and
visible. Not sure if that is a good thing or not :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: ✓ Fi.CI.BAT: success for drm/i915: Mark manually wedged engines as guilty
  2017-03-25 14:19 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-27 14:41   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-03-27 14:41 UTC (permalink / raw)
  To: intel-gfx

On Sat, Mar 25, 2017 at 02:19:13PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Mark manually wedged engines as guilty
> URL   : https://patchwork.freedesktop.org/series/21882/
> State : success
> 
> == Summary ==
> 
> Series 21882v1 drm/i915: Mark manually wedged engines as guilty
> https://patchwork.freedesktop.org/api/1.0/series/21882/revisions/1/mbox/

Pushed, as I have and want to make further use of this debugfs interface
in igt (being able to quickly and pecisely trigger a reset for a known
hang).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-03-27 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-25 13:47 [PATCH] drm/i915: Mark manually wedged engines as guilty Chris Wilson
2017-03-25 14:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-27 14:41   ` Chris Wilson
2017-03-27 14:20 ` [PATCH] " Mika Kuoppala
2017-03-27 14:35   ` 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.