diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 23 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h | 24 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h | 24 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h | 24 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h | 24 |
5 files changed, 114 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 241e6525..d6732453 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -5202,11 +5202,24 @@ static int gk20a_gr_handle_class_error(struct gk20a *g, | |||
5202 | gr_class_error_code_v(gk20a_readl(g, gr_class_error_r())); | 5202 | gr_class_error_code_v(gk20a_readl(g, gr_class_error_r())); |
5203 | gk20a_gr_set_error_notifier(g, isr_data, | 5203 | gk20a_gr_set_error_notifier(g, isr_data, |
5204 | NVGPU_CHANNEL_GR_ERROR_SW_NOTIFY); | 5204 | NVGPU_CHANNEL_GR_ERROR_SW_NOTIFY); |
5205 | nvgpu_err(g, | 5205 | nvgpu_err(g, "class error 0x%08x, offset 0x%08x," |
5206 | "class error 0x%08x, offset 0x%08x," | 5206 | "sub channel 0x%08x mme generated %d," |
5207 | " unhandled intr 0x%08x for channel %u", | 5207 | " mme pc 0x%08xdata high %d priv status %d" |
5208 | isr_data->class_num, isr_data->offset, | 5208 | " unhandled intr 0x%08x for channel %u", |
5209 | gr_class_error, isr_data->chid); | 5209 | isr_data->class_num, (isr_data->offset << 2), |
5210 | gr_trapped_addr_subch_v(isr_data->addr), | ||
5211 | gr_trapped_addr_mme_generated_v(isr_data->addr), | ||
5212 | gr_trapped_data_mme_pc_v( | ||
5213 | gk20a_readl(g, gr_trapped_data_mme_r())), | ||
5214 | gr_trapped_addr_datahigh_v(isr_data->addr), | ||
5215 | gr_trapped_addr_priv_v(isr_data->addr), | ||
5216 | gr_class_error, isr_data->chid); | ||
5217 | |||
5218 | nvgpu_err(g, "trapped data low 0x%08x", | ||
5219 | gk20a_readl(g, gr_trapped_data_lo_r())); | ||
5220 | if (gr_trapped_addr_datahigh_v(isr_data->addr)) | ||
5221 | nvgpu_err(g, "trapped data high 0x%08x", | ||
5222 | gk20a_readl(g, gr_trapped_data_hi_r())); | ||
5210 | 5223 | ||
5211 | return -EINVAL; | 5224 | return -EINVAL; |
5212 | } | 5225 | } |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h index f675a619..ef259bcf 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h | |||
@@ -268,6 +268,22 @@ static inline u32 gr_trapped_addr_subch_v(u32 r) | |||
268 | { | 268 | { |
269 | return (r >> 16U) & 0x7U; | 269 | return (r >> 16U) & 0x7U; |
270 | } | 270 | } |
271 | static inline u32 gr_trapped_addr_mme_generated_v(u32 r) | ||
272 | { | ||
273 | return (r >> 20U) & 0x1U; | ||
274 | } | ||
275 | static inline u32 gr_trapped_addr_datahigh_v(u32 r) | ||
276 | { | ||
277 | return (r >> 24U) & 0x1U; | ||
278 | } | ||
279 | static inline u32 gr_trapped_addr_priv_v(u32 r) | ||
280 | { | ||
281 | return (r >> 28U) & 0x1U; | ||
282 | } | ||
283 | static inline u32 gr_trapped_addr_status_v(u32 r) | ||
284 | { | ||
285 | return (r >> 31U) & 0x1U; | ||
286 | } | ||
271 | static inline u32 gr_trapped_data_lo_r(void) | 287 | static inline u32 gr_trapped_data_lo_r(void) |
272 | { | 288 | { |
273 | return 0x00400708U; | 289 | return 0x00400708U; |
@@ -276,6 +292,14 @@ static inline u32 gr_trapped_data_hi_r(void) | |||
276 | { | 292 | { |
277 | return 0x0040070cU; | 293 | return 0x0040070cU; |
278 | } | 294 | } |
295 | static inline u32 gr_trapped_data_mme_r(void) | ||
296 | { | ||
297 | return 0x00400710U; | ||
298 | } | ||
299 | static inline u32 gr_trapped_data_mme_pc_v(u32 r) | ||
300 | { | ||
301 | return (r >> 0U) & 0x7ffU; | ||
302 | } | ||
279 | static inline u32 gr_status_r(void) | 303 | static inline u32 gr_status_r(void) |
280 | { | 304 | { |
281 | return 0x00400700U; | 305 | return 0x00400700U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h index e2877566..d9776b7c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_gr_gm20b.h | |||
@@ -256,6 +256,22 @@ static inline u32 gr_trapped_addr_subch_v(u32 r) | |||
256 | { | 256 | { |
257 | return (r >> 16U) & 0x7U; | 257 | return (r >> 16U) & 0x7U; |
258 | } | 258 | } |
259 | static inline u32 gr_trapped_addr_mme_generated_v(u32 r) | ||
260 | { | ||
261 | return (r >> 20U) & 0x1U; | ||
262 | } | ||
263 | static inline u32 gr_trapped_addr_datahigh_v(u32 r) | ||
264 | { | ||
265 | return (r >> 24U) & 0x1U; | ||
266 | } | ||
267 | static inline u32 gr_trapped_addr_priv_v(u32 r) | ||
268 | { | ||
269 | return (r >> 28U) & 0x1U; | ||
270 | } | ||
271 | static inline u32 gr_trapped_addr_status_v(u32 r) | ||
272 | { | ||
273 | return (r >> 31U) & 0x1U; | ||
274 | } | ||
259 | static inline u32 gr_trapped_data_lo_r(void) | 275 | static inline u32 gr_trapped_data_lo_r(void) |
260 | { | 276 | { |
261 | return 0x00400708U; | 277 | return 0x00400708U; |
@@ -264,6 +280,14 @@ static inline u32 gr_trapped_data_hi_r(void) | |||
264 | { | 280 | { |
265 | return 0x0040070cU; | 281 | return 0x0040070cU; |
266 | } | 282 | } |
283 | static inline u32 gr_trapped_data_mme_r(void) | ||
284 | { | ||
285 | return 0x00400710U; | ||
286 | } | ||
287 | static inline u32 gr_trapped_data_mme_pc_v(u32 r) | ||
288 | { | ||
289 | return (r >> 0U) & 0x7ffU; | ||
290 | } | ||
267 | static inline u32 gr_status_r(void) | 291 | static inline u32 gr_status_r(void) |
268 | { | 292 | { |
269 | return 0x00400700U; | 293 | return 0x00400700U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h index aa78c63c..2da3ec41 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h | |||
@@ -252,6 +252,22 @@ static inline u32 gr_trapped_addr_subch_v(u32 r) | |||
252 | { | 252 | { |
253 | return (r >> 16U) & 0x7U; | 253 | return (r >> 16U) & 0x7U; |
254 | } | 254 | } |
255 | static inline u32 gr_trapped_addr_mme_generated_v(u32 r) | ||
256 | { | ||
257 | return (r >> 20U) & 0x1U; | ||
258 | } | ||
259 | static inline u32 gr_trapped_addr_datahigh_v(u32 r) | ||
260 | { | ||
261 | return (r >> 24U) & 0x1U; | ||
262 | } | ||
263 | static inline u32 gr_trapped_addr_priv_v(u32 r) | ||
264 | { | ||
265 | return (r >> 28U) & 0x1U; | ||
266 | } | ||
267 | static inline u32 gr_trapped_addr_status_v(u32 r) | ||
268 | { | ||
269 | return (r >> 31U) & 0x1U; | ||
270 | } | ||
255 | static inline u32 gr_trapped_data_lo_r(void) | 271 | static inline u32 gr_trapped_data_lo_r(void) |
256 | { | 272 | { |
257 | return 0x00400708U; | 273 | return 0x00400708U; |
@@ -260,6 +276,14 @@ static inline u32 gr_trapped_data_hi_r(void) | |||
260 | { | 276 | { |
261 | return 0x0040070cU; | 277 | return 0x0040070cU; |
262 | } | 278 | } |
279 | static inline u32 gr_trapped_data_mme_r(void) | ||
280 | { | ||
281 | return 0x00400710U; | ||
282 | } | ||
283 | static inline u32 gr_trapped_data_mme_pc_v(u32 r) | ||
284 | { | ||
285 | return (r >> 0U) & 0xfffU; | ||
286 | } | ||
263 | static inline u32 gr_status_r(void) | 287 | static inline u32 gr_status_r(void) |
264 | { | 288 | { |
265 | return 0x00400700U; | 289 | return 0x00400700U; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h index 27760a73..51809112 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h | |||
@@ -256,6 +256,22 @@ static inline u32 gr_trapped_addr_subch_v(u32 r) | |||
256 | { | 256 | { |
257 | return (r >> 16U) & 0x7U; | 257 | return (r >> 16U) & 0x7U; |
258 | } | 258 | } |
259 | static inline u32 gr_trapped_addr_mme_generated_v(u32 r) | ||
260 | { | ||
261 | return (r >> 20U) & 0x1U; | ||
262 | } | ||
263 | static inline u32 gr_trapped_addr_datahigh_v(u32 r) | ||
264 | { | ||
265 | return (r >> 24U) & 0x1U; | ||
266 | } | ||
267 | static inline u32 gr_trapped_addr_priv_v(u32 r) | ||
268 | { | ||
269 | return (r >> 28U) & 0x1U; | ||
270 | } | ||
271 | static inline u32 gr_trapped_addr_status_v(u32 r) | ||
272 | { | ||
273 | return (r >> 31U) & 0x1U; | ||
274 | } | ||
259 | static inline u32 gr_trapped_data_lo_r(void) | 275 | static inline u32 gr_trapped_data_lo_r(void) |
260 | { | 276 | { |
261 | return 0x00400708U; | 277 | return 0x00400708U; |
@@ -264,6 +280,14 @@ static inline u32 gr_trapped_data_hi_r(void) | |||
264 | { | 280 | { |
265 | return 0x0040070cU; | 281 | return 0x0040070cU; |
266 | } | 282 | } |
283 | static inline u32 gr_trapped_data_mme_r(void) | ||
284 | { | ||
285 | return 0x00400710U; | ||
286 | } | ||
287 | static inline u32 gr_trapped_data_mme_pc_v(u32 r) | ||
288 | { | ||
289 | return (r >> 0U) & 0xfffU; | ||
290 | } | ||
267 | static inline u32 gr_status_r(void) | 291 | static inline u32 gr_status_r(void) |
268 | { | 292 | { |
269 | return 0x00400700U; | 293 | return 0x00400700U; |