diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/mc_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/mc_gv11b.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c index dab304e2..74c5c4d6 100644 --- a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c | |||
@@ -70,3 +70,23 @@ bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0) | |||
70 | { | 70 | { |
71 | return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false); | 71 | return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false); |
72 | } | 72 | } |
73 | |||
74 | bool gv11b_mc_is_stall_and_eng_intr_pending(struct gk20a *g, u32 act_eng_id) | ||
75 | { | ||
76 | u32 mc_intr_0 = gk20a_readl(g, mc_intr_r(0)); | ||
77 | u32 stall_intr, eng_intr_mask; | ||
78 | |||
79 | eng_intr_mask = gk20a_fifo_act_eng_interrupt_mask(g, act_eng_id); | ||
80 | if (mc_intr_0 & eng_intr_mask) | ||
81 | return true; | ||
82 | |||
83 | stall_intr = mc_intr_pfifo_pending_f() | | ||
84 | mc_intr_hub_pending_f() | | ||
85 | mc_intr_priv_ring_pending_f() | | ||
86 | mc_intr_pbus_pending_f() | | ||
87 | mc_intr_ltc_pending_f(); | ||
88 | if (mc_intr_0 & stall_intr) | ||
89 | return true; | ||
90 | |||
91 | return false; | ||
92 | } | ||