pan/decode: Don't try to dereference heap mapping
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Aug 2020 17:48:26 +0000 (13:48 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 20 Aug 2020 16:15:00 +0000 (18:15 +0200)
It might not be mapped from our perspective, we shouldn't crash on that
just for a validation that isn't actually correct.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>

src/panfrost/lib/decode.c

index 0dd500c153fb5036310859ddc5d55eea660afa66..e51c7fb8289fd20a719819b38f370264aee2b174 100644 (file)
@@ -393,9 +393,6 @@ pandecode_midgard_tiler_descriptor(
         MEMORY_PROP(t, heap_start);
         assert(t->heap_end >= t->heap_start);
 
-        struct pandecode_mapped_memory *heap =
-                pandecode_find_mapped_gpu_mem_containing(t->heap_start);
-
         unsigned heap_size = t->heap_end - t->heap_start;
 
         /* Tiling is enabled with a special flag */
@@ -405,13 +402,6 @@ pandecode_midgard_tiler_descriptor(
         bool tiling_enabled = hierarchy_mask;
 
         if (tiling_enabled) {
-                /* When tiling is enabled, the heap should be a tight fit */
-                unsigned heap_offset = t->heap_start - heap->gpu_va;
-                if ((heap_offset + heap_size) != heap->length) {
-                        pandecode_msg("XXX: heap size %u (expected %zu)\n",
-                                        heap_size, heap->length - heap_offset);
-                }
-
                 /* We should also have no other flags */
                 if (tiler_flags)
                         pandecode_msg("XXX: unexpected tiler %X\n", tiler_flags);