From 3cd6ac1e06d4f13245dcbb55ebd63a86573cfedf Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Mon, 5 Oct 2026 13:39:25 -0400 Subject: vgsp: GR server-managed context commit experiments (EVICT, VA promote, external path) Rung-2 bisection after the GET_CTX_BUFFER_INFO ABI fix made the server ctx geometry visible (8 buffers; MAIN 0x133000 FBMEM, PATCH 0x5000): - map the server MAIN/PATCH at the ladder ctx VAs with FBMEM PTEs and send the UVM-shape VA-only promote (bInitialize=0, bNonmapped=0). On the shared VAS the per-entry VA branch calls vaListSetManaged(NV_FALSE) and returns 0x40 because the server pre-booked MAIN as managed; EVICT_CTX (status 0) does not release that booking. - try the same VA promote on the external VAS where the server did not book (kgrctxMapCtxBuffers early-returns): the promote never replies (-110) and leaves the device in the locked fail-safe (WPR2 up, unbound). Do not repeat this shape without a new hypothesis. - FBMEM physAttr selection for the server MAIN fixed (aperture 2 -> 0x4); gsp_phys_rmcall_srv_ctxcommit parameter added (0 = pure server-managed, no client promote). - query prints all 16 entries and records PATCH; query ABI 80-B/5136. Hardware state after the external-VAS run: GPU wedged, reboot required (no automated reboot). All shapes stay default-off behind gr_promote=17 + gsp_phys_srv_ctxbuf. --- kernel/gsp_phys_gpu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index 91f7a77..94d6652 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -181,6 +181,25 @@ bool gsp_phys_srv_ctxbuf_value(void) } EXPORT_SYMBOL_GPL(gsp_phys_srv_ctxbuf_value); +/* + * Server-managed GR context client commit (default 1). On the + * gsp_phys_srv_ctxbuf path the ladder sends GPU_INITIALIZE_CTX + a PA-only + * GPU_PROMOTE_CTX for the server-reported MAIN context buffer. Set 0 to test + * the pure server-managed shape: the GSP-RM allocated/mapped/committed the + * context itself and no client control is sent. + */ +static bool gsp_phys_srv_ctxcommit_param = true; +module_param_named(gsp_phys_rmcall_srv_ctxcommit, gsp_phys_srv_ctxcommit_param, + bool, 0644); +MODULE_PARM_DESC(gsp_phys_rmcall_srv_ctxcommit, + "On the server-managed GR ctx path send GPU_INITIALIZE_CTX + PA-only GPU_PROMOTE_CTX for the server MAIN (default 1); 0 = pure server-managed, no client promote"); + +bool gsp_phys_srv_ctxcommit_value(void) +{ + return gsp_phys_srv_ctxcommit_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_srv_ctxcommit_value); + /* * P5 wave-1 shadow work forwarding (default 0). When set, the sema service * requests one real CE copy on the debugfs ladder's channel for each decoded -- cgit v1.2.3