No clue how this worked before.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 82f18b713ac ("panfrost: Keep track of active BOs")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859>
* acquired it in the meantime.
*/
if (p_atomic_read(&bo->refcnt) == 0)
- p_atomic_set(&newbo->refcnt, 1);
+ p_atomic_set(&bo->refcnt, 1);
else
panfrost_bo_reference(bo);
assert(bo->cpu);