public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: "# v4 . 10-rc1+" <drm-intel-fixes@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/i915: Check for timeout completion when waiting for the rq to submitted
Date: Thu, 9 Feb 2017 09:10:12 +0000	[thread overview]
Message-ID: <9c6c128b-cd7a-048d-3b90-7a7bd1bc56e8@linux.intel.com> (raw)
In-Reply-To: <20170208181238.7232-1-chris@chris-wilson.co.uk>


On 08/02/2017 18:12, Chris Wilson wrote:
> We first wait for a request to be submitted to hw and assigned a seqno,
> before we can wait for the hw to signal completion (otherwise we don't
> know the hw id we need to wait upon). Whilst waiting for the request to
> be submitted, we may exceed the user's timeout and need to propagate the
> error back.
>
> v2: Make ETIME into an error from wait_for_execute for consistent exit
> handling.
>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion")
> Testcase: igt/gem_wait/basic-await
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 72b7f7d9461d..f31deeb72703 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -1025,8 +1025,13 @@ __i915_request_wait_for_execute(struct drm_i915_gem_request *request,
>  			break;
>  		}
>
> +		if (!timeout) {
> +			timeout = -ETIME;
> +			break;
> +		}
> +
>  		timeout = io_schedule_timeout(timeout);
> -	} while (timeout);
> +	} while (1);
>  	finish_wait(&request->execute.wait, &wait);
>
>  	if (flags & I915_WAIT_LOCKED)
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

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

  reply	other threads:[~2017-02-09  9:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 16:54 [PATCH] drm/i915: Check for timeout completion when waiting for the rq to submitted Chris Wilson
2017-02-08 17:28 ` Tvrtko Ursulin
2017-02-08 17:54   ` Chris Wilson
2017-02-08 18:08     ` Tvrtko Ursulin
2017-02-08 18:14       ` Chris Wilson
2017-02-08 18:12 ` [PATCH v2] " Chris Wilson
2017-02-09  9:10   ` Tvrtko Ursulin [this message]
2017-02-09  9:24     ` Chris Wilson
2017-02-09  8:02 ` ✓ Fi.CI.BAT: success for drm/i915: Check for timeout completion when waiting for the rq to submitted (rev3) Patchwork
2017-02-15 12:54 ` [PATCH] drm/i915: Check for timeout completion when waiting for the rq to submitted Joonas Lahtinen
2017-02-15 13:05   ` 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=9c6c128b-cd7a-048d-3b90-7a7bd1bc56e8@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=drm-intel-fixes@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox