This matches the hardware's view of memory and helps catch spurious reads. (One
symptom of messing this up -- besides broken rendering -- is a kernel warning
about a "bogus texture handle 0".)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815>
}
void
-agxdecode_dump_mappings(void)
+agxdecode_dump_mappings(unsigned map_handle)
{
agxdecode_dump_file_open();
+ struct agx_bo *map = agxdecode_find_handle(map_handle, AGX_ALLOC_MEMMAP);
+ assert(map != NULL && "nonexistant mapping");
+ agxdecode_validate_map(map->ptr.cpu);
+
for (unsigned i = 0; i < mmap_count; ++i) {
- if (!mmap_array[i].ptr.cpu || !mmap_array[i].size)
+ if (!mmap_array[i].ptr.cpu || !mmap_array[i].size || !mmap_array[i].mapped)
continue;
assert(mmap_array[i].type < AGX_NUM_ALLOC);
void agxdecode_track_alloc(struct agx_bo *alloc);
-void agxdecode_dump_mappings(void);
+void agxdecode_dump_mappings(unsigned map_index);
void agxdecode_track_free(struct agx_bo *bo);