diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index a2ea7d1e..2fb1ee70 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | |||
@@ -662,24 +662,6 @@ static u32 gv11b_fifo_get_runlists_mask(struct gk20a *g, u32 act_eng_bitmask, | |||
662 | return runlists_mask; | 662 | return runlists_mask; |
663 | } | 663 | } |
664 | 664 | ||
665 | static void gv11b_fifo_runlist_event_intr_disable(struct gk20a *g) | ||
666 | { | ||
667 | u32 reg_val; | ||
668 | |||
669 | reg_val = gk20a_readl(g, fifo_intr_en_0_r()); | ||
670 | reg_val &= fifo_intr_0_runlist_event_pending_f(); | ||
671 | gk20a_writel(g, fifo_intr_en_0_r(), reg_val); | ||
672 | } | ||
673 | |||
674 | static void gv11b_fifo_runlist_event_intr_enable(struct gk20a *g) | ||
675 | { | ||
676 | u32 reg_val; | ||
677 | |||
678 | reg_val = gk20a_readl(g, fifo_intr_en_0_r()); | ||
679 | reg_val |= fifo_intr_0_runlist_event_pending_f(); | ||
680 | gk20a_writel(g, fifo_intr_en_0_r(), reg_val); | ||
681 | } | ||
682 | |||
683 | static void gv11b_fifo_issue_runlist_preempt(struct gk20a *g, | 665 | static void gv11b_fifo_issue_runlist_preempt(struct gk20a *g, |
684 | u32 runlists_mask) | 666 | u32 runlists_mask) |
685 | { | 667 | { |
@@ -784,23 +766,24 @@ static int __locked_fifo_preempt_runlists(struct gk20a *g, u32 runlists_mask) | |||
784 | { | 766 | { |
785 | int ret; | 767 | int ret; |
786 | 768 | ||
787 | /* | ||
788 | * Disable runlist event interrupt as it will get | ||
789 | * triggered after runlist preempt finishes | ||
790 | */ | ||
791 | gv11b_fifo_runlist_event_intr_disable(g); | ||
792 | |||
793 | /* issue runlist preempt */ | 769 | /* issue runlist preempt */ |
794 | gv11b_fifo_issue_runlist_preempt(g, runlists_mask); | 770 | gv11b_fifo_issue_runlist_preempt(g, runlists_mask); |
795 | 771 | ||
796 | /* poll for runlist preempt done */ | 772 | /* poll for runlist preempt done */ |
797 | ret = gv11b_fifo_poll_runlist_preempt_pending(g, runlists_mask); | 773 | ret = gv11b_fifo_poll_runlist_preempt_pending(g, runlists_mask); |
798 | 774 | ||
799 | /* Clear outstanding runlist event */ | 775 | /* |
800 | gk20a_fifo_handle_runlist_event(g); | 776 | * Even if runlist_event intr is not enabled in fifo_intr_en_0 , it gets |
777 | * set in fifo_intr_0 status reg. Current fifo stall interrupt handler | ||
778 | * is checking all set bits in fifo_intr_0 and handling runlist_event | ||
779 | * too while handling other fifo interrupts e.g. pbdma fifo intr or | ||
780 | * ctxsw timeout interrupt. It is better to clear this after runlist | ||
781 | * preempt is done. Clearing runlist_event interrupt makes no | ||
782 | * difference to pending runlist_preempt. | ||
783 | */ | ||
801 | 784 | ||
802 | /* Enable runlist event interrupt*/ | 785 | if (!ret) |
803 | gv11b_fifo_runlist_event_intr_enable(g); | 786 | gk20a_fifo_handle_runlist_event(g); |
804 | 787 | ||
805 | return ret; | 788 | return ret; |
806 | } | 789 | } |
@@ -1158,8 +1141,7 @@ static u32 gv11b_fifo_intr_0_en_mask(struct gk20a *g) | |||
1158 | 1141 | ||
1159 | intr_0_en_mask = g->ops.fifo.intr_0_error_mask(g); | 1142 | intr_0_en_mask = g->ops.fifo.intr_0_error_mask(g); |
1160 | 1143 | ||
1161 | intr_0_en_mask |= fifo_intr_0_runlist_event_pending_f() | | 1144 | intr_0_en_mask |= fifo_intr_0_pbdma_intr_pending_f() | |
1162 | fifo_intr_0_pbdma_intr_pending_f() | | ||
1163 | fifo_intr_0_ctxsw_timeout_pending_f(); | 1145 | fifo_intr_0_ctxsw_timeout_pending_f(); |
1164 | 1146 | ||
1165 | return intr_0_en_mask; | 1147 | return intr_0_en_mask; |