[PATCH 10/27] drm/i915: Confirm the request is still active before adding it to the await

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 21 15:46:23 UTC 2017

Although we do check the completion-status of the request before
actually adding a wait on it (either to its submit fence or its
completion dma-fence), we currently do not check before adding it to the
dependency lists.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: MichaƂ Winiarski <michal.winiarski at intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
 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 c75b67d0de01..36af8c7f63ce 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -681,6 +681,9 @@ i915_gem_request_await_request(struct drm_i915_gem_request *to,
 	GEM_BUG_ON(to == from);
 	GEM_BUG_ON(to->timeline == from->timeline);
+	if (i915_gem_request_completed(from))
+		return 0;
 	if (to->engine->schedule) {
 		ret = i915_priotree_add_dependency(to->i915,

More information about the Intel-gfx-trybot mailing list