From aff698d003d256a41bf7d4062bb81792457d3219 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Mon, 5 Oct 2026 14:03:48 -0400 Subject: vgsp: srv_ctxcommit mode 2 (V6 client combined init+VA entry) Make gsp_phys_rmcall_srv_ctxcommit an int mode: 1 (default) = map + INITIALIZE_CTX + UVM-shape VA-only promote; 2 = V6 client variant, no INITIALIZE_CTX and one combined PA+VA MAIN entry with bInitialize=1 and bNonmapped=0 so the first ctxsw initializes from the golden image; 0 = pure server-managed. Lets the next supervised cycle bisect both entry shapes without a rebuild. Build clean; not hardware-tested (GPU wedged). --- kernel/gsp_phys_gpu.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index 54fa84a..1bb6f1d 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -182,24 +182,32 @@ 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. + * Server-managed GR context client-commit mode. 1 (default): map the + * server/client MAIN at the ladder ctx VA, GPU_INITIALIZE_CTX installs the + * memdesc, then the UVM-shape VA-only promote (bInitialize=0). 2 = client + * (V6) variant only: no INITIALIZE_CTX and one combined PA+VA MAIN entry + * with bInitialize=1, bNonmapped=0 (the init half plus the promote half), so + * the first ctxsw initializes from the golden image. 0 = pure + * server-managed, no client controls. */ -static bool gsp_phys_srv_ctxcommit_param = true; +static int gsp_phys_srv_ctxcommit_param = 1; module_param_named(gsp_phys_rmcall_srv_ctxcommit, gsp_phys_srv_ctxcommit_param, - bool, 0644); + int, 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"); + "Server-managed GR ctx client commit: 1 = INITIALIZE_CTX + VA-only promote (default), 2 = V6 client combined init+VA entry without INITIALIZE_CTX, 0 = none"); bool gsp_phys_srv_ctxcommit_value(void) { - return gsp_phys_srv_ctxcommit_param; + return gsp_phys_srv_ctxcommit_param != 0; } EXPORT_SYMBOL_GPL(gsp_phys_srv_ctxcommit_value); +int gsp_phys_srv_ctxcommit_mode(void) +{ + return gsp_phys_srv_ctxcommit_param; +} +EXPORT_SYMBOL_GPL(gsp_phys_srv_ctxcommit_mode); + /* * Force one channel-alloc variant id on the GR ladder (default 0 = the * promote-mode-selected default). 5 = V5 (client memdescs, no skip-ctxbuffer; -- cgit v1.2.3