From: Asahi Lina Date: Wed, 3 May 2023 06:40:33 +0000 (+0900) Subject: asahi: Assert that freed BOs have no pending writers X-Git-Tag: upstream/23.3.3~9034 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f55eff0e5df17dd4d9328236988932d360ac00c;p=platform%2Fupstream%2Fmesa.git asahi: Assert that freed BOs have no pending writers This is just a sanity check, I haven't actually hit this case but if we ever do something is very broken (e.g. BO refcounting bug). Signed-off-by: Asahi Lina Part-of: --- diff --git a/src/asahi/lib/agx_bo.c b/src/asahi/lib/agx_bo.c index a58c2a2..3e9e608 100644 --- a/src/asahi/lib/agx_bo.c +++ b/src/asahi/lib/agx_bo.c @@ -193,6 +193,8 @@ agx_bo_unreference(struct agx_bo *bo) * lock, let's make sure it's still not referenced before freeing it. */ if (p_atomic_read(&bo->refcnt) == 0) { + assert(!bo->writer_syncobj); + if (dev->debug & AGX_DBG_TRACE) agxdecode_track_free(bo);