summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_phys_gpu.c')
-rw-r--r--kernel/gsp_phys_gpu.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index 512d30b..fc84c1d 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -248,6 +248,31 @@ bool gsp_phys_work_hw_primary_enabled(void)
EXPORT_SYMBOL_GPL(gsp_phys_work_hw_primary_enabled);
/*
+ * P6c completion relay (default 0). When set together with
+ * gsp_phys_work_forward=1, gsp_phys_guest_mem=1 and
+ * gsp_phys_work_defer_release=1, a forwarded guest CE copy additionally maps
+ * the guest-visible semaphore page into the CE channel page tables and lets
+ * the engine author one selected one-word release into it (custom payload).
+ * The hold then verifies the guest word carries the payload and skips the
+ * software apply of that one record; every refusal, hardware failure,
+ * timeout, abort or failed verification leaves the unchanged software apply
+ * in charge, so the release stays exactly-once. With 0, every behavior is
+ * byte-identical to wave 2 (the module semaphore is polled; no guest
+ * semaphore page is ever mapped or pinned). One-line rollback:
+ * gsp_phys_relay=0.
+ */
+static bool gsp_phys_relay_param;
+module_param_named(gsp_phys_relay, gsp_phys_relay_param, bool, 0644);
+MODULE_PARM_DESC(gsp_phys_relay,
+ "Let the forwarded guest CE copy author the selected guest-visible semaphore release into the guest semaphore page (default 0: software release stays the sole author; requires gsp_phys_work_forward=1 and gsp_phys_guest_mem=1 and gsp_phys_work_defer_release=1)");
+
+bool gsp_phys_relay_enabled(void)
+{
+ return gsp_phys_relay_param;
+}
+EXPORT_SYMBOL_GPL(gsp_phys_relay_enabled);
+
+/*
* One-way power latch (default). Re-enabling runtime PM and D3cold after a
* claim lets the board power-gate and the host hard-freeze on resume
* (observed 2026-10-01); keep the pre-claim D0 policy instead and require