summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
index 7e310984..1bbf09ec 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
@@ -428,27 +428,40 @@ static int gv11b_fifo_poll_eng_ctx_status(struct gk20a *g, u32 id,
428 ctx_stat == 428 ctx_stat ==
429 fifo_engine_status_ctx_status_ctxsw_save_v()) { 429 fifo_engine_status_ctx_status_ctxsw_save_v()) {
430 430
431 if (timeout_rc_type == PREEMPT_TIMEOUT_NORC) { 431 if (id == fifo_engine_status_id_v(eng_stat)) {
432 /* called from recovery, eng seems to be hung */ 432 if (timeout_rc_type == PREEMPT_TIMEOUT_NORC) {
433 if (id == fifo_engine_status_id_v(eng_stat)) { 433 /* called from recovery, eng seems to be hung */
434 *reset_eng_bitmask |= BIT(engine_idx); 434 *reset_eng_bitmask |= BIT(engine_idx);
435 ret = 0; 435 ret = 0;
436 break; 436 break;
437 } else {
438 gk20a_dbg_info("wait preempt engine. "
439 "ctx_status (valid/save)=%u", ctx_stat);
437 } 440 }
441 } else {
442 /* context is not running on the engine */
443 ret = 0;
444 break;
438 } 445 }
439 446
440 } else if (ctx_stat == 447 } else if (ctx_stat ==
441 fifo_engine_status_ctx_status_ctxsw_load_v()) { 448 fifo_engine_status_ctx_status_ctxsw_load_v()) {
442 449
443 if (timeout_rc_type == PREEMPT_TIMEOUT_NORC) { 450 if (id == fifo_engine_status_next_id_v(eng_stat)) {
444 /* called from recovery, eng seems to be hung */
445 if (id ==
446 fifo_engine_status_next_id_v(eng_stat)) {
447 451
452 if (timeout_rc_type == PREEMPT_TIMEOUT_NORC) {
453 /* called from recovery, eng seems to be hung */
448 *reset_eng_bitmask |= BIT(engine_idx); 454 *reset_eng_bitmask |= BIT(engine_idx);
449 ret = 0; 455 ret = 0;
450 break; 456 break;
457 } else {
458 gk20a_dbg_info("wait preempt engine. "
459 "ctx_status (load)=%u", ctx_stat);
451 } 460 }
461 } else {
462 /* context is not running on the engine */
463 ret = 0;
464 break;
452 } 465 }
453 466
454 } else { 467 } else {