]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/i915: Propagate error from completed fences
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 May 2020 16:21:36 +0000 (17:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 15:48:20 +0000 (17:48 +0200)
commit bc850943486887e3859597a266767f95db90aa72 upstream.

We need to preserve fatal errors from fences that are being terminated
as we hook them up.

Fixes: ef4688497512 ("drm/i915: Propagate fence errors")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200506162136.3325-1-chris@chris-wilson.co.uk
(cherry picked from commit 24fe5f2ab2478053d50a3bc629ada895903a5cbc)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/i915_request.c

index 32ab154db788c21cdb74d957fed851ca0c2f632c..1f50fc8bcebfe32b1172c505f2a2737ee0c952b4 100644 (file)
@@ -947,8 +947,10 @@ i915_request_await_request(struct i915_request *to, struct i915_request *from)
        GEM_BUG_ON(to == from);
        GEM_BUG_ON(to->timeline == from->timeline);
 
-       if (i915_request_completed(from))
+       if (i915_request_completed(from)) {
+               i915_sw_fence_set_error_once(&to->submit, from->fence.error);
                return 0;
+       }
 
        if (to->engine->schedule) {
                ret = i915_sched_node_add_dependency(&to->sched,