From 7cca889ecd82668eda6c7e03956b2a974d8faae7 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 24 Oct 2022 15:29:04 -0400 Subject: [PATCH] crocus: fix off-by-one error when clearing stale syncobjs This is the same fix as commit 1311eddd526 ("iris: fix off-by-one error when clearing stale syncobjs"), but for crocus. Signed-off-by: Nicholas Bishop Part-of: --- src/gallium/drivers/crocus/crocus_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_fence.c b/src/gallium/drivers/crocus/crocus_fence.c index 7d7617c08c8..82007d0fb11 100644 --- a/src/gallium/drivers/crocus/crocus_fence.c +++ b/src/gallium/drivers/crocus/crocus_fence.c @@ -127,7 +127,7 @@ clear_stale_syncobjs(struct crocus_batch *batch) struct drm_i915_gem_exec_fence)); /* Skip the first syncobj, as it's the signalling one. */ - for (int i = n - 1; i > 1; i--) { + for (int i = n - 1; i > 0; i--) { struct crocus_syncobj **syncobj = util_dynarray_element(&batch->syncobjs, struct crocus_syncobj *, i); struct drm_i915_gem_exec_fence *fence =