Mesa (staging/20.1): pan/mdg: Free previous liveness

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 22 12:05:10 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 110950c8d571b108d9bbfb5aa398eceba83a0f13
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=110950c8d571b108d9bbfb5aa398eceba83a0f13

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue Aug 18 08:26:40 2020 -0400

pan/mdg: Free previous liveness

Before we drop the reference.

160 calls with 0B peak consumption from:
    0xffffbd9d2fc3
      in ??
    pan_compute_liveness
      at ../src/panfrost/util/pan_liveness.c:127
      in /home/alyssa/rockchip_dri.so
    mir_compute_liveness
      at ../src/panfrost/midgard/midgard_liveness.c:55
      in /home/alyssa/rockchip_dri.so
    midgard_opt_dead_code_eliminate
      at ../src/panfrost/midgard/midgard_opt_dce.c:118
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
(cherry picked from commit 8dd38e5a3e68d67d6050f8bcba28cf3514ef1eef)

---

 .pick_status.json                | 2 +-
 src/panfrost/util/pan_liveness.c | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index fb29a2ec84c..5871cec20ec 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -742,7 +742,7 @@
         "description": "pan/mdg: Free previous liveness",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/panfrost/util/pan_liveness.c b/src/panfrost/util/pan_liveness.c
index a46a11d9d3c..de69dec6392 100644
--- a/src/panfrost/util/pan_liveness.c
+++ b/src/panfrost/util/pan_liveness.c
@@ -128,11 +128,13 @@ pan_compute_liveness(
                         _mesa_hash_pointer,
                         _mesa_key_pointer_equal);
 
-        /* Allocate */
+        /* Free any previous liveness, and allocate */
+
+        pan_free_liveness(blocks);
 
         list_for_each_entry(pan_block, block, blocks, link) {
-                block->live_in = rzalloc_array(NULL, uint16_t, temp_count);
-                block->live_out = rzalloc_array(NULL, uint16_t, temp_count);
+                block->live_in = rzalloc_array(block, uint16_t, temp_count);
+                block->live_out = rzalloc_array(block, uint16_t, temp_count);
         }
 
         /* Initialize the work list with the exit block */



More information about the mesa-commit mailing list