public inbox for intel-gfx@lists.freedesktop.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 2/4] drm/i915: Synchronize irq before parking each engine
Date: Tue, 24 Oct 2017 17:26:19 +0300	[thread overview]
Message-ID: <877evkhbas.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <150883593125.7879.14598527500639426348@mail.alporthouse.com>

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

> Quoting Chris Wilson (2017-10-23 22:32:35)
>> When we park the engine (upon idling), we kill the irq tasklet. However,
>> to be sure that it is not restarted by a final interrupt after doing so,
>> flush the interrupt handler before parking. As we only park the engines
>> when we believe the system is idle, there should not be any spurious
>> interrupts later to distrub us; so flushing the final in-flight
>> interrupt should be sufficient.
>> 
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> Cc: Imre Deak <imre.deak@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index bb0e85043e01..b547a6327d34 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -3327,6 +3327,12 @@ i915_gem_idle_work_handler(struct work_struct *work)
>>         if (new_requests_since_last_retire(dev_priv))
>>                 goto out_unlock;
>>  
>> +       /*
>> +        * Be paranoid and flush a concurrent interrupt to make sure
>> +        * we don't reactivate any irq tasklets after parking.
>
> * FIXME: Note that even though we have waited for execlists to be idle,
> * there may still be an in-flight interrupt even though the CSB
> * is now empty. synchronize_irq() makes sure that the residual
> * interrupt is completed before we continue, but it doesn't prevent
> * the HW from raising that residual interrupt later. To complete
> * the shield we should coordinate disabling the CS irq with
> * flushing the residual interrupt.

I would call it spurious instead of residual as there is no real
reason for it.

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

>
>> +        */
>> +       synchronize_irq(dev_priv->drm.irq);
>> +
>>         /*
>>          * We are committed now to parking the engines, make sure there
>>          * will be no more interrupts arriving later.
>> -- 
>> 2.15.0.rc1
>> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-10-24 14:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 21:32 [PATCH 1/4] drm/i915: Bump wait-times for the final CS interrupt before parking Chris Wilson
2017-10-23 21:32 ` [PATCH 2/4] drm/i915: Synchronize irq before parking each engine Chris Wilson
2017-10-24  8:01   ` Chris Wilson
2017-10-24  9:05   ` Chris Wilson
2017-10-24  9:19     ` Mika Kuoppala
2017-10-24  9:32       ` Chris Wilson
2017-10-24 14:26     ` Mika Kuoppala [this message]
2017-10-23 21:32 ` [PATCH 3/4] drm/i915: Filter out spurious execlists context-switch interrupts Chris Wilson
2017-10-24 14:40   ` Mika Kuoppala
2017-10-23 21:32 ` [PATCH 4/4] warn Chris Wilson
2017-10-24 14:46   ` Mika Kuoppala
2017-10-24 15:01     ` Chris Wilson
2017-10-23 22:04 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Bump wait-times for the final CS interrupt before parking Patchwork
2017-10-23 23:15 ` ✓ Fi.CI.IGT: " Patchwork

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=877evkhbas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox