[PATCH] drm/i915: Annotate the execbuffer dma-fence signalling critical path

Thomas Hellström thomas.hellstrom at linux.intel.com
Thu Jun 30 14:40:11 UTC 2022


Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 30fe847c6664..abc3d7737622 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -314,6 +314,7 @@ struct i915_execbuffer {
 #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
 	struct i915_capture_list *capture_lists[MAX_ENGINE_INSTANCE + 1];
 #endif
+	bool dma_fence_cookie;
 };
 
 static int eb_parse(struct i915_execbuffer *eb);
@@ -3074,6 +3075,8 @@ static int eb_requests_add(struct i915_execbuffer *eb, int err)
 		if (!rq)
 			continue;
 		err |= eb_request_add(eb, rq, err, i == 0);
+		if (i == 0)
+			dma_fence_end_signalling(eb->dma_fence_cookie);
 	}
 
 	return err;
@@ -3254,6 +3257,9 @@ eb_requests_create(struct i915_execbuffer *eb, struct dma_fence *in_fence,
 			return out_fence;
 		}
 
+		if (i == 0)
+			eb->dma_fence_cookie = dma_fence_begin_signalling();
+
 		/*
 		 * Only the first request added (committed to backend) has to
 		 * take the in fences into account as all subsequent requests
-- 
2.34.3



More information about the Intel-gfx-trybot mailing list