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.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c
index 95bd627..81c68b4 100644
--- a/kernel/gsp_phys_gpu.c
+++ b/kernel/gsp_phys_gpu.c
@@ -1021,6 +1021,38 @@ unsigned int gsp_phys_gr_first_poll_ms_value(void)
EXPORT_SYMBOL_GPL(gsp_phys_gr_first_poll_ms_value);
/*
+ * m179 no-write retry budget (gsp_phys_gr_nowrite_retries; default 3, clamped
+ * to [0, 4]). The m153 outcome retry loop re-executes a data-bearing launch
+ * whose retirement wait saw zero engine writes; it shared the timeout ladder's
+ * attempt counter, so a launch that had already spent attempts on the ladder
+ * (fast re-arm + fresh ring entries) reached the accept path with NO
+ * re-execution at all - the r200/r201/r202 memcpy_roundtrip / multikernel
+ * class (a lost launch silently accepted, client output all wrong). This
+ * budget is dedicated to the no-write loop and independent of the ladder; it
+ * is read once per submission. 0 keeps the accept-without-retry behavior
+ * (still logged loudly). The clamp keeps the worst-case host publishes per
+ * launch (initial + fast re-arm + 2 fresh entries + budget) within the
+ * 8-entry GPFIFO ring.
+ */
+static int gsp_phys_gr_nowrite_retries_param = 3;
+module_param_named(gsp_phys_gr_nowrite_retries,
+ gsp_phys_gr_nowrite_retries_param, int, 0644);
+MODULE_PARM_DESC(gsp_phys_gr_nowrite_retries,
+ "Dedicated re-execution budget for a data-bearing GR launch that wrote nothing tracked, clamped [0,4] (default 3)");
+
+int gsp_phys_gr_nowrite_retries_value(void)
+{
+ int v = gsp_phys_gr_nowrite_retries_param;
+
+ if (v < 0)
+ v = 0;
+ if (v > 4)
+ v = 4;
+ return v;
+}
+EXPORT_SYMBOL_GPL(gsp_phys_gr_nowrite_retries_value);
+
+/*
* m69 window-0 shadow pool (gsp_phys_rmcall_gr_shadow_win0; default 0). When
* set, the forwarded GR launch copies the QMD's program/param pages into the
* window-0 shadow pool (module pages at VAs 0x108000..0x10f000, PTEs planted