drm/i915: Ignore submit-fences on the same timeline
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 May 2020 09:29:25 +0000 (10:29 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 May 2020 11:38:54 +0000 (12:38 +0100)
While we ordinarily do not skip submit-fences due to the accompanying
hook that we want to callback on execution, a submit-fence on the same
timeline is meaningless.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200508092933.738-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_request.c

index 589739bfee25af9d0a5d8825ca5d878cc77a8dec..be2ce9065a291eac9e6a95765419724afeb79818 100644 (file)
@@ -1242,6 +1242,9 @@ i915_request_await_execution(struct i915_request *rq,
                        continue;
                }
 
+               if (fence->context == rq->fence.context)
+                       continue;
+
                /*
                 * We don't squash repeated fence dependencies here as we
                 * want to run our callback in all cases.