On Thu, Feb 09, 2017 at 09:10:12AM +0000, Tvrtko Ursulin wrote: > > 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@xxxxxxxxx> > >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@xxxxxxxxxxxxxxxxxx> > >Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > >Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > >Cc: <drm-intel-fixes@xxxxxxxxxxxxxxxxxxxxx> # 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@xxxxxxxxx> Thanks for catching it. Hopefully the window it exists in 4.10 is short enough that we aren't deluged with bug reports... -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx