From 293b264b7dd22451f76342f38451fcb686a4bddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Larumbe?= Date: Wed, 29 Apr 2026 20:51:02 +0100 Subject: [PATCH] pan/kmod: fix double syncop count sum when populating vm_bind syncs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to assign bind_ops[i].syncs a slice of the sync_ops array, op_sync_cnt must record the exact number sync operations for that vm_bind operation, so that &sync_ops[syncop_ptr - op_sync_cnt] will give us the right start of its slice. Fixes: 97f6a62f7ef8 ("pan/kmod: Add a backend for panthor") Reviewed-by: Boris Brezillon Signed-off-by: Adrián Larumbe Part-of: --- src/panfrost/lib/kmod/panthor_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/kmod/panthor_kmod.c b/src/panfrost/lib/kmod/panthor_kmod.c index 762f90d3b41..c2e774eab87 100644 --- a/src/panfrost/lib/kmod/panthor_kmod.c +++ b/src/panfrost/lib/kmod/panthor_kmod.c @@ -1042,8 +1042,8 @@ panthor_kmod_vm_bind(struct pan_kmod_vm *vm, enum pan_kmod_vm_op_mode mode, vm_orig_sync_point = vm_new_sync_point = panthor_kmod_vm_sync_lock(vm); for (uint32_t i = 0; i < op_count; i++) { - uint32_t op_sync_cnt = ops[i].syncs.count; uint64_t signal_vm_point = 0; + uint32_t op_sync_cnt = 0; if (async && track_activity) { signal_vm_point = ++vm_new_sync_point;