From dd69fd1b4db1b4ce2344c53922ca7e41a30c3f5c 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: (cherry picked from commit 293b264b7dd22451f76342f38451fcb686a4bddf) --- .pick_status.json | 2 +- src/panfrost/lib/kmod/panthor_kmod.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index fe02142ded4..7cfee6ce6a3 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2294,7 +2294,7 @@ "description": "pan/kmod: fix double syncop count sum when populating vm_bind syncs", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "97f6a62f7ef82b909f62ca78788d4f24416fbd31", "notes": null 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;