From: Rob Clark Date: Mon, 2 Jan 2017 22:22:13 +0000 (-0500) Subject: freedreno: add "nogrow" debug param X-Git-Tag: upstream/17.1.0~3246 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99e9dca149e2484c9472a0518eee5e2099bdb251;p=platform%2Fupstream%2Fmesa.git freedreno: add "nogrow" debug param Sometimes it is useful to disable the "growable" cmdstream buffers for debugging. (See 419a154d in libdrm) Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index 646c76f..f5a5c6a 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -48,7 +48,8 @@ batch_init(struct fd_batch *batch) * we don't need to grow the ringbuffer. Performance is likely to * suffer, but there is no good alternative. */ - if (fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) { + if ((fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) || + (fd_mesa_debug & FD_DBG_NOGROW)){ size = 0x100000; } diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 2fafb52..2ff89eb 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -78,6 +78,7 @@ static const struct debug_named_value debug_options[] = { {"nir", FD_DBG_NIR, "Prefer NIR as native IR"}, {"reorder", FD_DBG_REORDER,"Enable reordering for draws/blits"}, {"bstat", FD_DBG_BSTAT, "Print batch stats at context destroy"}, + {"nogrow", FD_DBG_NOGROW, "Disable \"growable\" cmdstream buffers, even if kernel supports it"}, DEBUG_NAMED_VALUE_END }; diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index c699f7b..08bc5d7 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -79,6 +79,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op); #define FD_DBG_NIR 0x4000 #define FD_DBG_REORDER 0x8000 #define FD_DBG_BSTAT 0x10000 +#define FD_DBG_NOGROW 0x20000 extern int fd_mesa_debug; extern bool fd_binning_enabled;