From 89b6c93ae3135a44b1aa2ce9285502a3898920bc Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 31 May 2017 22:04:29 +0200 Subject: util/u_queue: add an option to set the minimum thread priority MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_threaded_context.c | 2 +- src/gallium/drivers/freedreno/freedreno_batch.c | 2 +- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 2 +- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 929e186683f..3038fc66830 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2203,7 +2203,7 @@ threaded_context_create(struct pipe_context *pipe, * from the queue before being executed, so keep one tc_batch slot for that * execution. Also, keep one unused slot for an unflushed batch. */ - if (!util_queue_init(&tc->queue, "gallium_drv", TC_MAX_BATCHES - 2, 1)) + if (!util_queue_init(&tc->queue, "gallium_drv", TC_MAX_BATCHES - 2, 1, 0)) goto fail; for (unsigned i = 0; i < TC_MAX_BATCHES; i++) { diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index 9871447497e..7c7a45be84d 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -276,7 +276,7 @@ batch_flush(struct fd_batch *batch) fd_batch_reference(&tmp, batch); if (!util_queue_is_initialized(&batch->ctx->flush_queue)) - util_queue_init(&batch->ctx->flush_queue, "flush_queue", 16, 1); + util_queue_init(&batch->ctx->flush_queue, "flush_queue", 16, 1, 0); util_queue_add_job(&batch->ctx->flush_queue, batch, &batch->flush_fence, diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 0c2f6b37dba..47426b41da6 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -890,7 +890,7 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) num_compiler_threads = MIN2(num_cpus, ARRAY_SIZE(sscreen->tm)); if (!util_queue_init(&sscreen->shader_compiler_queue, "si_shader", - 32, num_compiler_threads)) { + 32, num_compiler_threads, 0)) { si_destroy_shader_cache(sscreen); FREE(sscreen); return NULL; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index c8bd60efdce..43f2ed2fbf4 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -305,7 +305,7 @@ amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create) (void) mtx_init(&ws->global_bo_list_lock, mtx_plain); (void) mtx_init(&ws->bo_fence_lock, mtx_plain); - if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1)) { + if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1, 0)) { amdgpu_winsys_destroy(&ws->base); mtx_unlock(&dev_tab_mutex); return NULL; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index a485615ae4f..9bbffa514a4 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -821,7 +821,7 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create) ws->info.gart_page_size = sysconf(_SC_PAGESIZE); if (ws->num_cpus > 1 && debug_get_option_thread()) - util_queue_init(&ws->cs_queue, "radeon_cs", 8, 1); + util_queue_init(&ws->cs_queue, "radeon_cs", 8, 1, 0); /* Create the screen at the end. The winsys must be initialized * completely. -- cgit v1.2.3