Mesa (master): lima: add noheap debug option

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 30 04:00:56 UTC 2020


Module: Mesa
Branch: master
Commit: c5e4d287243e13c4311baf0f9b51d3ba60d0b974
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5e4d287243e13c4311baf0f9b51d3ba60d0b974

Author: Qiang Yu <yuq825 at gmail.com>
Date:   Wed Jan 15 18:00:19 2020 +0800

lima: add noheap debug option

Disable using heap buffer when set.

Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Signed-off-by: Qiang Yu <yuq825 at gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3264>

---

 src/gallium/drivers/lima/lima_screen.c | 5 +++++
 src/gallium/drivers/lima/lima_screen.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/gallium/drivers/lima/lima_screen.c b/src/gallium/drivers/lima/lima_screen.c
index 15950687595..0995ac86e6d 100644
--- a/src/gallium/drivers/lima/lima_screen.c
+++ b/src/gallium/drivers/lima/lima_screen.c
@@ -397,6 +397,9 @@ lima_screen_query_info(struct lima_screen *screen)
 
    drmFreeVersion(version);
 
+   if (lima_debug & LIMA_DEBUG_NO_GROW_HEAP)
+      screen->has_growable_heap_buffer = false;
+
    struct drm_lima_get_param param;
 
    memset(&param, 0, sizeof(param));
@@ -464,6 +467,8 @@ static const struct debug_named_value debug_options[] = {
           "print debug info for BO cache" },
         { "notiling", LIMA_DEBUG_NO_TILING,
           "don't use tiled buffers" },
+        { "nogrowheap",   LIMA_DEBUG_NO_GROW_HEAP,
+          "disable growable heap buffer" },
         { NULL }
 };
 
diff --git a/src/gallium/drivers/lima/lima_screen.h b/src/gallium/drivers/lima/lima_screen.h
index 591939da941..fd6ec4e368f 100644
--- a/src/gallium/drivers/lima/lima_screen.h
+++ b/src/gallium/drivers/lima/lima_screen.h
@@ -40,6 +40,7 @@
 #define LIMA_DEBUG_NO_BO_CACHE    (1 << 4)
 #define LIMA_DEBUG_BO_CACHE       (1 << 5)
 #define LIMA_DEBUG_NO_TILING      (1 << 6)
+#define LIMA_DEBUG_NO_GROW_HEAP   (1 << 7)
 
 extern uint32_t lima_debug;
 extern int lima_ctx_num_plb;



More information about the mesa-commit mailing list