diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-05 14:03:48 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-05 14:03:48 -0400 |
| commit | 5bb10d3780dd37fc2866a84a9f831613262d9c7a (patch) | |
| tree | 836d2e74ba77c123374df0fbb28f9f078b302264 /kernel/gsp_phys_gpu.c | |
| parent | 2a308ccd0786736693ef4369d387de33a0fe6447 (diff) | |
| download | open-iov-5bb10d3780dd37fc2866a84a9f831613262d9c7a.tar.gz open-iov-5bb10d3780dd37fc2866a84a9f831613262d9c7a.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.c | 26 |
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; |
