return batch->tiler_heap;
}
-/* TODO: Figure out how to remove the hardcoded values */
mali_ptr
panfrost_batch_get_tiler_meta(struct panfrost_batch *batch, unsigned vertex_count)
{
.tiler_heap_start = tiler_heap->gpu,
.tiler_heap_free = tiler_heap->gpu,
.tiler_heap_end = tiler_heap->gpu + tiler_heap->size,
+ .unk1 = 0x1,
+ .unk7e007e = 0x7e007e,
};
- tiler_heap_meta.zeros[10] = 0x1;
- tiler_heap_meta.zeros[11] = 0x7e007e;
-
struct bifrost_tiler_meta tiler_meta = {
- .hierarchy_mask = 0xf0,
+ .hierarchy_mask = 0x28,
.flags = 0x0,
.width = MALI_POSITIVE(batch->key.width),
.height = MALI_POSITIVE(batch->key.height),
mali_ptr tiler_heap_end;
/* hierarchy weights? but they're still 0 after the job has run... */
- u32 zeros[12];
+ u32 zeros[10];
+ u32 unk1;
+ u32 unk7e007e;
} __attribute__((packed));
struct bifrost_tiler_meta {
u64 zero0;
- u16 hierarchy_mask;
+ u16 hierarchy_mask; /* Five values observed: 0xa, 0x14, 0x28, 0x50, 0xa0 */
u16 flags;
u16 width;
u16 height;
pandecode_prop("zero = 0x%x", h->zero);
}
- for (int i = 0; i < 12; i++) {
- if (h->zeros[i] != 0) {
- pandecode_msg("XXX: tiler heap zero %d tripped, value %x\n",
- i, h->zeros[i]);
- }
- }
-
pandecode_prop("heap_size = 0x%x", h->heap_size);
MEMORY_PROP(h, tiler_heap_start);
MEMORY_PROP(h, tiler_heap_free);
free(a);
}
+ for (int i = 0; i < 10; i++) {
+ if (h->zeros[i] != 0) {
+ pandecode_msg("XXX: tiler heap zero %d tripped, value %x\n",
+ i, h->zeros[i]);
+ }
+ }
+
+ if (h->unk1 != 0x1) {
+ pandecode_msg("XXX: tiler heap unk1 tripped\n");
+ pandecode_prop("unk1 = 0x%x", h->unk1);
+ }
+
+ if (h->unk7e007e != 0x7e007e) {
+ pandecode_msg("XXX: tiler heap unk7e007e tripped\n");
+ pandecode_prop("unk7e007e = 0x%x", h->unk7e007e);
+ }
+
pandecode_indent--;
pandecode_log("};\n");
}
pandecode_prop("zero1 = 0x%" PRIx64, t->zero1);
}
+ if (t->hierarchy_mask != 0xa &&
+ t->hierarchy_mask != 0x14 &&
+ t->hierarchy_mask != 0x28 &&
+ t->hierarchy_mask != 0x50 &&
+ t->hierarchy_mask != 0xa0)
+ pandecode_prop("XXX: Unexpected hierarchy_mask (not 0xa, 0x14, 0x28, 0x50 or 0xa0)!");
+
pandecode_prop("hierarchy_mask = 0x%" PRIx16, t->hierarchy_mask);
+
pandecode_prop("flags = 0x%" PRIx16, t->flags);
pandecode_prop("width = MALI_POSITIVE(%d)", t->width + 1);