diff options
Diffstat (limited to 'kernel/gsp_sema_service.c')
| -rw-r--r-- | kernel/gsp_sema_service.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 2b49d24..499247d 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -9801,6 +9801,26 @@ static u8 svc_gl_shader_type[32] = { static u64 svc_gl_vs_base[8]; static u8 svc_gl_vs_hi[8]; /* LOCATION_A upper byte per stream */ static u32 svc_gl_vs_log; +/* + * eng77: the client's VERTEX_STREAM_TURING macro call (CALL_MME_MACRO(2) + * = 0x3810) whose payload carries the VTG vertex-stream state (the + * 0x0450e100-family VA). The per-frame DRAW window slices exclude this + * call; capture the last observed payload (3 words) so the booter can + * replay it before the DRAW_IAB. The census scans every beef push. + */ +static u32 svc_gl_vs_call[3]; +static u8 svc_gl_vs_call_ok; +static u32 svc_gl_vs_call_log; + +bool gsp_sema_gl_vs_call(u32 out[3]) +{ + if (!out || !READ_ONCE(svc_gl_vs_call_ok)) + return false; + out[0] = READ_ONCE(svc_gl_vs_call[0]); + out[1] = READ_ONCE(svc_gl_vs_call[1]); + out[2] = READ_ONCE(svc_gl_vs_call[2]); + return true; +} u64 gsp_sema_gl_vs_base(u32 j) { @@ -18329,6 +18349,25 @@ static void svc_mme_census(const u8 *buf, u32 len, u64 push_va, u32 h_object) memcpy(&v1, buf + off + 8, 4); if (off + 16 <= len) memcpy(&v2, buf + off + 12, 4); + /* + * eng77: remember the VERTEX_STREAM_TURING + * CALL_MME_MACRO(2) payload (the VTG stream state + * the DRAW window slices omit). + */ + if (addr == 0x3810u && off + 16 <= len) { + bool changed = !READ_ONCE(svc_gl_vs_call_ok) || + READ_ONCE(svc_gl_vs_call[2]) != v2; + + WRITE_ONCE(svc_gl_vs_call[0], v0); + WRITE_ONCE(svc_gl_vs_call[1], v1); + WRITE_ONCE(svc_gl_vs_call[2], v2); + WRITE_ONCE(svc_gl_vs_call_ok, 1); + if (changed && svc_gl_vs_call_log < 8u) { + svc_gl_vs_call_log++; + pr_info("sema-gl: VS-CALL 0x3810 payload=%08x,%08x,%08x\n", + v0, v1, v2); + } + } lc += scnprintf(line + lc, sizeof(line) - lc, "%s0x%x@0x%x(%08x,%08x,%08x)", nhit ? "," : "", addr, off, v0, v1, v2); |
