diff options
author | Rob Clark <[email protected]> | 2016-07-19 18:24:57 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-07-30 09:23:42 -0400 |
commit | e684c32d2fdda204b79661ecf26881eae133d64a (patch) | |
tree | 762e83dd401b7ec18778b2078e3d473ab42c7d91 /src/gallium/drivers/freedreno/freedreno_context.h | |
parent | 010e4b2d52d5b5ab1eb866dfa0a2df5b984c343d (diff) |
freedreno: some locking
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_context.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h index 7b84ea99cbd..b3674b8115c 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.h +++ b/src/gallium/drivers/freedreno/freedreno_context.h @@ -283,6 +283,24 @@ fd_context(struct pipe_context *pctx) return (struct fd_context *)pctx; } +static inline void +fd_context_assert_locked(struct fd_context *ctx) +{ + pipe_mutex_assert_locked(ctx->screen->lock); +} + +static inline void +fd_context_lock(struct fd_context *ctx) +{ + pipe_mutex_lock(ctx->screen->lock); +} + +static inline void +fd_context_unlock(struct fd_context *ctx) +{ + pipe_mutex_unlock(ctx->screen->lock); +} + static inline struct pipe_scissor_state * fd_context_get_scissor(struct fd_context *ctx) { |