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>, intel-gfx@lists.freedesktop.org
Cc: "# v4 . 10-rc1+" <drm-intel-fixes@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Check for timeout completion when waiting for the rq to submitted
Date: Wed, 8 Feb 2017 17:28:39 +0000	[thread overview]
Message-ID: <ed1b4fa1-a5e6-4fcf-486a-b91f1c589ea1@linux.intel.com> (raw)
In-Reply-To: <20170208165449.8419-1-chris@chris-wilson.co.uk>


On 08/02/2017 16:54, 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.
>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: 4680816be336 ("drm/i915: Wait first for submission, before waiting for request completion")
> 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 | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 72b7f7d9461d..69aff559cf8e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -1084,6 +1084,9 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>  		if (timeout < 0)
>  			goto complete;
>
> +		if (!timeout)
> +			return -ETIME;
> +
>  		GEM_BUG_ON(!i915_sw_fence_done(&req->execute));
>  	}
>  	GEM_BUG_ON(!i915_sw_fence_done(&req->submit));
>

Perhaps "else if" would be more typical, but still OK for a fix.

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-08 17:28 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 [this message]
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
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=ed1b4fa1-a5e6-4fcf-486a-b91f1c589ea1@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 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.