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: Flush the irq and tasklets before asserting engine is idle
Date: Thu, 02 Nov 2017 11:57:30 +0200	[thread overview]
Message-ID: <87y3npdmut.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20171101202149.32493-1-chris@chris-wilson.co.uk>

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

> Before we assert that the engine is idle, make sure we flush any
> residual tasklet. After that point, if the engine is not idle, more work
> may be queued despite us trying to park the engine and go to sleep.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=103479
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_engine_cs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index 0f8c542f0af2..70eeafe8a6ec 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1542,6 +1542,10 @@ void intel_engines_park(struct drm_i915_private *i915)
>  	enum intel_engine_id id;
>  
>  	for_each_engine(engine, i915, id) {
> +		/* Flush the residual irq tasklets first. */
> +		intel_engine_disarm_breadcrumbs(engine);
> +		tasklet_kill(&engine->execlists.irq_tasklet);
> +
>  		/*
>  		 * We are committed now to parking the engines, make sure there
>  		 * will be no more interrupts arriving later and the engines
> @@ -1558,9 +1562,6 @@ void intel_engines_park(struct drm_i915_private *i915)
>  		if (engine->park)
>  			engine->park(engine);
>  
> -		intel_engine_disarm_breadcrumbs(engine);
> -		tasklet_kill(&engine->execlists.irq_tasklet);
> -
>  		i915_gem_batch_pool_fini(&engine->batch_pool);
>  		engine->execlists.no_priolist = false;
>  	}
> -- 
> 2.15.0.rc2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-11-02  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 20:21 [PATCH] drm/i915: Flush the irq and tasklets before asserting engine is idle Chris Wilson
2017-11-01 21:28 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-02  9:57 ` Mika Kuoppala [this message]
2017-11-02 11:25   ` [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=87y3npdmut.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.