From 1f0df0c62cc6786de9c230f6c4196e14653a30e2 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sat, 14 Nov 2026 14:17:29 -0500 Subject: vgsp: per-channel MME pack completion accounting + rearm release + context-reset invalidation (eng40, validation pending) After the multi-part beef pack completes (2799/2799; keep_gen=1 works), the prelude generation drifts and the pack branch refuses re-emission (poff==maxa), so calls stay held forever (pcv=0, shadow draws 0, wrote=0). This adds: (1) per-channel contiguous-load accounting + pack_done_h so the completion is remembered for the loaded channel; (2) an MME-PACK-REARM call release when a completed pack's channel launches again; (3) gsp_phys_gr_mme_chan_ctx_reset(h) invalidation on context wipes/channel re-registers (the client recycles the beef channel between pushes, c496), shown firing safely. Validation: the fix was not yet observed completing on a green window with a same-incarnation draw; committed for reproducibility per house style. --- kernel/gsp_rm_emulation.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kernel/gsp_rm_emulation.c') diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index b928faf..d4390b9 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -3674,6 +3674,14 @@ static void gsp_rm_register_channel(struct gsp_emu_context *ctx, u32 h_client, struct sema_channel_desc desc; u64 userd_wire_base = 0; + /* + * eng40: a (re-)registration gives this channel a fresh engine + * context; the MME program it may have held is gone, so invalidate + * the per-channel pack-completion state (no-op unless the + * pack_keep_gen + golden_force knobs are on). + */ + gsp_phys_gr_mme_chan_ctx_reset(h_object); + /* * CONT.405: name the registration attempt for the direct-GL client's * channel families. A "beef"/"bfef" handle that appears more than -- cgit v1.2.3