pan/kmod: fix double syncop count sum when populating vm_bind syncs

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: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41274>
(cherry picked from commit 293b264b7d)
This commit is contained in:
Adrián Larumbe 2026-04-29 20:51:02 +01:00 committed by Eric Engestrom
parent f661ad4340
commit dd69fd1b4d
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;