From 7b0ca94a7bccf4bdcb00614b91c13bcb99d57c17 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 7 Oct 2026 09:45:56 -0400 Subject: vgsp: m74 - R1 booking before F2 image init (context-image aux pointers) + CWD_FS readback The one-shot GR context-image initializer (0x52a94f8, pEngCtx+0x135) runs in F2's mapped-MAIN promote and consumes the per-VAS vaLists at that moment. With R1 after F2 the image carries zero PATCH/PM/priv-map/global pointers; the m72/m73 sampler signature (QMD ACTIVE then freed, FECS unloads exactly at dispatch, no fault) is consistent with the engine context restore failing on the empty image. gsp_phys_rmcall_gr_r1_first=1 sends R1 before F2 (default 0 = legacy order). Post-mortem now also reads CWD_FS (0x405b00). --- kernel/gsp_phys_gpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index ceb85ee..2f8a127 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -795,6 +795,26 @@ unsigned int gsp_phys_rmcall_gr_lmem_tpc_size_value(void) } EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_lmem_tpc_size_value); +/* + * m74 R1/F2 ordering (gsp_phys_rmcall_gr_r1_first; default 0). 1 = send the + * VA-only booking promote (R1) before F2's mapped-MAIN promote so the + * one-shot context-image initializer (0x52a94f8, pEngCtx+0x135) sees the + * per-VAS vaLists and writes their pointers into the GR context image; + * 0 = legacy order (R1 after F2). The FECS-unload-at-dispatch signature of + * m72/m73 is consistent with the image's aux pointers being zero. + */ +static int gsp_phys_rmcall_gr_r1_first_param; +module_param_named(gsp_phys_rmcall_gr_r1_first, + gsp_phys_rmcall_gr_r1_first_param, int, 0644); +MODULE_PARM_DESC(gsp_phys_rmcall_gr_r1_first, + "Send the R1 VA booking before F2's mapped-MAIN promote (default 0 = legacy order)"); + +int gsp_phys_rmcall_gr_r1_first_value(void) +{ + return gsp_phys_rmcall_gr_r1_first_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_rmcall_gr_r1_first_value); + /* * m73 sysmem instance/RAMFC selector (gsp_phys_rmcall_gr_inst_sys; default 0). * The m70 capture-shape FBMEM instance/ramfc makes the FECS context load -- cgit v1.2.3