diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-15 18:55:38 -0500 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-15 18:55:38 -0500 |
| commit | 7303ac45da9b39dc7f10b226ab1aaed9848c00f1 (patch) | |
| tree | c30ea2ee79bccbf688551b077e51f4bc53f16641 /kernel | |
| parent | cb786b9bdb188b49614ebba77d8359f74af5e416 (diff) | |
| download | open-iov-7303ac45da9b39dc7f10b226ab1aaed9848c00f1.tar.gz open-iov-7303ac45da9b39dc7f10b226ab1aaed9848c00f1.zip | |
vgsp: eng71b - also emit the Turing stream size when the window carries VS
c814 (eng70): a 491-word release window has VS0=0x1020/0/01e90000 and
VS1=0x1020/0/01e9000c (real stream binds) and VA=0xd74=0x08, but
SZ0=0 and wrote=0. The Turing stream SIZE pair (0x600/0x604) is
client channel state the replay never receives; a zero size can clamp
the fetch to zero vertices.
Always prepend the size pair (0x600<-0, 0x604<-0x100000) on release
saves with sema_gl_vs_autobind>=2 when the window has no 0x600 run,
even when its own VS location is present (MME-VS-SIZE ... (window has
VS) receipt).
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 40606c9..990e33c 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -19264,6 +19264,28 @@ static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req, return 0; } +/* Does the window already carry the Turing stream-size run (0x600)? */ +static bool gsp_phys_gr_mme_window_has_vs_size(const u32 *win, u32 n) +{ + u32 r = 0; + + while (r < n) { + u32 h = win[r]; + u32 op = (h >> 29) & 7u; + u32 cnt = (h >> 16) & 0x1fffu; + u32 span = 1u; + u32 m0 = (h & 0xfffu) << 2; + + if ((op == 1u || op == 3u || op == 5u) && cnt && + r + 1u + cnt <= n) + span = 1u + cnt; + if (m0 == 0x600u && span >= 3u) + return true; + r += span; + } + return false; +} + static u32 gsp_phys_gr_mme_release_due_ms(void) { u32 ms = READ_ONCE(gsp_phys_rmcall_gr_mme_pack_release_ms); @@ -19480,7 +19502,9 @@ static void gsp_phys_gr_mme_release_save(const struct gsp_phys_gr_submit *req, /* * Stream size (Turing binds SIZE_A/B; the * replay has none). 1 MB covers the 24x20 B - * payload with margin. + * payload with margin. Emitted for every + * prepend; the once-only block below also + * covers windows that carry the location. */ if (vj == 0u && READ_ONCE(gsp_phys_rmcall_gr_vs_autobind) >= @@ -19495,6 +19519,23 @@ static void gsp_phys_gr_mme_release_save(const struct gsp_phys_gr_submit *req, req->h_object, req->push_va); } } + /* + * A window that already carries its own VS location + * (c814: VS0/VS1 nonzero) still lacks the Turing + * stream size; bind it here so the fetch is not + * clamped to zero. + */ + if (READ_ONCE(gsp_phys_rmcall_gr_vs_autobind) >= 2u && + !gsp_phys_gr_mme_window_has_vs_size(req->stream, + req->stream_n) && + vs_n + 3u <= ARRAY_SIZE(vs_pre)) { + vs_pre[vs_n++] = (1u << 29) | (2u << 16) | + ((0x600u >> 2) & 0xfffu); + vs_pre[vs_n++] = 0u; + vs_pre[vs_n++] = 0x00100000u; + pr_info("vgsp-gr: MME-VS-SIZE synth j=0 size=0x100000 (window has VS) h=0x%x push=0x%llx\n", + req->h_object, req->push_va); + } } if (req->stream_n + vs_n > GSP_PHYS_GR_MME_RELEASE_WIN_MAX) vs_n = 0; |
