From: Qiang Yu Date: Fri, 7 Feb 2020 12:32:51 +0000 (+0800) Subject: lima: enable multi submit optimization X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5502bc83b0e4d4542bc5234fe6592db575658356;p=mesa.git lima: enable multi submit optimization Also provide a debug option to disable it. Reviewed-by: Vasily Khoruzhick Signed-off-by: Qiang Yu Part-of: --- diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c index 9f283297857..82d99a5e679 100644 --- a/src/gallium/drivers/lima/lima_screen.c +++ b/src/gallium/drivers/lima/lima_screen.c @@ -466,6 +466,8 @@ static const struct debug_named_value debug_options[] = { "don't use tiled buffers" }, { "nogrowheap", LIMA_DEBUG_NO_GROW_HEAP, "disable growable heap buffer" }, + { "singlesubmit", LIMA_DEBUG_SINGLE_SUBMIT, + "disable multi submit optimization" }, { NULL } }; diff --git a/src/gallium/drivers/lima/lima_screen.h b/src/gallium/drivers/lima/lima_screen.h index fd6ec4e368f..e3cd40112c4 100644 --- a/src/gallium/drivers/lima/lima_screen.h +++ b/src/gallium/drivers/lima/lima_screen.h @@ -41,6 +41,7 @@ #define LIMA_DEBUG_BO_CACHE (1 << 5) #define LIMA_DEBUG_NO_TILING (1 << 6) #define LIMA_DEBUG_NO_GROW_HEAP (1 << 7) +#define LIMA_DEBUG_SINGLE_SUBMIT (1 << 8) extern uint32_t lima_debug; extern int lima_ctx_num_plb; diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c index 45795249a39..2b48a3a124c 100644 --- a/src/gallium/drivers/lima/lima_state.c +++ b/src/gallium/drivers/lima/lima_state.c @@ -41,8 +41,9 @@ lima_set_framebuffer_state(struct pipe_context *pctx, { struct lima_context *ctx = lima_context(pctx); - /* submit need framebuffer info, flush before change it */ - lima_flush(ctx); + /* make sure there are always single submit in this context */ + if (lima_debug & LIMA_DEBUG_SINGLE_SUBMIT) + lima_flush(ctx); struct lima_context_framebuffer *fb = &ctx->framebuffer;