All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oscar Mateo <oscar.mateo@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/guc: Fix request re-submission after reset
Date: Thu, 9 Mar 2017 00:55:43 -0800	[thread overview]
Message-ID: <e7f049dc-5ebb-17b2-13a3-99d3c83dc42e@intel.com> (raw)
In-Reply-To: <51a00dd2-a334-bdf9-4459-0485eb5473be@linux.intel.com>



On 03/09/2017 08:50 AM, Tvrtko Ursulin wrote:
>
> On 09/03/2017 08:42, Oscar Mateo wrote:
>> On 03/09/2017 02:05 AM, Tvrtko Ursulin wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> In order to ensure no missed interrupts we must first re-direct
>>> the interrupts to GuC, and only then re-submit the requests to
>>> be replayed after a GPU reset. Otherwise context switch can fire
>>> before GuC has been set up to receive it triggering more hangs.
>>>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>>> Cc: Oscar Mateo <oscar.mateo@intel.com>
>>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>>> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/i915_guc_submission.c | 58
>>> +++++++++++++++++++++++++++---
>>>   drivers/gpu/drm/i915/intel_guc_loader.c    | 47
>>> ------------------------
>>>   2 files changed, 54 insertions(+), 51 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c
>>> b/drivers/gpu/drm/i915/i915_guc_submission.c
>>> index beb38e30d0e9..5b8ec0fab563 100644
>>> --- a/drivers/gpu/drm/i915/i915_guc_submission.c
>>> +++ b/drivers/gpu/drm/i915/i915_guc_submission.c
>>> @@ -936,6 +936,52 @@ static void guc_reset_wq(struct i915_guc_client
>>> *client)
>>>       client->wq_tail = 0;
>>>   }
>>>
>> <SNIP>
>>>   int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
>>>   {
>>>       struct intel_guc *guc = &dev_priv->guc;
>>> @@ -953,13 +999,17 @@ int i915_guc_submission_enable(struct
>>> drm_i915_private *dev_priv)
>>>         /* Take over from manual control of ELSP (execlists) */
>>>       for_each_engine(engine, dev_priv, id) {
>>> -        const int wqi_size = sizeof(struct guc_wq_item);
>>> -        struct drm_i915_gem_request *rq;
>>> -
>>>           engine->submit_request = i915_guc_submit;
>>>           engine->schedule = NULL;
>>> +    }
>>> +
>>> +    guc_interrupts_capture(dev_priv);
>>> +
>>> +    /* Replay the current set of previously submitted requests */
>>> +    for_each_engine(engine, dev_priv, id) {
>>> +        const int wqi_size = sizeof(struct guc_wq_item);
>>> +        struct drm_i915_gem_request *rq;
>>>
>> Don't you want to move the guc_interrupts_release to
>> i915_guc_submission_disable as well?
>
> I can't spot anything broken in that path. We never go in that 
> direction with the live submission so why do you think it is needed?
>
> Regards,
>
> Tvrtko
Just code symmetry: if we are leaving i915_guc_submission_enable to 
capture the interrupts, why doesn't the disable also releases them? 
Maybe it's not very important now, but it makes a lot more sense with my 
series to do proper unwinding of the whole path (I can tackle it there 
if you prefer).
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-03-09 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 10:05 [PATCH] drm/i915/guc: Fix request re-submission after reset Tvrtko Ursulin
2017-03-09  8:42 ` Oscar Mateo
2017-03-09 16:50   ` Tvrtko Ursulin
2017-03-09  8:55     ` Oscar Mateo [this message]
2017-03-09 17:02       ` Tvrtko Ursulin
2017-03-09 20:54         ` Chris Wilson
2017-03-09 14:20           ` Oscar Mateo
2017-03-09 10:19 ` Chris Wilson
2017-03-09 12:06   ` Chris Wilson
2017-03-09 12:38     ` Chris Wilson
2017-03-09 10:47 ` ✓ Fi.CI.BAT: success for " 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=e7f049dc-5ebb-17b2-13a3-99d3c83dc42e@intel.com \
    --to=oscar.mateo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /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.