All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Set guilty-flag on fence after detecting a hang
Date: Tue, 3 Jan 2017 11:34:45 +0000	[thread overview]
Message-ID: <c2cd4d31-9ce2-5180-ec26-11e764ba8a49@linux.intel.com> (raw)
In-Reply-To: <20170103110533.31880-2-chris@chris-wilson.co.uk>


On 03/01/2017 11:05, Chris Wilson wrote:
> The struct dma_fence carries a status field exposed to userspace by
> sync_file. This is inspected after the fence is signaled and can convey
> whether or not the request completed successfully, or in our case if we
> detected a hang during the request (signaled via -EIO in
> SYNC_IOC_FILE_INFO).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 204c4a673bf3..bc99c0e292d8 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2757,10 +2757,12 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
>  		ring_hung = false;
>  	}
>
> -	if (ring_hung)
> +	if (ring_hung) {
>  		i915_gem_context_mark_guilty(request->ctx);
> -	else
> +		request->fence.status = -EIO;
> +	} else {
>  		i915_gem_context_mark_innocent(request->ctx);
> +	}
>
>  	if (!ring_hung)
>  		return;
>

Reading what happens later in this function, should we set the status of 
all the other requests we are about to clear?

However one thing I don't understand is how this scheme interacts with 
the current userspace. We will clear/no-nop some of the submitted 
requests since the state is corrupt. But how will userspace notice this 
before it submits more requets?

Regards,

Tvrtko

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

  reply	other threads:[~2017-01-03 11:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 11:05 [PATCH 1/2] dma-fence: Clear fence->status during dma_fence_init() Chris Wilson
2017-01-03 11:05 ` [PATCH 2/2] drm/i915: Set guilty-flag on fence after detecting a hang Chris Wilson
2017-01-03 11:34   ` Tvrtko Ursulin [this message]
2017-01-03 11:46     ` [Intel-gfx] " Chris Wilson
2017-01-03 11:57       ` Tvrtko Ursulin
2017-01-03 12:13         ` Chris Wilson
2017-01-03 12:34           ` [Intel-gfx] " Tvrtko Ursulin
2017-01-03 12:38             ` Chris Wilson
2017-01-03 13:17               ` Tvrtko Ursulin
2017-01-03 13:25                 ` Chris Wilson
2017-01-03 11:53 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] dma-fence: Clear fence->status during dma_fence_init() Patchwork
2017-01-03 14:04 ` [PATCH 1/2] " Tvrtko Ursulin
2017-01-04  9:15   ` [Intel-gfx] " Daniel Vetter
2017-01-04  9:24     ` Chris Wilson
2017-01-04  9:37       ` [Intel-gfx] " Daniel Vetter
2017-01-04  9:43         ` Chris Wilson
2017-01-04 10:18           ` Daniel Vetter
2017-01-04 10:26             ` Chris Wilson
2017-01-04 11:31               ` [Intel-gfx] " Daniel Vetter

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=c2cd4d31-9ce2-5180-ec26-11e764ba8a49@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --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.