From: Alyssa Rosenzweig Date: Mon, 21 Feb 2022 18:09:36 +0000 (-0500) Subject: asahi: Identify IOGPU_MISC data structure X-Git-Tag: upstream/22.3.5~11411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5ae88d36f8fe6a7e105624d773c536e2cefa35f;p=platform%2Fupstream%2Fmesa.git asahi: Identify IOGPU_MISC data structure This will be elaborated upon soon. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml index 92b1970..ab74bc7 100644 --- a/src/asahi/lib/cmdbuf.xml +++ b/src/asahi/lib/cmdbuf.xml @@ -597,4 +597,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c index c87f5cc..562bfc6 100644 --- a/src/asahi/lib/decode.c +++ b/src/asahi/lib/decode.c @@ -446,6 +446,7 @@ agxdecode_cmdstream(unsigned cmdbuf_handle, unsigned map_handle, bool verbose) DUMP_CL(IOGPU_INTERNAL_PIPELINES, ((uint32_t *) cmdbuf->ptr.cpu) + 156, "Internal pipelines"); DUMP_CL(IOGPU_AUX_FRAMEBUFFER, ((uint32_t *) cmdbuf->ptr.cpu) + 220, "Aux Framebuffer"); DUMP_CL(IOGPU_CLEAR_Z_S, ((uint32_t *) cmdbuf->ptr.cpu) + 276, "Clear Z/S"); + DUMP_CL(IOGPU_MISC, ((uint32_t *) cmdbuf->ptr.cpu) + 344, "Misc"); uint32_t *attachments = (uint32_t *) ((uint8_t *) cmdbuf->ptr.cpu + cmd.attachment_offset_1); unsigned attachment_count = attachments[3]; diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c index f3a7205..dde2504 100644 --- a/src/gallium/drivers/asahi/magic.c +++ b/src/gallium/drivers/asahi/magic.c @@ -109,26 +109,13 @@ demo_cmdbuf(uint64_t *buf, size_t size, map[300] = pipeline_null | 0x4; map[305] = 0x12; map[306] = pipeline_store | 0x4; - map[352] = 1; - map[360] = 0x1c; - map[362] = encoder_id; - map[365] = 0xffffffff; - map[366] = 1; - - uint64_t unk6 = demo_unk6(pool); - map[370] = unk6 & 0xFFFFFFFF; - map[371] = unk6 >> 32; - - map[374] = width; - map[375] = height; - map[376] = 1; - map[377] = 8; - map[378] = 8; - - map[393] = 8; - map[394] = 32; - map[395] = 32; - map[396] = 1; + + agx_pack(map + 344, IOGPU_MISC, cfg) { + cfg.encoder_id = encoder_id; + cfg.unknown_buffer = demo_unk6(pool); + cfg.width = width; + cfg.height = height; + } unsigned offset_unk = (458 * 4); unsigned offset_attachments = (470 * 4);