freedreno/drm: Fix bo_flush race

Once we've dropped the lock, we need to be referring to our own
temporary reference.

Fixes: 7b02bc6139 ("freedreno/drm: Drop fd_bo_fence")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
(cherry picked from commit f5d40636cd)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
This commit is contained in:
Rob Clark 2026-03-05 11:31:09 -08:00 committed by Eric Engestrom
parent ae58d184b0
commit 3acc53d7a4
2 changed files with 2 additions and 2 deletions

View file

@ -954,7 +954,7 @@
"description": "freedreno/drm: Fix bo_flush race",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7b02bc6139f1327def491680115d5f992f340764",
"notes": null

View file

@ -501,7 +501,7 @@ bo_flush(struct fd_bo *bo)
simple_mtx_unlock(&fence_lock);
for (unsigned i = 0; i < nr; i++) {
fd_fence_flush(bo->fences[i]);
fd_fence_flush(fences[i]);
fd_fence_del(fences[i]);
}
}