From: Rob Clark Date: Tue, 25 Aug 2020 17:03:31 +0000 (-0700) Subject: freedreno: add env var to override GMEM size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=688ca541e7bc0f5791afe0bc3f2fd2692634b281;p=mesa.git freedreno: add env var to override GMEM size Sometimes it is useful to force a smaller size while debugging. Signed-off-by: Rob Clark Part-of: --- diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 90704de8cd7..f2b8eee9531 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -879,7 +879,7 @@ fd_screen_create(struct fd_device *dev, struct renderonly *ro) DBG("could not get GMEM size"); goto fail; } - screen->gmemsize_bytes = val; + screen->gmemsize_bytes = env_var_as_unsigned("FD_MESA_GMEM", val); if (fd_device_version(dev) >= FD_VERSION_GMEM_BASE) { fd_pipe_get_param(screen->pipe, FD_GMEM_BASE, &screen->gmem_base); diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 4707496ef06..2a657cc42d9 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -32,6 +32,7 @@ #include "perfcntrs/freedreno_perfcntr.h" #include "pipe/p_screen.h" +#include "util/debug.h" #include "util/u_memory.h" #include "util/slab.h" #include "util/simple_mtx.h"