diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2024-04-21 20:30:08 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2024-04-21 20:30:08 -0400 |
| commit | 091c242c9ef7cbd8d88d3beae936b14f5b907286 (patch) | |
| tree | 85f76f37209abc3888045ff2db8576ad3c6370d7 /runlist.c | |
| parent | 684c20c0afbfc2c2075a00881fbb3f9d3e68e023 (diff) | |
Add /proc/gpu#/resubmit_runlist API
Resubmits the runlist in an identical configuration. Causes the
runlist scheduler to:
1. Reload and cache timeslice and scale values from TSGs.
2. Restart scheduling from the head of the runlist [may cause a
preempt to be scheduled for the currently-running task (?)].
3. Address (?) an errata on Turing where re-enabled channels are
not always detected.
Above behavior tested on GV100 and partially tested on TU102.
Diffstat (limited to 'runlist.c')
| -rw-r--r-- | runlist.c | 19 |
1 files changed, 19 insertions, 0 deletions
| @@ -137,3 +137,22 @@ int preempt_runlist(struct nvdebug_state *g, uint32_t rl_id) { | |||
| 137 | nvdebug_writel(g, NV_PFIFO_RUNLIST_PREEMPT, rl_preempt.raw); | 137 | nvdebug_writel(g, NV_PFIFO_RUNLIST_PREEMPT, rl_preempt.raw); |
| 138 | return 0; | 138 | return 0; |
| 139 | } | 139 | } |
| 140 | |||
| 141 | // Read and write runlist configuration, triggering a resubmit | ||
| 142 | int resubmit_runlist(struct nvdebug_state *g, uint32_t rl_id) { | ||
| 143 | if (g->chip_id < NV_CHIP_ID_TURING) { | ||
| 144 | eng_runlist_gf100_t rl; | ||
| 145 | if ((rl.raw = nvdebug_readq(g, NV_PFIFO_ENG_RUNLIST_BASE_GF100(rl_id))) == -1) | ||
| 146 | return -EIO; | ||
| 147 | rl.id = rl_id; | ||
| 148 | nvdebug_writeq(g, NV_PFIFO_RUNLIST_BASE_GF100, rl.raw); | ||
| 149 | } else if (g->chip_id < NV_CHIP_ID_AMPERE) { | ||
| 150 | runlist_submit_tu102_t submit; | ||
| 151 | if ((submit.raw = nvdebug_readq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id))) == -1) | ||
| 152 | return -EIO; | ||
| 153 | nvdebug_writeq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id), submit.raw); | ||
| 154 | } else { | ||
| 155 | return -EOPNOTSUPP; | ||
| 156 | } | ||
| 157 | return 0; | ||
| 158 | } | ||
