diff options
author | Rob Clark <[email protected]> | 2020-04-28 13:07:16 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-29 20:37:00 +0000 |
commit | 27cafa9a5173cae48781b724da2cc5be682eac83 (patch) | |
tree | 66fccfe75db49fb0429036c4cd5c8fddd6a7ba0f | |
parent | 336a8cd82a4070674ecc056be0af791bf6c7d042 (diff) |
freedreno: switch to simple_mtx
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4810>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_screen.c | 4 | ||||
-rw-r--r-- | 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, |