Mesa (main): freedreno/drm: Add some asserts
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 26 00:32:31 UTC 2021
Module: Mesa
Branch: main
Commit: 2c6fb9780cb6c8a3c04f7fd723d7a49800c19016
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c6fb9780cb6c8a3c04f7fd723d7a49800c19016
Author: Rob Clark <robdclark at chromium.org>
Date: Mon Oct 25 10:13:25 2021 -0700
freedreno/drm: Add some asserts
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>
---
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;
More information about the mesa-commit
mailing list