freedreno/drm: Add some asserts

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>
This commit is contained in:
Rob Clark 2021-10-25 10:13:25 -07:00 committed by Marge Bot
parent 00a1eda61b
commit 2c6fb9780c

View file

@ -81,6 +81,8 @@ fd_bo_cache_cleanup(struct fd_bo_cache *cache, time_t time)
{ {
int i; int i;
simple_mtx_assert_locked(&table_lock);
if (cache->time == time) if (cache->time == time)
return; return;
@ -185,6 +187,8 @@ retry:
int int
fd_bo_cache_free(struct fd_bo_cache *cache, struct fd_bo *bo) fd_bo_cache_free(struct fd_bo_cache *cache, struct fd_bo *bo)
{ {
simple_mtx_assert_locked(&table_lock);
if (bo->nosync || bo->shared) if (bo->nosync || bo->shared)
return -1; return -1;