All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/gen6: Flush RING_IMR changes before changing the global GT IMR
Date: Thu, 03 Jan 2019 12:25:37 +0200	[thread overview]
Message-ID: <87h8eq3un2.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190102163524.19353-1-chris@chris-wilson.co.uk>

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

> On Baytail, notably, we can still detect missed interrupt syndrome
> (where we never spot a completed request). In this case, it can be
> alleviated by always keeping the interrupt unmasked, implying that the
> interrupt is being lost in the window after modifying the IMR. (This is
> the reason we still have the posting reads on enable_irq, if we remove
> them we miss interrupts!) Having narrowed the issue down to the IMR,
> rather than keeping it always enabled, applying the usual posting
> read/flush of the RING_IMR before unmasking the GT IMR also seems to
> prevent the missed interrupt. So be it.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 8967dcb5f58f..3d5d6b908148 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -974,6 +974,10 @@ gen6_irq_enable(struct intel_engine_cs *engine)
>  	I915_WRITE_IMR(engine,
>  		       ~(engine->irq_enable_mask |
>  			 engine->irq_keep_mask));
> +
> +	/* Flush/delay to ensure the RING_IMR is active before the GT IMR */
> +	POSTING_READ_FW(RING_IMR(engine->mmio_base));
> +

I guess lifting this to be part of I915_WRITE_IMR would have caused
unwanted latencies on platforms that demonstratedly are free
of this sort of weirdness. I mean, the write should go in order
so the gpu view of events is consistent. Perhaps there
is some asyncness we can't grasp...or it is the delay like
the comment explains.

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

>  	gen5_enable_gt_irq(dev_priv, engine->irq_enable_mask);
>  }
>  
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-01-03 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 16:35 [PATCH] drm/i915/gen6: Flush RING_IMR changes before changing the global GT IMR Chris Wilson
2019-01-02 17:10 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-01-02 18:24 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-03 10:25 ` Mika Kuoppala [this message]
2019-01-03 10:39   ` [PATCH] " Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h8eq3un2.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.