summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 14:03:48 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 14:03:48 -0400
commitaff698d003d256a41bf7d4062bb81792457d3219 (patch)
treea0cb796c505e0c0188b5845f747f2a38082ae33f /kernel/gsp_phys_gpu.c
parent9575bcb9c69cdf0b166f0ad755f7f75a24bfbba6 (diff)
downloadopen-iov-aff698d003d256a41bf7d4062bb81792457d3219.tar.gz
open-iov-aff698d003d256a41bf7d4062bb81792457d3219.zip
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).
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c26
1 files changed, 17 insertions, 9 deletions
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;