From 27cafa9a5173cae48781b724da2cc5be682eac83 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 28 Apr 2020 13:07:16 -0700 Subject: freedreno: switch to simple_mtx Signed-off-by: Rob Clark Reviewed-by: Eric Anholt Part-of: --- src/gallium/drivers/freedreno/freedreno_screen.c | 4 ++-- src/gallium/drivers/freedreno/freedreno_screen.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 346ff856fbc..892adad3f24 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -156,7 +156,7 @@ fd_screen_destroy(struct pipe_screen *pscreen) slab_destroy_parent(&screen->transfer_pool); - mtx_destroy(&screen->lock); + simple_mtx_destroy(&screen->lock); ralloc_free(screen->compiler); @@ -964,7 +964,7 @@ fd_screen_create(struct fd_device *dev, struct renderonly *ro) list_inithead(&screen->context_list); - (void) mtx_init(&screen->lock, mtx_plain); + (void) simple_mtx_init(&screen->lock, mtx_plain); pscreen->destroy = fd_screen_destroy; pscreen->get_param = fd_screen_get_param; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 6370b310b2b..c70eb3b6136 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -34,7 +34,7 @@ #include "pipe/p_screen.h" #include "util/u_memory.h" #include "util/slab.h" -#include "os/os_thread.h" +#include "util/simple_mtx.h" #include "renderonly/renderonly.h" #include "freedreno_batch_cache.h" @@ -48,7 +48,7 @@ struct fd_screen { struct list_head context_list; - mtx_t lock; + simple_mtx_t lock; /* it would be tempting to use pipe_reference here, but that * really doesn't work well if it isn't the first member of @@ -137,19 +137,19 @@ fd_screen(struct pipe_screen *pscreen) static inline void fd_screen_lock(struct fd_screen *screen) { - mtx_lock(&screen->lock); + simple_mtx_lock(&screen->lock); } static inline void fd_screen_unlock(struct fd_screen *screen) { - mtx_unlock(&screen->lock); + simple_mtx_unlock(&screen->lock); } static inline void fd_screen_assert_locked(struct fd_screen *screen) { - pipe_mutex_assert_locked(screen->lock); + simple_mtx_assert_locked(&screen->lock); } bool fd_screen_bo_get_handle(struct pipe_screen *pscreen, -- cgit v1.2.3