summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:32:06 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:53:05 +1100
commit628e84a58fdb26c63a705861b92f65f242613321 (patch)
treebd6084a4dee53a1f180c62f41e790ab490ddf3ee /src/gallium/drivers
parentba72554f3e576c1674d52ab16d8d2edff9398b71 (diff)
gallium/util: replace pipe_mutex_unlock() with mtx_unlock()
pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/ddebug/dd_context.c2
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c6
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c8
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch_cache.c14
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c2
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_surface.c2
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_surface.c2
-rw-r--r--src/gallium/drivers/r300/r300_blit.c2
-rw-r--r--src/gallium/drivers/r300/r300_texture.c2
-rw-r--r--src/gallium/drivers/radeon/r600_gpu_load.c2
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c2
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c22
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c128
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c94
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.h4
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c4
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c4
-rw-r--r--src/gallium/drivers/svga/svga_sampler_view.c6
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c10
-rw-r--r--src/gallium/drivers/trace/tr_dump.c10
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.c12
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.h2
29 files changed, 181 insertions, 181 deletions
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 109d64259b2..a52975d8cb2 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -596,7 +596,7 @@ dd_context_destroy(struct pipe_context *_pipe)
if (dctx->thread) {
mtx_lock(&dctx->mutex);
dctx->kill_thread = 1;
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
pipe_thread_wait(dctx->thread);
mtx_destroy(&dctx->mutex);
assert(!dctx->records);
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 17b404a3edd..59afde88694 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -942,7 +942,7 @@ PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
}
/* Unlock and sleep before starting all over again. */
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
os_time_sleep(10000); /* 10 ms */
mtx_lock(&dctx->mutex);
}
@@ -951,7 +951,7 @@ PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
while (dctx->records)
dd_free_record(&dctx->records);
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
return 0;
}
@@ -1044,7 +1044,7 @@ dd_pipelined_process_draw(struct dd_context *dctx, struct dd_call *call)
mtx_lock(&dctx->mutex);
record->next = dctx->records;
dctx->records = record;
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
}
static void
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index f08b7b3a1bf..5cd6a697e13 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -172,7 +172,7 @@ batch_reset_resources(struct fd_batch *batch)
{
mtx_lock(&batch->ctx->screen->lock);
batch_reset_resources_locked(batch);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
}
static void
@@ -205,7 +205,7 @@ __fd_batch_destroy(struct fd_batch *batch)
mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, true);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
batch_fini(batch);
@@ -289,7 +289,7 @@ batch_flush(struct fd_batch *batch)
} else {
mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, false);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
}
}
@@ -337,7 +337,7 @@ batch_add_dep(struct fd_batch *batch, struct fd_batch *dep)
*/
if (batch_depends_on(dep, batch)) {
DBG("%p: flush forced on %p!", batch, dep);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
fd_batch_flush(dep, false);
mtx_lock(&batch->ctx->screen->lock);
} else {
diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c
index 5a881bffd42..9fea7d68271 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c
@@ -136,7 +136,7 @@ fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
struct fd_batch *batch = NULL;
fd_batch_reference_locked(&batch, (struct fd_batch *)entry->data);
if (batch->ctx == ctx) {
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
fd_batch_reference(&last_batch, batch);
fd_batch_flush(batch, false);
mtx_lock(&ctx->screen->lock);
@@ -144,7 +144,7 @@ fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
fd_batch_reference_locked(&batch, NULL);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
if (last_batch) {
fd_batch_sync(last_batch);
@@ -165,7 +165,7 @@ fd_bc_invalidate_context(struct fd_context *ctx)
fd_batch_reference_locked(&batch, NULL);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
}
void
@@ -224,7 +224,7 @@ fd_bc_invalidate_resource(struct fd_resource *rsc, bool destroy)
rsc->bc_batch_mask = 0;
- pipe_mutex_unlock(screen->lock);
+ mtx_unlock(&screen->lock);
}
struct fd_batch *
@@ -263,7 +263,7 @@ fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx)
/* we can drop lock temporarily here, since we hold a ref,
* flush_batch won't disappear under us.
*/
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
DBG("%p: too many batches! flush forced!", flush_batch);
fd_batch_flush(flush_batch, true);
mtx_lock(&ctx->screen->lock);
@@ -303,7 +303,7 @@ fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx)
cache->batches[idx] = batch;
out:
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
return batch;
}
@@ -349,7 +349,7 @@ batch_from_key(struct fd_batch_cache *cache, struct key *key,
rsc->bc_batch_mask = (1 << batch->idx);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
return batch;
}
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index d65f19a8240..cb33b8c0dfc 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -322,7 +322,7 @@ fd_context_lock(struct fd_context *ctx)
static inline void
fd_context_unlock(struct fd_context *ctx)
{
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
}
static inline struct pipe_scissor_state *
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index b98faca60ee..edeb88bf34b 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -172,7 +172,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
resource_written(batch, batch->query_buf);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
batch->num_draws++;
@@ -346,7 +346,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
resource_written(batch, batch->query_buf);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers,
pfb->width, pfb->height, depth, stencil,
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 275de97b8c7..a24f3f30903 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -212,7 +212,7 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
}
swap(rsc->batch_mask, shadow->batch_mask);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
struct pipe_blit_info blit = {0};
blit.dst.resource = prsc;
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c
index e7c4ab6979e..20cd91cd63d 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.c
+++ b/src/gallium/drivers/llvmpipe/lp_fence.c
@@ -101,7 +101,7 @@ lp_fence_signal(struct lp_fence *fence)
*/
cnd_broadcast(&fence->signalled);
- pipe_mutex_unlock(fence->mutex);
+ mtx_unlock(&fence->mutex);
}
boolean
@@ -121,7 +121,7 @@ lp_fence_wait(struct lp_fence *f)
while (f->count < f->rank) {
cnd_wait(&f->signalled, &f->mutex);
}
- pipe_mutex_unlock(f->mutex);
+ mtx_unlock(&f->mutex);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index d651192702a..dfad9fabb20 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -502,7 +502,7 @@ lp_scene_bin_iter_next( struct lp_scene *scene , int *x, int *y)
end:
/*printf("return bin %p at %d, %d\n", (void *) bin, *bin_x, *bin_y);*/
- pipe_mutex_unlock(scene->mutex);
+ mtx_unlock(&scene->mutex);
return bin;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index f701e9087ab..38d91385cf3 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -179,7 +179,7 @@ lp_setup_rasterize_scene( struct lp_setup_context *setup )
*/
lp_rast_queue_scene(screen->rast, scene);
lp_rast_finish(screen->rast);
- pipe_mutex_unlock(screen->rast_mutex);
+ mtx_unlock(&screen->rast_mutex);
lp_scene_end_rasterization(setup->scene);
lp_setup_reset( setup );
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index 1e7718416ad..908c534b92e 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -1082,7 +1082,7 @@ nv50_blit_select_fp(struct nv50_blitctx *ctx, const struct pipe_blit_info *info)
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nv50->base.pipe, mode, ptarg);
- pipe_mutex_unlock(blitter->mutex);
+ mtx_unlock(&blitter->mutex);
}
ctx->fp = blitter->fp[targ][mode];
}
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index 5c4fda9c071..9445c05f3ab 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -922,7 +922,7 @@ nvc0_blit_select_fp(struct nvc0_blitctx *ctx, const struct pipe_blit_info *info)
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nvc0->base.pipe, mode, ptarg);
- pipe_mutex_unlock(blitter->mutex);
+ mtx_unlock(&blitter->mutex);
}
ctx->fp = blitter->fp[targ][mode];
}
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index 7d58d4cb3ea..434cf38c81b 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -336,7 +336,7 @@ static void r300_clear(struct pipe_context* pipe,
* Then in texture_destroy, we set cmask_resource to NULL. */
r300->screen->cmask_resource = fb->cbufs[0]->texture;
}
- pipe_mutex_unlock(r300->screen->cmask_mutex);
+ mtx_unlock(&r300->screen->cmask_mutex);
}
if (r300->screen->cmask_resource == fb->cbufs[0]->texture) {
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index b451b9f0a4d..32cbdcdb341 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -1034,7 +1034,7 @@ static void r300_texture_destroy(struct pipe_screen *screen,
if (texture == rscreen->cmask_resource) {
rscreen->cmask_resource = NULL;
}
- pipe_mutex_unlock(rscreen->cmask_mutex);
+ mtx_unlock(&rscreen->cmask_mutex);
}
pb_reference(&tex->buf, NULL);
FREE(tex);
diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c
index acbd1793312..b5b03599510 100644
--- a/src/gallium/drivers/radeon/r600_gpu_load.c
+++ b/src/gallium/drivers/radeon/r600_gpu_load.c
@@ -183,7 +183,7 @@ static uint64_t r600_read_mmio_counter(struct r600_common_screen *rscreen,
if (!rscreen->gpu_load_thread)
rscreen->gpu_load_thread =
pipe_thread_create(r600_gpu_load_thread, rscreen);
- pipe_mutex_unlock(rscreen->gpu_load_mutex);
+ mtx_unlock(&rscreen->gpu_load_mutex);
}
unsigned busy = p_atomic_read(&rscreen->mmio_counters.array[busy_index]);
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 8778f0beaf9..7eb457f8e1d 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1406,5 +1406,5 @@ void r600_screen_clear_buffer(struct r600_common_screen *rscreen, struct pipe_re
mtx_lock(&rscreen->aux_context_lock);
rctx->dma_clear_buffer(&rctx->b, dst, offset, size, value);
rscreen->aux_context->flush(rscreen->aux_context, NULL, 0);
- pipe_mutex_unlock(rscreen->aux_context_lock);
+ mtx_unlock(&rscreen->aux_context_lock);
}
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 79c436d637d..7ca112c636a 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -311,7 +311,7 @@ static void r600_eliminate_fast_color_clear(struct r600_common_context *rctx,
ctx->flush(ctx, NULL, 0);
if (ctx == rscreen->aux_context)
- pipe_mutex_unlock(rscreen->aux_context_lock);
+ mtx_unlock(&rscreen->aux_context_lock);
}
static void r600_texture_discard_cmask(struct r600_common_screen *rscreen,
@@ -401,7 +401,7 @@ bool r600_texture_disable_dcc(struct r600_common_context *rctx,
rctx->b.flush(&rctx->b, NULL, 0);
if (&rctx->b == rscreen->aux_context)
- pipe_mutex_unlock(rscreen->aux_context_lock);
+ mtx_unlock(&rscreen->aux_context_lock);
return r600_texture_discard_dcc(rscreen, rtex);
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 4a346538ee4..ec34235f078 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -7472,7 +7472,7 @@ si_get_shader_part(struct si_screen *sscreen,
/* Find existing. */
for (result = *list; result; result = result->next) {
if (memcmp(&result->key, key, sizeof(*key)) == 0) {
- pipe_mutex_unlock(sscreen->shader_parts_mutex);
+ mtx_unlock(&sscreen->shader_parts_mutex);
return result;
}
}
@@ -7526,7 +7526,7 @@ si_get_shader_part(struct si_screen *sscreen,
out:
si_llvm_dispose(&ctx);
- pipe_mutex_unlock(sscreen->shader_parts_mutex);
+ mtx_unlock(&sscreen->shader_parts_mutex);
return result;
}
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index c7a8d1f2afb..9cde0aabade 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1270,17 +1270,17 @@ again:
if (iter->is_optimized &&
!util_queue_fence_is_signalled(&iter->optimized_ready)) {
memset(&key->opt, 0, sizeof(key->opt));
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
goto again;
}
if (iter->compilation_failed) {
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -1; /* skip the draw call */
}
state->current = iter;
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return 0;
}
}
@@ -1288,7 +1288,7 @@ again:
/* Build a new shader. */
shader = CALLOC_STRUCT(si_shader);
if (!shader) {
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM;
}
shader->selector = sel;
@@ -1307,7 +1307,7 @@ again:
if (!main_part) {
FREE(shader);
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM; /* skip the draw call */
}
@@ -1320,7 +1320,7 @@ again:
&compiler_state->debug) != 0) {
FREE(main_part);
FREE(shader);
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM; /* skip the draw call */
}
*mainp = main_part;
@@ -1357,7 +1357,7 @@ again:
/* Use the default (unoptimized) shader for now. */
memset(&key->opt, 0, sizeof(key->opt));
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
goto again;
}
@@ -1367,7 +1367,7 @@ again:
if (!shader->compilation_failed)
state->current = shader;
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return shader->compilation_failed ? -1 : 0;
}
@@ -1461,9 +1461,9 @@ void si_init_shader_selector_async(void *job, int thread_index)
if (tgsi_binary &&
si_shader_cache_load_shader(sscreen, tgsi_binary, shader)) {
- pipe_mutex_unlock(sscreen->shader_cache_mutex);
+ mtx_unlock(&sscreen->shader_cache_mutex);
} else {
- pipe_mutex_unlock(sscreen->shader_cache_mutex);
+ mtx_unlock(&sscreen->shader_cache_mutex);
/* Compile the shader if it hasn't been loaded from the cache. */
if (si_compile_tgsi_shader(sscreen, tm, shader, false,
@@ -1478,7 +1478,7 @@ void si_init_shader_selector_async(void *job, int thread_index)
mtx_lock(&sscreen->shader_cache_mutex);
if (!si_shader_cache_insert_shader(sscreen, tgsi_binary, shader, true))
FREE(tgsi_binary);
- pipe_mutex_unlock(sscreen->shader_cache_mutex);
+ mtx_unlock(&sscreen->shader_cache_mutex);
}
}
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 8d16ec2ca85..268cf00a777 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -49,7 +49,7 @@ rbug_destroy(struct pipe_context *_pipe)
mtx_lock(&rb_pipe->call_mutex);
pipe->destroy(pipe);
rb_pipe->pipe = NULL;
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
FREE(rb_pipe);
}
@@ -128,10 +128,10 @@ rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
!(rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY] && rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY]->disabled) &&
!(rb_pipe->curr.shader[PIPE_SHADER_VERTEX] && rb_pipe->curr.shader[PIPE_SHADER_VERTEX]->disabled))
pipe->draw_vbo(pipe, info);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
- pipe_mutex_unlock(rb_pipe->draw_mutex);
+ mtx_unlock(&rb_pipe->draw_mutex);
}
static struct pipe_query *
@@ -147,7 +147,7 @@ rbug_create_query(struct pipe_context *_pipe,
query = pipe->create_query(pipe,
query_type,
index);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return query;
}
@@ -161,7 +161,7 @@ rbug_destroy_query(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->destroy_query(pipe,
query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static boolean
@@ -174,7 +174,7 @@ rbug_begin_query(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->begin_query(pipe, query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -189,7 +189,7 @@ rbug_end_query(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->end_query(pipe,
query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -209,7 +209,7 @@ rbug_get_query_result(struct pipe_context *_pipe,
query,
wait,
result);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -222,7 +222,7 @@ rbug_set_active_query_state(struct pipe_context *_pipe, boolean enable)
mtx_lock(&rb_pipe->call_mutex);
pipe->set_active_query_state(pipe, enable);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -236,7 +236,7 @@ rbug_create_blend_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -251,7 +251,7 @@ rbug_bind_blend_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -264,7 +264,7 @@ rbug_delete_blend_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -278,7 +278,7 @@ rbug_create_sampler_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_sampler_state(pipe,
sampler);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -294,7 +294,7 @@ rbug_bind_sampler_states(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_sampler_states(pipe, shader, start, count, samplers);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -307,7 +307,7 @@ rbug_delete_sampler_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_sampler_state(pipe,
sampler);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -321,7 +321,7 @@ rbug_create_rasterizer_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -336,7 +336,7 @@ rbug_bind_rasterizer_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -349,7 +349,7 @@ rbug_delete_rasterizer_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -363,7 +363,7 @@ rbug_create_depth_stencil_alpha_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -378,7 +378,7 @@ rbug_bind_depth_stencil_alpha_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -391,7 +391,7 @@ rbug_delete_depth_stencil_alpha_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -404,7 +404,7 @@ rbug_create_fs_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_fs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
@@ -427,7 +427,7 @@ rbug_bind_fs_state(struct pipe_context *_pipe,
pipe->bind_fs_state(pipe,
fs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -439,7 +439,7 @@ rbug_delete_fs_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -452,7 +452,7 @@ rbug_create_vs_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_vs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
@@ -475,7 +475,7 @@ rbug_bind_vs_state(struct pipe_context *_pipe,
pipe->bind_vs_state(pipe,
vs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -485,9 +485,9 @@ rbug_delete_vs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_vs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -500,7 +500,7 @@ rbug_create_gs_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_gs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
@@ -523,7 +523,7 @@ rbug_bind_gs_state(struct pipe_context *_pipe,
pipe->bind_gs_state(pipe,
gs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -535,7 +535,7 @@ rbug_delete_gs_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
@@ -551,7 +551,7 @@ rbug_create_vertex_elements_state(struct pipe_context *_pipe,
ret = pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
@@ -566,7 +566,7 @@ rbug_bind_vertex_elements_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_vertex_elements_state(pipe,
velems);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -579,7 +579,7 @@ rbug_delete_vertex_elements_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_vertex_elements_state(pipe,
velems);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -592,7 +592,7 @@ rbug_set_blend_color(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_blend_color(pipe,
blend_color);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -605,7 +605,7 @@ rbug_set_stencil_ref(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_stencil_ref(pipe,
stencil_ref);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -618,7 +618,7 @@ rbug_set_clip_state(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_clip_state(pipe,
clip);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -642,7 +642,7 @@ rbug_set_constant_buffer(struct pipe_context *_pipe,
shader,
index,
_cb ? &cb : NULL);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -681,7 +681,7 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
pipe->set_framebuffer_state(pipe,
state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -694,7 +694,7 @@ rbug_set_polygon_stipple(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_polygon_stipple(pipe,
poly_stipple);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -708,7 +708,7 @@ rbug_set_scissor_states(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_scissor_states(pipe, start_slot, num_scissors, scissor);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -722,7 +722,7 @@ rbug_set_viewport_states(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_viewport_states(pipe, start_slot, num_viewports, viewport);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -760,7 +760,7 @@ rbug_set_sampler_views(struct pipe_context *_pipe,
pipe->set_sampler_views(pipe, shader, start, num, views);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -787,7 +787,7 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
num_buffers,
buffers);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -806,7 +806,7 @@ rbug_set_index_buffer(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_index_buffer(pipe, ib);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -818,7 +818,7 @@ rbug_set_sample_mask(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_sample_mask(pipe, sample_mask);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static struct pipe_stream_output_target *
@@ -834,7 +834,7 @@ rbug_create_stream_output_target(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
target = pipe->create_stream_output_target(pipe, res, buffer_offset,
buffer_size);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return target;
}
@@ -847,7 +847,7 @@ rbug_stream_output_target_destroy(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->stream_output_target_destroy(pipe, target);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -861,7 +861,7 @@ rbug_set_stream_output_targets(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->set_stream_output_targets(pipe, num_targets, targets, offsets);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -892,7 +892,7 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
src,
src_level,
src_box);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -912,7 +912,7 @@ rbug_blit(struct pipe_context *_pipe, const struct pipe_blit_info *_blit_info)
mtx_lock(&rb_pipe->call_mutex);
pipe->blit(pipe, &blit_info);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -926,7 +926,7 @@ rbug_flush_resource(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->flush_resource(pipe, res);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -945,7 +945,7 @@ rbug_clear(struct pipe_context *_pipe,
color,
depth,
stencil);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -970,7 +970,7 @@ rbug_clear_render_target(struct pipe_context *_pipe,
width,
height,
render_condition_enabled);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -999,7 +999,7 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
width,
height,
render_condition_enabled);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
@@ -1012,7 +1012,7 @@ rbug_flush(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
pipe->flush(pipe, fence, flags);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static struct pipe_sampler_view *
@@ -1030,7 +1030,7 @@ rbug_context_create_sampler_view(struct pipe_context *_pipe,
result = pipe->create_sampler_view(pipe,
resource,
templ);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (result)
return rbug_sampler_view_create(rb_pipe, rb_resource, result);
@@ -1060,7 +1060,7 @@ rbug_context_create_surface(struct pipe_context *_pipe,
result = pipe->create_surface(pipe,
resource,
surf_tmpl);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (result)
return rbug_surface_create(rb_pipe, rb_resource, result);
@@ -1077,7 +1077,7 @@ rbug_context_surface_destroy(struct pipe_context *_pipe,
mtx_lock(&rb_pipe->call_mutex);
rbug_surface_destroy(rb_pipe,
rb_surface);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
@@ -1103,7 +1103,7 @@ rbug_context_transfer_map(struct pipe_context *_context,
level,
usage,
box, &result);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
*transfer = rbug_transfer_create(rb_pipe, rb_resource, result);
return *transfer ? map : NULL;
@@ -1123,7 +1123,7 @@ rbug_context_transfer_flush_region(struct pipe_context *_context,
context->transfer_flush_region(context,
transfer,
box);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
@@ -1141,7 +1141,7 @@ rbug_context_transfer_unmap(struct pipe_context *_context,
transfer);
rbug_transfer_destroy(rb_pipe,
rb_transfer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
@@ -1158,7 +1158,7 @@ rbug_context_buffer_subdata(struct pipe_context *_context,
mtx_lock(&rb_pipe->call_mutex);
context->buffer_subdata(context, resource, usage, offset, size, data);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
@@ -1186,7 +1186,7 @@ rbug_context_texture_subdata(struct pipe_context *_context,
data,
stride,
layer_stride);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index 323fafec08f..b3082da5839 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -188,7 +188,7 @@ rbug_texture_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
tr_tex = container_of(ptr, struct rbug_resource, list);
texs[i++] = VOID2U64(tr_tex);
}
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_texture_list_reply(tr_rbug->con, serial, texs, i, NULL);
FREE(texs);
@@ -215,7 +215,7 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
}
if (!tr_tex) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -235,7 +235,7 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
t->bind,
NULL);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -264,7 +264,7 @@ rbug_texture_read(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
}
if (!tr_tex) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -287,7 +287,7 @@ rbug_texture_read(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
context->transfer_unmap(context, t);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -307,7 +307,7 @@ rbug_context_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
rb_context = container_of(ptr, struct rbug_context, list);
ctxs[i++] = VOID2U64(rb_context);
}
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_context_list_reply(tr_rbug->con, serial, ctxs, i, NULL);
FREE(ctxs);
@@ -330,7 +330,7 @@ rbug_context_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -352,9 +352,9 @@ rbug_context_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
VOID2U64(rb_context->curr.zsbuf),
rb_context->draw_blocker, rb_context->draw_blocked, NULL);
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->draw_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -371,15 +371,15 @@ rbug_context_draw_block(struct rbug_rbug *tr_rbug, struct rbug_header *header, u
rb_context = rbug_get_context_locked(rb_screen, block->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
mtx_lock(&rb_context->draw_mutex);
rb_context->draw_blocker |= block->block;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -396,7 +396,7 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
rb_context = rbug_get_context_locked(rb_screen, step->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -407,11 +407,11 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
} else {
rb_context->draw_blocked &= ~step->step;
}
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -428,7 +428,7 @@ rbug_context_draw_unblock(struct rbug_rbug *tr_rbug, struct rbug_header *header,
rb_context = rbug_get_context_locked(rb_screen, unblock->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -440,11 +440,11 @@ rbug_context_draw_unblock(struct rbug_rbug *tr_rbug, struct rbug_header *header,
rb_context->draw_blocked &= ~unblock->unblock;
}
rb_context->draw_blocker &= ~unblock->unblock;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -461,7 +461,7 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
rb_context = rbug_get_context_locked(rb_screen, rule->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -472,11 +472,11 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
rb_context->draw_rule.surf = U642VOID(rule->surface);
rb_context->draw_rule.blocker = rule->block;
rb_context->draw_blocker |= RBUG_BLOCK_RULE;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -493,7 +493,7 @@ rbug_context_flush(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32
rb_context = rbug_get_context_locked(rb_screen, flush->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -502,8 +502,8 @@ rbug_context_flush(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32
rb_context->pipe->flush(rb_context->pipe, NULL, 0);
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -524,7 +524,7 @@ rbug_shader_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
rb_context = rbug_get_context_locked(rb_screen, list->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -535,8 +535,8 @@ rbug_shader_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
shdrs[i++] = VOID2U64(tr_shdr);
}
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_shader_list_reply(tr_rbug->con, serial, shdrs, i, NULL);
FREE(shdrs);
@@ -559,7 +559,7 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -568,8 +568,8 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
tr_shdr = rbug_get_shader_locked(rb_context, info->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -588,8 +588,8 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
tr_shdr->disabled,
NULL);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -607,7 +607,7 @@ rbug_shader_disable(struct rbug_rbug *tr_rbug, struct rbug_header *header)
rb_context = rbug_get_context_locked(rb_screen, dis->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -616,15 +616,15 @@ rbug_shader_disable(struct rbug_rbug *tr_rbug, struct rbug_header *header)
tr_shdr = rbug_get_shader_locked(rb_context, dis->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr->disabled = dis->disable;
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
@@ -644,7 +644,7 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
rb_context = rbug_get_context_locked(rb_screen, rep->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -653,8 +653,8 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
tr_shdr = rbug_get_shader_locked(rb_context, rep->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
@@ -695,9 +695,9 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
tr_shdr->replaced_shader = state;
out:
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
@@ -706,9 +706,9 @@ err:
tr_shdr->replaced_shader = NULL;
tr_shdr->replaced_tokens = NULL;
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -EINVAL;
}
diff --git a/src/gallium/drivers/rbug/rbug_screen.h b/src/gallium/drivers/rbug/rbug_screen.h
index 9e2d8ae253f..1972005753b 100644
--- a/src/gallium/drivers/rbug/rbug_screen.h
+++ b/src/gallium/drivers/rbug/rbug_screen.h
@@ -71,7 +71,7 @@ rbug_screen(struct pipe_screen *screen)
mtx_lock(&scr->list_mutex); \
insert_at_head(&scr->name, &obj->list); \
scr->num_##name++; \
- pipe_mutex_unlock(scr->list_mutex); \
+ mtx_unlock(&scr->list_mutex); \
} while (0)
#define rbug_screen_remove_from_list(scr, name, obj) \
@@ -79,7 +79,7 @@ rbug_screen(struct pipe_screen *screen)
mtx_lock(&scr->list_mutex); \
remove_from_list(&obj->list); \
scr->num_##name--; \
- pipe_mutex_unlock(scr->list_mutex); \
+ mtx_unlock(&scr->list_mutex); \
} while (0)
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index 05e91cbfe5a..7808903083b 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -298,7 +298,7 @@ svga_buffer_transfer_flush_region( struct pipe_context *pipe,
mtx_lock(&ss->swc_mutex);
svga_buffer_add_range(sbuf, offset, offset + length);
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
}
@@ -339,7 +339,7 @@ svga_buffer_transfer_unmap( struct pipe_context *pipe,
}
}
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
FREE(transfer);
SVGA_STATS_TIME_POP(svga_sws(svga));
}
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index e41f47520e8..9d93b48fd36 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -646,7 +646,7 @@ svga_buffer_update_hw(struct svga_context *svga, struct svga_buffer *sbuf)
assert(map);
assert(!retry);
if (!map) {
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
svga_buffer_destroy_hw_storage(ss, sbuf);
return PIPE_ERROR;
}
@@ -670,7 +670,7 @@ svga_buffer_update_hw(struct svga_context *svga, struct svga_buffer *sbuf)
sbuf->swbuf = NULL;
}
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
}
return PIPE_OK;
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c
index 053cfc58ce5..ee4ef3ca7b0 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.c
+++ b/src/gallium/drivers/svga/svga_sampler_view.c
@@ -96,13 +96,13 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
tex->cached_view->min_lod == min_lod &&
tex->cached_view->max_lod == max_lod) {
svga_sampler_view_reference(&sv, tex->cached_view);
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
SVGA_DBG(DEBUG_VIEWS, "svga: Sampler view: reuse %p, %u %u, last %u\n",
pt, min_lod, max_lod, pt->last_level);
svga_validate_sampler_view(svga_context(pipe), sv);
return sv;
}
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
}
sv = CALLOC_STRUCT(svga_sampler_view);
@@ -165,7 +165,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
mtx_lock(&ss->tex_mutex);
svga_sampler_view_reference(&tex->cached_view, sv);
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
debug_reference(&sv->reference,
(debug_reference_descriptor)
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 55f9426217c..d26e79a5c4a 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -154,7 +154,7 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen,
next = curr->next;
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
if (SVGA_DEBUG & DEBUG_DMA)
debug_printf("%s: cache %s after %u tries (bucket %d)\n", __FUNCTION__,
@@ -231,7 +231,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
if (surf_size >= SVGA_HOST_SURFACE_CACHE_BYTES) {
/* this surface is too large to cache, just free it */
sws->surface_reference(sws, &handle, NULL);
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
return;
}
@@ -249,7 +249,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
* just discard this surface.
*/
sws->surface_reference(sws, &handle, NULL);
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
return;
}
}
@@ -300,7 +300,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
sws->surface_reference(sws, &handle, NULL);
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
}
@@ -368,7 +368,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen,
next = curr->next;
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
}
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index 2df4f833523..9d03b16a34a 100644
--- a/src/gallium/drivers/trace/tr_dump.c
+++ b/src/gallium/drivers/trace/tr_dump.c
@@ -307,7 +307,7 @@ void trace_dump_call_lock(void)
void trace_dump_call_unlock(void)
{
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
/*
@@ -333,14 +333,14 @@ void trace_dumping_start(void)
{
mtx_lock(&call_mutex);
trace_dumping_start_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
void trace_dumping_stop(void)
{
mtx_lock(&call_mutex);
trace_dumping_stop_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
boolean trace_dumping_enabled(void)
@@ -348,7 +348,7 @@ boolean trace_dumping_enabled(void)
boolean ret;
mtx_lock(&call_mutex);
ret = trace_dumping_enabled_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
return ret;
}
@@ -402,7 +402,7 @@ void trace_dump_call_begin(const char *klass, const char *method)
void trace_dump_call_end(void)
{
trace_dump_call_end_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
void trace_dump_arg_begin(const char *name)
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index c46e56416fe..12af7f8a9ef 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -107,7 +107,7 @@ vc4_bo_from_cache(struct vc4_screen *screen, uint32_t size, const char *name)
* user will proceed to CPU map it and fill it with stuff.
*/
if (!vc4_bo_wait(bo, 0, NULL)) {
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
return NULL;
}
@@ -116,7 +116,7 @@ vc4_bo_from_cache(struct vc4_screen *screen, uint32_t size, const char *name)
bo->name = name;
}
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
return bo;
}
@@ -190,7 +190,7 @@ vc4_bo_last_unreference(struct vc4_bo *bo)
clock_gettime(CLOCK_MONOTONIC, &time);
mtx_lock(&screen->bo_cache.lock);
vc4_bo_last_unreference_locked_timed(bo, time.tv_sec);
- pipe_mutex_unlock(screen->bo_cache.lock);
+ mtx_unlock(&screen->bo_cache.lock);
}
static void
@@ -267,7 +267,7 @@ vc4_bo_cache_free_all(struct vc4_bo_cache *cache)
vc4_bo_remove_from_cache(cache, bo);
vc4_bo_free(bo);
}
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
}
void
@@ -347,7 +347,7 @@ vc4_bo_open_handle(struct vc4_screen *screen,
util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);
done:
- pipe_mutex_unlock(screen->bo_handles_mutex);
+ mtx_unlock(&screen->bo_handles_mutex);
return bo;
}
@@ -404,7 +404,7 @@ vc4_bo_get_dmabuf(struct vc4_bo *bo)
mtx_lock(&bo->screen->bo_handles_mutex);
bo->private = false;
util_hash_table_set(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
- pipe_mutex_unlock(bo->screen->bo_handles_mutex);
+ mtx_unlock(&bo->screen->bo_handles_mutex);
return fd;
}
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.h b/src/gallium/drivers/vc4/vc4_bufmgr.h
index e996d0cadac..838314f43df 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.h
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.h
@@ -101,7 +101,7 @@ vc4_bo_unreference(struct vc4_bo **bo)
vc4_bo_last_unreference(*bo);
}
- pipe_mutex_unlock(screen->bo_handles_mutex);
+ mtx_unlock(&screen->bo_handles_mutex);
}
*bo = NULL;