diff options
Diffstat (limited to 'nvdebug_entry.c')
-rw-r--r-- | nvdebug_entry.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index c362209..0abe658 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
@@ -146,7 +146,7 @@ int probe_and_cache_device(void) { | |||
146 | 146 | ||
147 | // Create files `/proc/gpu#/runlist#`, world readable | 147 | // Create files `/proc/gpu#/runlist#`, world readable |
148 | int create_runlist_files(int device_id, struct proc_dir_entry *dir) { | 148 | int create_runlist_files(int device_id, struct proc_dir_entry *dir) { |
149 | ptop_device_info_t info; | 149 | ptop_device_info_gk104_t info; |
150 | struct proc_dir_entry *rl_entry; | 150 | struct proc_dir_entry *rl_entry; |
151 | int i, rl_id; | 151 | int i, rl_id; |
152 | char runlist_name[12]; | 152 | char runlist_name[12]; |
@@ -154,8 +154,8 @@ int create_runlist_files(int device_id, struct proc_dir_entry *dir) { | |||
154 | // Figure out how many runlists there are by checking the device info | 154 | // Figure out how many runlists there are by checking the device info |
155 | // registers. Runlists are always numbered sequentially, so we just have | 155 | // registers. Runlists are always numbered sequentially, so we just have |
156 | // to find the highest-valued one and add 1 to get the number of runlists. | 156 | // to find the highest-valued one and add 1 to get the number of runlists. |
157 | for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1; i++) { | 157 | for (i = 0; i < NV_PTOP_DEVICE_INFO__SIZE_1_GK104; i++) { |
158 | info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO(i)); | 158 | info.raw = nvdebug_readl(&g_nvdebug_state[device_id], NV_PTOP_DEVICE_INFO_GK104(i)); |
159 | if (info.info_type != INFO_TYPE_ENUM || !info.runlist_is_valid) | 159 | if (info.info_type != INFO_TYPE_ENUM || !info.runlist_is_valid) |
160 | continue; | 160 | continue; |
161 | if (info.runlist_enum > max_rl_id) | 161 | if (info.runlist_enum > max_rl_id) |
@@ -219,7 +219,8 @@ int __init nvdebug_init(void) { | |||
219 | if (!(dir = proc_mkdir_data(device_id_str, 0555, NULL, (void*)device_id))) | 219 | if (!(dir = proc_mkdir_data(device_id_str, 0555, NULL, (void*)device_id))) |
220 | goto out_nomem; | 220 | goto out_nomem; |
221 | // Create files `/proc/gpu#/runlist#`, world readable | 221 | // Create files `/proc/gpu#/runlist#`, world readable |
222 | rl_create_err = create_runlist_files(device_id, dir); | 222 | if (g_nvdebug_state[device_id].chip_id < NV_CHIP_ID_AMPERE) |
223 | create_runlist_files(device_id, dir); | ||
223 | // Create files `/proc/gpu#/gpc#_tpc_mask`, world readable | 224 | // Create files `/proc/gpu#/gpc#_tpc_mask`, world readable |
224 | tpc_masks_create_err = create_tpc_mask_files(device_id, dir); | 225 | tpc_masks_create_err = create_tpc_mask_files(device_id, dir); |
225 | // Create file `/proc/gpu#/preempt_tsg`, world writable | 226 | // Create file `/proc/gpu#/preempt_tsg`, world writable |