From 2c6fb9780cb6c8a3c04f7fd723d7a49800c19016 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 25 Oct 2021 10:13:25 -0700 Subject: [PATCH] freedreno/drm: Add some asserts Signed-off-by: Rob Clark Part-of: --- src/freedreno/drm/freedreno_bo_cache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedreno/drm/freedreno_bo_cache.c b/src/freedreno/drm/freedreno_bo_cache.c index 4fe9a00c811..0a70cb531f4 100644 --- a/src/freedreno/drm/freedreno_bo_cache.c +++ b/src/freedreno/drm/freedreno_bo_cache.c @@ -81,6 +81,8 @@ fd_bo_cache_cleanup(struct fd_bo_cache *cache, time_t time) { int i; + simple_mtx_assert_locked(&table_lock); + if (cache->time == time) return; @@ -185,6 +187,8 @@ retry: int fd_bo_cache_free(struct fd_bo_cache *cache, struct fd_bo *bo) { + simple_mtx_assert_locked(&table_lock); + if (bo->nosync || bo->shared) return -1;