lima: add noheap debug option
authorQiang Yu <yuq825@gmail.com>
Wed, 15 Jan 2020 10:00:19 +0000 (18:00 +0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jan 2020 03:39:21 +0000 (03:39 +0000)
Disable using heap buffer when set.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@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
src/gallium/drivers/lima/lima_screen.h

index 1595068759503dfee0ac0af8c7784669545bc8fc..0995ac86e6d0d8444ada9367a9ed920203a9087e 100644 (file)
@@ -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 }
 };
 
index 591939da9411ddce280718cef5f16f427eb1f6b2..fd6ec4e368f412017e2a9f250a22b839180458cb 100644 (file)
@@ -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;