From ef2e68b9e64cb1ebffe49fc7dec7c821747b9aa6 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 15 Nov 2026 17:24:43 -0500 Subject: vgsp: eng66 - DRAW_IAB raster-state census and CALL(34) arg dump Mesa mme_tu104_sim replay of the golden slot-34 body with the c788 CALL args [4,8,3,6,9,12,15,18,21,24] emits 8 draw sequences: BEGIN(0x1618)<-4, SET_VERTEX_ARRAY_START(0xd74)<-{0,3,...,21}, DRAW_VERTEX_ARRAY(0xd78)<-3, END(0x1614)<-0. The draw is issued; the stores stay 0, so the next question is the raster state the emitted draw consumes. - MME-CALL-ARGS: dump the slot-34 CALL payload at the held-window census (Mesa sim input, replayable offline). - DRAW-STATE (one-shot per release launch, after GUEST GR LAUNCH OK): color target 0/1 (0x800..0x810/0x840..0x850), vertex streams (0x1c00/0x1c04/0x1c08/0x1c0c, 0x1c10/.., 0x1c30/..), viewport (0xa00..), the BEGIN/END draw pair (0x270/0x274) and the emitted 0xd74/0xd78 through the C597 method shadow. Diagnostic only; no emission change. --- kernel/gsp_phys_booter.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'kernel') diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index e927d2d..deb4e0a 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -5395,6 +5395,58 @@ static void gsp_phys_store_side_log(void __iomem *bar0, const char *tag, static void gsp_phys_ds_image_census(const char *tag, u32 h_object, const u32 s[6], const u32 u[6]); +/* + * DRAW_IAB raster-state census (one-shot per release launch): the MME macro + * emits BEGIN(0x1618)/SET_VERTEX_ARRAY_START(0xd74)/DRAW_VERTEX_ARRAY(0xd78)/ + * END(0x1614) (Mesa mme_tu104_sim replay of the golden slot-34 body with the + * c788 args [4,8,3,6,9,12,15,18,21,24] emits 8 draws of 3 vertices with + * first_vertex 0,3,...,21). The draw is issued; this census names the state + * the raster path consumes: the color target 0/1 offset/width/height/format, + * the vertex-stream FORMAT/ADDRESS methods (0x1c00..0x1c38), the viewport, the + * BEGIN/END draw pair, and the emitted vertex-array start/count. + */ +static void gsp_phys_draw_state_log(void __iomem *bar0, u32 h_object, + u64 push_va) +{ + static u32 draw_state_n; + + if (!bar0 || draw_state_n >= 4u) + return; + draw_state_n++; + pr_info("vgsp-draw: DRAW-STATE h=0x%x push=0x%llx RT0=%08x/%08x/%08x/%08x/%08x RT1=%08x/%08x/%08x/%08x/%08x\n", + h_object, (unsigned long long)push_va, + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0800u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0804u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0808u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x080cu), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0810u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0840u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0844u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0848u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x084cu), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0850u)); + pr_info("vgsp-draw: DRAW-STATE h=0x%x VS0=%08x/%08x/%08x/%08x VS1=%08x/%08x/%08x VS3=%08x/%08x/%08x VP0=%08x/%08x/%08x/%08x DRAW=%08x/%08x VA=%08x/%08x\n", + h_object, + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c00u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c04u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c08u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c0cu), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c10u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c14u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c18u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c30u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c34u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x1c38u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0a00u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0a04u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0a0cu), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0a10u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0270u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0274u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0d74u), + gsp_phys_mme_shadow_read(bar0, 0xc597u, 0x0d78u)); +} + static bool gsp_phys_mme_fast_sample(void __iomem *bar0, const char *tag, u32 h_object, u32 ms_override) { @@ -19130,7 +19182,19 @@ static void gsp_phys_gr_mme_call_census(const struct gsp_phys_gr_submit *req, calls++; targets |= 1ull << j; if (j == 34u) { + char abuf[12 * 10 + 1]; + u32 ai, alen = min_t(u32, span - 1u, + 12u), apos = 0; + slot34 = 1; + for (ai = 0; ai < alen; ai++) + apos += scnprintf(abuf + apos, + sizeof(abuf) - apos, + "%s%08x", + ai ? "," : "", + req->stream[r + 1u + ai]); + pr_info("vgsp-gr: MME-CALL-ARGS slot=34 hdr=%08x args=%s (%u words)\n", + h, abuf, alen); pr_info("vgsp-gr: MME-CALL-TARGET slot=34 method=0x%x client=0x%x golden=0x%x used=0x%x win=%u held=%u\n", m, have_cli ? sa_ent[j] : 0u, have_gold ? gent : 0u, @@ -36144,6 +36208,8 @@ gr_page_unmapped: pr_info("vgsp-gr: GUEST GR LAUNCH OK h=0x%x push=0x%llx qmd=0x%llx prog/pages=%u qmd_rel=0x%08x ch_rel=0x%08x elapsed_ms=%u ok=%llu\n", req->h_object, req->push_va, req->qmd_va, req->n_pages, w0, w1, jiffies_to_msecs(jiffies - start), gsp_phys_gr_ok); + if (req->mme_release) + gsp_phys_draw_state_log(bar0, req->h_object, req->push_va); /* m128: post-success qmdwin words so a probe that stores a value into * the qmdwin page (e.g. p6's constant-read dump at w48) is readable * from the success log (the post-mortem only prints on timeout). -- cgit v1.2.3