All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
@ 2016-04-27  8:02 Chris Wilson
  2016-04-27  9:50 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chris Wilson @ 2016-04-27  8:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

Faced with sporadic machine hangs on gen7, that mimic the issue of
concurrent writes to the same cacheline and seem to start with
commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq
barrier on legacy gen6+), let us restore the spinlock around the mmio
read.

Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 66f69cdd1d36..ad5bd3808d8b 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1590,7 +1590,10 @@ gen6_seqno_barrier(struct intel_engine_cs *engine)
 	 * interrupt (with the same net latency).
 	 */
 	struct drm_i915_private *dev_priv = engine->dev->dev_private;
+
+	spin_lock_irq(&dev_priv->uncore.lock);
 	POSTING_READ_FW(RING_ACTHD(engine->mmio_base));
+	spin_unlock_irq(&dev_priv->uncore.lock);
 }
 
 static u32
-- 
2.8.1

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
  2016-04-27  8:02 [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Chris Wilson
@ 2016-04-27  9:50 ` Patchwork
  2016-04-27 10:15 ` [PATCH] " Chris Wilson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2016-04-27  9:50 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
URL   : https://patchwork.freedesktop.org/series/6390/
State : success

== Summary ==

Series 6390v1 drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
http://patchwork.freedesktop.org/api/1.0/series/6390/revisions/1/mbox/


bdw-nuci7        total:200  pass:188  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:200  pass:175  dwarn:0   dfail:0   fail:0   skip:25 
bsw-nuc-2        total:199  pass:158  dwarn:0   dfail:0   fail:0   skip:41 
byt-nuc          total:199  pass:158  dwarn:0   dfail:0   fail:0   skip:41 
hsw-brixbox      total:200  pass:174  dwarn:0   dfail:0   fail:0   skip:26 
hsw-gt2          total:200  pass:178  dwarn:0   dfail:0   fail:1   skip:21 
ilk-hp8440p      total:200  pass:139  dwarn:0   dfail:0   fail:0   skip:61 
ivb-t430s        total:200  pass:169  dwarn:0   dfail:0   fail:0   skip:31 
skl-i7k-2        total:200  pass:173  dwarn:0   dfail:0   fail:0   skip:27 
skl-nuci5        total:200  pass:189  dwarn:0   dfail:0   fail:0   skip:11 
snb-dellxps      total:200  pass:158  dwarn:0   dfail:0   fail:0   skip:42 
snb-x220t        total:200  pass:158  dwarn:0   dfail:0   fail:1   skip:41 

Results at /archive/results/CI_IGT_test/Patchwork_2084/

6da4af12ef4d4d82f4e0f2a4a960e15a74cced22 drm-intel-nightly: 2016y-04m-27d-08h-36m-12s UTC integration manifest
664f0b8 drm/i915: Protect gen7 irq_seqno_barrier with uncore lock

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

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

* Re: [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
  2016-04-27  8:02 [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Chris Wilson
  2016-04-27  9:50 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2016-04-27 10:15 ` Chris Wilson
  2016-04-28  7:50 ` Mika Kuoppala
  2016-04-28  8:23 ` Daniel Vetter
  3 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2016-04-27 10:15 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

On Wed, Apr 27, 2016 at 09:02:01AM +0100, Chris Wilson wrote:
> Faced with sporadic machine hangs on gen7, that mimic the issue of
> concurrent writes to the same cacheline and seem to start with
> commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq
> barrier on legacy gen6+), let us restore the spinlock around the mmio
> read.
> 
> Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

Testcase: igt/gem_concurrent_blit #crw

I haven't been able to narrow this down to a simpler scenario. Still not
happy that I understand how we are triggering the erratum with this
read, but that does appear to be the case.
-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] 6+ messages in thread

* Re: [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
  2016-04-27  8:02 [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Chris Wilson
  2016-04-27  9:50 ` ✓ Fi.CI.BAT: success for " Patchwork
  2016-04-27 10:15 ` [PATCH] " Chris Wilson
@ 2016-04-28  7:50 ` Mika Kuoppala
  2016-04-28  8:23 ` Daniel Vetter
  3 siblings, 0 replies; 6+ messages in thread
From: Mika Kuoppala @ 2016-04-28  7:50 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

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

> [ text/plain ]
> Faced with sporadic machine hangs on gen7, that mimic the issue of
> concurrent writes to the same cacheline and seem to start with
> commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq
> barrier on legacy gen6+), let us restore the spinlock around the mmio
> read.
>
> Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

After 23 hours and 2078 GpuTest07 runs the box is healthy so:

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

> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 66f69cdd1d36..ad5bd3808d8b 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1590,7 +1590,10 @@ gen6_seqno_barrier(struct intel_engine_cs *engine)
>  	 * interrupt (with the same net latency).
>  	 */
>  	struct drm_i915_private *dev_priv = engine->dev->dev_private;
> +
> +	spin_lock_irq(&dev_priv->uncore.lock);
>  	POSTING_READ_FW(RING_ACTHD(engine->mmio_base));
> +	spin_unlock_irq(&dev_priv->uncore.lock);

I was thinking that comment would be needed for the casual reader.
But perhaps the blatant unorthodoxity is big enough warning sign
to tread carefully here.

-Mika


>  }
>  
>  static u32
> -- 
> 2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
  2016-04-27  8:02 [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Chris Wilson
                   ` (2 preceding siblings ...)
  2016-04-28  7:50 ` Mika Kuoppala
@ 2016-04-28  8:23 ` Daniel Vetter
  2016-04-28  8:42   ` Chris Wilson
  3 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2016-04-28  8:23 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, Mika Kuoppala

On Wed, Apr 27, 2016 at 09:02:01AM +0100, Chris Wilson wrote:
> Faced with sporadic machine hangs on gen7, that mimic the issue of
> concurrent writes to the same cacheline and seem to start with
> commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq
> barrier on legacy gen6+), let us restore the spinlock around the mmio
> read.
> 
> Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1

4.7 is frozen, need to re-run dim fixes for this one:

$ dim fixes 9b9ed3093613288247a27a55a6dd07f1222150f1
Fixes: 9b9ed3093613 ("drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+")
Cc: drm-intel-fixes@lists.freedesktop.org


> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 66f69cdd1d36..ad5bd3808d8b 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1590,7 +1590,10 @@ gen6_seqno_barrier(struct intel_engine_cs *engine)
>  	 * interrupt (with the same net latency).
>  	 */
>  	struct drm_i915_private *dev_priv = engine->dev->dev_private;
> +
> +	spin_lock_irq(&dev_priv->uncore.lock);
>  	POSTING_READ_FW(RING_ACTHD(engine->mmio_base));
> +	spin_unlock_irq(&dev_priv->uncore.lock);
>  }
>  
>  static u32
> -- 
> 2.8.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock
  2016-04-28  8:23 ` Daniel Vetter
@ 2016-04-28  8:42   ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2016-04-28  8:42 UTC (permalink / raw)
  To: Daniel Vetter, Jani Nikula; +Cc: intel-gfx, Mika Kuoppala

On Thu, Apr 28, 2016 at 10:23:00AM +0200, Daniel Vetter wrote:
> On Wed, Apr 27, 2016 at 09:02:01AM +0100, Chris Wilson wrote:
> > Faced with sporadic machine hangs on gen7, that mimic the issue of
> > concurrent writes to the same cacheline and seem to start with
> > commit 9b9ed309 (drm/i915: Remove forcewake dance from seqno/irq
> > barrier on legacy gen6+), let us restore the spinlock around the mmio
> > read.
> > 
> > Fixes: 9b9ed3093613288247a27a55a6dd07f1222150f1
> 
> 4.7 is frozen, need to re-run dim fixes for this one:
> 
> $ dim fixes 9b9ed3093613288247a27a55a6dd07f1222150f1
> Fixes: 9b9ed3093613 ("drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+")
> Cc: drm-intel-fixes@lists.freedesktop.org

Sigh, missed.
-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] 6+ messages in thread

end of thread, other threads:[~2016-04-28  8:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27  8:02 [PATCH] drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Chris Wilson
2016-04-27  9:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-04-27 10:15 ` [PATCH] " Chris Wilson
2016-04-28  7:50 ` Mika Kuoppala
2016-04-28  8:23 ` Daniel Vetter
2016-04-28  8:42   ` 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.