summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/mc_gv11b.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2018-04-12 19:09:43 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-24 12:53:20 -0400
commit1407133b7e1b27a92ee8c116009541904d2ff691 (patch)
tree5aeb8c87c89b52e682101ab7678b3e0da8e7ea05 /drivers/gpu/nvgpu/gv11b/mc_gv11b.c
parent797dde3e32647df3b616cea67f4defae59d38b3f (diff)
gpu: nvgpu: gv11b: do not poll preempt done if eng intr pending
-During polling eng preempt done, reset eng only if eng stall intr is pending. Also stop polling for eng preempt done if eng intr is pending. -Add max retries for pre-si platforms for poll pbdma and eng preempt done polling loops. Bug 2125776 Bug 2108544 Bug 2105322 Bug 2092051 Bug 2048824 Bug 2043838 Bug 2039587 Bug 2028993 Bug 2029245 Bug 2065990 Bug 1945121 Bug 200401707 Bug 200393631 Bug 200327596 Change-Id: I66b07be9647f141bd03801f83e3cda797e88272f Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1694137 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/mc_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/mc_gv11b.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c
index 31600828..dbeb0645 100644
--- a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c
@@ -71,24 +71,24 @@ bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0)
71 return (((mc_intr_0 & mc_intr_hub_pending_f()) != 0U) ? true : false); 71 return (((mc_intr_0 & mc_intr_hub_pending_f()) != 0U) ? true : false);
72} 72}
73 73
74bool gv11b_mc_is_stall_and_eng_intr_pending(struct gk20a *g, u32 act_eng_id) 74bool gv11b_mc_is_stall_and_eng_intr_pending(struct gk20a *g, u32 act_eng_id,
75 u32 *eng_intr_pending)
75{ 76{
76 u32 mc_intr_0 = gk20a_readl(g, mc_intr_r(0)); 77 u32 mc_intr_0 = gk20a_readl(g, mc_intr_r(0));
77 u32 stall_intr, eng_intr_mask; 78 u32 stall_intr, eng_intr_mask;
78 79
79 eng_intr_mask = gk20a_fifo_act_eng_interrupt_mask(g, act_eng_id); 80 eng_intr_mask = gk20a_fifo_act_eng_interrupt_mask(g, act_eng_id);
80 if ((mc_intr_0 & eng_intr_mask) != 0U) { 81 *eng_intr_pending = mc_intr_0 & eng_intr_mask;
81 return true;
82 }
83 82
84 stall_intr = mc_intr_pfifo_pending_f() | 83 stall_intr = mc_intr_pfifo_pending_f() |
85 mc_intr_hub_pending_f() | 84 mc_intr_hub_pending_f() |
86 mc_intr_priv_ring_pending_f() | 85 mc_intr_priv_ring_pending_f() |
87 mc_intr_pbus_pending_f() | 86 mc_intr_pbus_pending_f() |
88 mc_intr_ltc_pending_f(); 87 mc_intr_ltc_pending_f();
89 if ((mc_intr_0 & stall_intr) != 0U) {
90 return true;
91 }
92 88
93 return false; 89 nvgpu_log(g, gpu_dbg_info | gpu_dbg_intr,
90 "mc_intr_0 = 0x%08x, eng_intr = 0x%08x",
91 mc_intr_0 & stall_intr, *eng_intr_pending);
92
93 return (mc_intr_0 & (eng_intr_mask | stall_intr)) != 0U;
94} 94}