public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Check for timeout completion when waiting for the rq to submitted
@ 2017-02-08 16:54 Chris Wilson
  2017-02-08 17:28 ` Tvrtko Ursulin
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Chris Wilson @ 2017-02-08 16:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: # v4 . 10-rc1+

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));
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-02-15 13:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox