From 8d3e97344c3598002ad545878bf3831ffaeebeee Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 18 Aug 2021 05:57:31 +1000 Subject: [PATCH] llvmpipe: shorten hold time on the screen mutex There is no requirement to hold this mutex over the wait. I doubt it matters much in practice. Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/llvmpipe/lp_state_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index f70e7da..ec9a8f3 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -1361,9 +1361,9 @@ static void llvmpipe_launch_grid(struct pipe_context *pipe, struct lp_cs_tpool_task *task; mtx_lock(&screen->cs_mutex); task = lp_cs_tpool_queue_task(screen->cs_tpool, cs_exec_fn, &job_info, num_tasks); + mtx_unlock(&screen->cs_mutex); lp_cs_tpool_wait_for_task(screen->cs_tpool, &task); - mtx_unlock(&screen->cs_mutex); } llvmpipe->pipeline_statistics.cs_invocations += num_tasks * info->block[0] * info->block[1] * info->block[2]; } -- 2.7.4