From 57871ebb5f0132e554b1b1f825096f8e9c112229 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 6 Oct 2026 21:18:34 -0400 Subject: vgsp: ctxshare_force probe - share on the proven mode-31 execution channel (V6+sibling A attach via params init) --- kernel/gsp_phys_booter.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'kernel/gsp_phys_booter.c') diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 10ef3b7..4fc8b4f 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -13143,6 +13143,27 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0) GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_USER_LANE) gsp_phys_rmcall_user_lane_kgr_queries(bar0); + /* + * Mode-31 share probe (gsp_phys_rmcall_ctxshare_force=1): allocate the + * share before the replay so every ladder-TSG channel (V6 and the mode-31 + * sibling A) attaches to it via the channel-params helper, while the + * proven mode-31 construct/commit flow stays intact. + */ + if (gsp_phys_rmcall_engine_is_gr() && + gsp_phys_rmcall_ctxshare_force_value() && + !boot_stage.rmcall_ctxshare) { + if (!gsp_phys_rmcall_vas_shared_value()) { + pr_err("vgsp-boot: rm-call: ctxshare_force needs the ladder SHARED_MANAGEMENT VAS (gsp_phys_rmcall_vas_shared=1); aborting with no retry\n"); + return -EINVAL; + } + ret = gsp_phys_rmcall_alloc_ctxshare(bar0); + if (ret) { + pr_err("vgsp-boot: rm-call: stage 3 aborted: ctxshare_force FERMI_CONTEXT_SHARE_A alloc failed (%d); aborting with no retry\n", + ret); + return ret; + } + } + /* * Golden-image replay (gsp_phys_rmcall_golden=1 + gsp_phys_gpu=1): * replay the stock client's post-load golden channel allocations after -- cgit v1.2.3