aboutsummaryrefslogtreecommitdiffstats
path: root/runlist.c
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2024-04-23 17:44:59 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2024-04-23 17:44:59 -0400
commit8b9c6400d0c88e127be2d31ab3fb507da49f9d6f (patch)
tree98cc8cf93a0ba75c7864a783cb2c7c66b83fdf25 /runlist.c
parent71c6ab5ac5270d3e1c2fb809667225add109ec6b (diff)
Style and documentation cleanup
- Document topology registers (PTOP) on Ampere+ - Document graphics copy engine configuration registers - Move resubmit_runlist range checks into runlist.c - Miscellaneous spacing, typo, and minor documentation fixes
Diffstat (limited to 'runlist.c')
-rw-r--r--runlist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/runlist.c b/runlist.c
index 91fca82..2e9577d 100644
--- a/runlist.c
+++ b/runlist.c
@@ -8,8 +8,10 @@
8#include "nvdebug.h" 8#include "nvdebug.h"
9 9
10// Uncomment to, upon BAR2 access failure, return a PRAMIN-based runlist pointer 10// Uncomment to, upon BAR2 access failure, return a PRAMIN-based runlist pointer
11// **If enabled, PRAMIN may not be otherwise used while walking the runlist!** 11// in get_runlist_iter(). In order for this pointer to remain valid, PRAMIN
12// Runlists can only be printed on the Jetson TX2 if this is enabled. 12// **must** not be moved during runlist traversal.
13// The Jetson TX2 has no BAR2, and stores the runlist in VID_MEM, so this must
14// be enabled to print the runlist on the TX2.
13//#define FALLBACK_TO_PRAMIN 15//#define FALLBACK_TO_PRAMIN
14 16
15/* Get runlist head and info (incl. length) 17/* Get runlist head and info (incl. length)
@@ -142,12 +144,16 @@ int preempt_runlist(struct nvdebug_state *g, uint32_t rl_id) {
142int resubmit_runlist(struct nvdebug_state *g, uint32_t rl_id) { 144int resubmit_runlist(struct nvdebug_state *g, uint32_t rl_id) {
143 if (g->chip_id < NV_CHIP_ID_TURING) { 145 if (g->chip_id < NV_CHIP_ID_TURING) {
144 eng_runlist_gf100_t rl; 146 eng_runlist_gf100_t rl;
147 if (rl_id > MAX_RUNLISTS_GF100)
148 return -EINVAL;
145 if ((rl.raw = nvdebug_readq(g, NV_PFIFO_ENG_RUNLIST_BASE_GF100(rl_id))) == -1) 149 if ((rl.raw = nvdebug_readq(g, NV_PFIFO_ENG_RUNLIST_BASE_GF100(rl_id))) == -1)
146 return -EIO; 150 return -EIO;
147 rl.id = rl_id; 151 rl.id = rl_id;
148 nvdebug_writeq(g, NV_PFIFO_RUNLIST_BASE_GF100, rl.raw); 152 nvdebug_writeq(g, NV_PFIFO_RUNLIST_BASE_GF100, rl.raw);
149 } else if (g->chip_id < NV_CHIP_ID_AMPERE) { 153 } else if (g->chip_id < NV_CHIP_ID_AMPERE) {
150 runlist_submit_tu102_t submit; 154 runlist_submit_tu102_t submit;
155 if (rl_id > MAX_RUNLISTS_TU102)
156 return -EINVAL;
151 if ((submit.raw = nvdebug_readq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id))) == -1) 157 if ((submit.raw = nvdebug_readq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id))) == -1)
152 return -EIO; 158 return -EIO;
153 nvdebug_writeq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id), submit.raw); 159 nvdebug_writeq(g, NV_PFIFO_RUNLIST_SUBMIT_TU102(rl_id), submit.raw);