pan/kmod: fix double syncop count sum when populating vm_bind syncs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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>
This commit is contained in:
Adrián Larumbe 2026-04-29 20:51:02 +01:00 committed by Marge Bot
parent 9145ce0bb2
commit 293b264b7d

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;