diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 6f9e44fb..dce8ce9b 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | |||
@@ -710,20 +710,24 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, | |||
710 | u32 runlist_id; | 710 | u32 runlist_id; |
711 | int func_ret; | 711 | int func_ret; |
712 | int ret = 0; | 712 | int ret = 0; |
713 | u32 tsgid; | ||
713 | 714 | ||
714 | gk20a_dbg_fn(""); | 715 | if (id_type == ID_TYPE_TSG) { |
715 | |||
716 | if (id_type == ID_TYPE_TSG) | ||
717 | runlist_id = f->tsg[id].runlist_id; | 716 | runlist_id = f->tsg[id].runlist_id; |
718 | else | 717 | tsgid = id; |
718 | } else { | ||
719 | runlist_id = f->channel[id].runlist_id; | 719 | runlist_id = f->channel[id].runlist_id; |
720 | tsgid = f->channel[id].tsgid; | ||
721 | } | ||
722 | |||
723 | nvgpu_log_info(g, "Check preempt pending for tsgid = %u", tsgid); | ||
720 | 724 | ||
721 | runlist_served_pbdmas = f->runlist_info[runlist_id].pbdma_bitmask; | 725 | runlist_served_pbdmas = f->runlist_info[runlist_id].pbdma_bitmask; |
722 | runlist_served_engines = f->runlist_info[runlist_id].eng_bitmask; | 726 | runlist_served_engines = f->runlist_info[runlist_id].eng_bitmask; |
723 | 727 | ||
724 | for_each_set_bit(pbdma_id, &runlist_served_pbdmas, f->num_pbdma) { | 728 | for_each_set_bit(pbdma_id, &runlist_served_pbdmas, f->num_pbdma) { |
725 | 729 | ||
726 | func_ret = gv11b_fifo_poll_pbdma_chan_status(g, id, pbdma_id, | 730 | func_ret = gv11b_fifo_poll_pbdma_chan_status(g, tsgid, pbdma_id, |
727 | timeout_rc_type); | 731 | timeout_rc_type); |
728 | if (func_ret != 0) { | 732 | if (func_ret != 0) { |
729 | gk20a_dbg_info("preempt timeout pbdma %d", pbdma_id); | 733 | gk20a_dbg_info("preempt timeout pbdma %d", pbdma_id); |
@@ -735,7 +739,7 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, | |||
735 | 739 | ||
736 | for_each_set_bit(act_eng_id, &runlist_served_engines, f->num_engines) { | 740 | for_each_set_bit(act_eng_id, &runlist_served_engines, f->num_engines) { |
737 | 741 | ||
738 | func_ret = gv11b_fifo_poll_eng_ctx_status(g, id, act_eng_id, | 742 | func_ret = gv11b_fifo_poll_eng_ctx_status(g, tsgid, act_eng_id, |
739 | &f->runlist_info[runlist_id].reset_eng_bitmask, | 743 | &f->runlist_info[runlist_id].reset_eng_bitmask, |
740 | timeout_rc_type); | 744 | timeout_rc_type); |
741 | 745 | ||