summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 20fb51e7..e03c5da8 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1450,7 +1450,9 @@ bool gk20a_fifo_error_tsg(struct gk20a *g,
1450 nvgpu_rwsem_down_read(&tsg->ch_list_lock); 1450 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
1451 nvgpu_list_for_each_entry(ch, &tsg->ch_list, channel_gk20a, ch_entry) { 1451 nvgpu_list_for_each_entry(ch, &tsg->ch_list, channel_gk20a, ch_entry) {
1452 if (gk20a_channel_get(ch)) { 1452 if (gk20a_channel_get(ch)) {
1453 verbose |= gk20a_fifo_error_ch(g, ch); 1453 if (gk20a_fifo_error_ch(g, ch)) {
1454 verbose = true;
1455 }
1454 gk20a_channel_put(ch); 1456 gk20a_channel_put(ch);
1455 } 1457 }
1456 } 1458 }
@@ -2291,7 +2293,9 @@ bool gk20a_fifo_check_tsg_ctxsw_timeout(struct tsg_gk20a *tsg,
2291 if (gk20a_channel_get(ch)) { 2293 if (gk20a_channel_get(ch)) {
2292 ch->g->ops.fifo.set_error_notifier(ch, 2294 ch->g->ops.fifo.set_error_notifier(ch,
2293 NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); 2295 NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT);
2294 *verbose |= ch->timeout_debug_dump; 2296 if (ch->timeout_debug_dump) {
2297 *verbose = true;
2298 }
2295 gk20a_channel_put(ch); 2299 gk20a_channel_put(ch);
2296 } 2300 }
2297 } 2301 }
@@ -2400,9 +2404,9 @@ static u32 fifo_error_isr(struct gk20a *g, u32 fifo_intr)
2400 } 2404 }
2401 2405
2402 if (fifo_intr & fifo_intr_0_mmu_fault_pending_f()) { 2406 if (fifo_intr & fifo_intr_0_mmu_fault_pending_f()) {
2403 print_channel_reset_log |= 2407 if (gk20a_fifo_handle_mmu_fault(g, 0, ~(u32)0, false)) {
2404 gk20a_fifo_handle_mmu_fault(g, 0, 2408 print_channel_reset_log = true;
2405 ~(u32)0, false); 2409 }
2406 handled |= fifo_intr_0_mmu_fault_pending_f(); 2410 handled |= fifo_intr_0_mmu_fault_pending_f();
2407 } 2411 }
2408 2412
@@ -3241,8 +3245,9 @@ u32 *gk20a_runlist_construct_locked(struct fifo_gk20a *f,
3241 skip_next = true; 3245 skip_next = true;
3242 } 3246 }
3243 3247
3244 if (!(*entries_left)) 3248 if (*entries_left == 0U) {
3245 return NULL; 3249 return NULL;
3250 }
3246 3251
3247 /* add TSG entry */ 3252 /* add TSG entry */
3248 nvgpu_log_info(g, "add TSG %d to runlist", tsg->tsgid); 3253 nvgpu_log_info(g, "add TSG %d to runlist", tsg->tsgid);
@@ -3261,7 +3266,7 @@ u32 *gk20a_runlist_construct_locked(struct fifo_gk20a *f,
3261 runlist->active_channels)) 3266 runlist->active_channels))
3262 continue; 3267 continue;
3263 3268
3264 if (!(*entries_left)) { 3269 if (*entries_left == 0U) {
3265 nvgpu_rwsem_up_read(&tsg->ch_list_lock); 3270 nvgpu_rwsem_up_read(&tsg->ch_list_lock);
3266 return NULL; 3271 return NULL;
3267 } 3272 }