lima: enable multi submit optimization

Also provide a debug option to disable it.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
This commit is contained in:
Qiang Yu 2020-02-07 20:32:51 +08:00 committed by Marge Bot
parent 131c505690
commit 5502bc83b0
3 changed files with 6 additions and 2 deletions

View File

@ -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 }
};

View File

@ -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;

View File

@ -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;