asahi: Move IOGPU header to XML

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
This commit is contained in:
Alyssa Rosenzweig 2021-07-05 19:45:41 -04:00 committed by Marge Bot
parent 0b9e8181da
commit c1d8ed1bc2
2 changed files with 16 additions and 7 deletions

View File

@ -465,6 +465,16 @@
<value name="Depth" value="0xC"/>
</enum>
<struct name="IOGPU Header" size="48">
<field name="Unk 0" start="0:0" size="32" default="0x10000" type="hex"/>
<field name="Total size" start="1:0" size="32" type="uint"/>
<field name="Unk 2" start="2:0" size="32" default="0x7" type="hex"/>
<field name="Attachment offset 1" start="8:0" size="32" type="uint"/>
<field name="Unk 3" start="9:0" size="32" default="0x18" type="hex"/>
<field name="Attachment offset 2" start="10:0" size="32" type="uint"/>
<field name="Unknown offset" start="11:0" size="32" type="uint"/>
</struct>
<struct name="IOGPU Attachment" size="24">
<field name="Unk 0" start="0:0" size="16" default="0x100" type="hex"/>
<field name="Address" start="0:16" size="48" type="address"/>

View File

@ -242,13 +242,12 @@ demo_cmdbuf(uint64_t *buf, size_t size,
unsigned total_size = (cmdbuf->offset * 4);
cmdbuf->map[0] = 0x10000;
cmdbuf->map[1] = total_size;
cmdbuf->map[2] = 7;
cmdbuf->map[8] = offset_attachments;
cmdbuf->map[9] = 0x18;
cmdbuf->map[10] = offset_attachments;
cmdbuf->map[11] = offset_unk;
agx_pack(cmdbuf->map, IOGPU_HEADER, cfg) {
cfg.total_size = total_size;
cfg.attachment_offset_1 = offset_attachments;
cfg.attachment_offset_2 = offset_attachments;
cfg.unknown_offset = offset_unk;
}
return total_size;
}