summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_booter.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 13:40:15 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 13:40:15 -0400
commite075cb90a31b1b6dd6deec713faa0db9f21218dc (patch)
treeeb9c07872f45a2b28eeef9b87f198a0ee5f7a453 /kernel/gsp_phys_booter.c
parent3cd6ac1e06d4f13245dcbb55ebd63a86573cfedf (diff)
downloadopen-iov-e075cb90a31b1b6dd6deec713faa0db9f21218dc.tar.gz
open-iov-e075cb90a31b1b6dd6deec713faa0db9f21218dc.zip
vgsp: add gsp_phys_rmcall_channel to force one GR channel variant
Lets a bisection pair any promote shape with any channel shape, in particular V6 (SKIP_CTXBUFFER_ALLOC, KMD-managed) with the server-managed VA-only promote: with skip-ctxbuffer the server's kgrctxMapCtxBuffers does not pre-book the engine context vaList, so the VA branch's vaListSetManaged(NV_FALSE) gate should pass and the per-buffer commit can program the engine context VA. Default 0 keeps the mode-selected walk byte-identical. Not hardware-tested (GPU wedged; see Handoff ADDENDUM 51).
Diffstat (limited to 'kernel/gsp_phys_booter.c')
-rw-r--r--kernel/gsp_phys_booter.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index fae657c..3a65361 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -7249,6 +7249,40 @@ static int gsp_phys_rmcall_alloc_channel(void __iomem *bar0)
vars = &gsp_phys_rmcall_channel_variants[0];
attempts = 1;
}
+ /*
+ * Optional explicit force (gsp_phys_rmcall_channel=N): pin the walk to
+ * one variant after the mode-based selection so a bisection can pair
+ * any promote shape with any channel shape (e.g. V6 skip-ctxbuffer +
+ * the srvctx VA-only promote).
+ */
+ if (gsp_phys_rmcall_engine_is_gr() &&
+ gsp_phys_rmcall_channel_value() != 0) {
+ u32 force = (u32)gsp_phys_rmcall_channel_value();
+ u32 j;
+ bool found = false;
+
+ for (j = 0; j < ARRAY_SIZE(gsp_phys_rmcall_channel_variants);
+ j++) {
+ if (gsp_phys_rmcall_channel_variants[j].id != force)
+ continue;
+ vars = &gsp_phys_rmcall_channel_variants[j];
+ found = true;
+ break;
+ }
+ if (!found &&
+ gsp_phys_rmcall_channel_variant_skipctx.id == force) {
+ vars = &gsp_phys_rmcall_channel_variant_skipctx;
+ found = true;
+ }
+ if (!found) {
+ pr_err("vgsp-boot: rm-call: gsp_phys_rmcall_channel=%u is not a known variant id (1/3/4/5/6); aborting the ladder\n",
+ force);
+ return -EINVAL;
+ }
+ attempts = 1;
+ pr_info("vgsp-boot: rm-call: gsp_phys_rmcall_channel=%u forces channel variant V%u (%s) alone\n",
+ force, vars[0].id, vars[0].name);
+ }
ret = -EIO;
for (i = 0; i < attempts; i++) {