diff options
author | Nitin Kumbhar <nkumbhar@nvidia.com> | 2018-07-04 13:26:58 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-31 06:22:16 -0400 |
commit | 13cc7ea93dabdbc57dcf4c6e567e7fbdb12e8d2b (patch) | |
tree | 76f013e8b860c81ccee5b294ad9cbe241fd6e08f /drivers/gpu/nvgpu/gk20a/mc_gk20a.c | |
parent | 2d454db04fcc0c03e05b4665831e5780240d79b8 (diff) |
gpu: nvgpu: mask intr before gpu power off
once gpu is powered off i.e. power_on set to false, nvgpu isr
does not handle stall/nonstall irq. Depending upon state
of gpu, this can result in either of following errors:
1) irq 458: nobody cared (try booting with the "irqpoll" option)
2) "HSM ERROR 42, GPU" from SCE if it detects that an interrupt is
not in time.
Fix these by masking all interrupts just before gpu power off
as nvgpu won't be handling any irq anymore.
While masking interrupts, if there are any pending interrupts,
then report those with a log message.
Bug 1987855
Bug 200424832
Change-Id: I95b087f5c24d439e5da26c6e4fff74d8a525f291
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770802
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mc_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mc_gk20a.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c index 9ee24ed0..26084bd6 100644 --- a/drivers/gpu/nvgpu/gk20a/mc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mc_gk20a.c | |||
@@ -121,6 +121,14 @@ u32 mc_gk20a_isr_nonstall(struct gk20a *g) | |||
121 | return ops; | 121 | return ops; |
122 | } | 122 | } |
123 | 123 | ||
124 | void mc_gk20a_intr_mask(struct gk20a *g) | ||
125 | { | ||
126 | nvgpu_writel(g, mc_intr_en_0_r(), | ||
127 | mc_intr_en_0_inta_disabled_f()); | ||
128 | nvgpu_writel(g, mc_intr_en_1_r(), | ||
129 | mc_intr_en_1_inta_disabled_f()); | ||
130 | } | ||
131 | |||
124 | void mc_gk20a_intr_enable(struct gk20a *g) | 132 | void mc_gk20a_intr_enable(struct gk20a *g) |
125 | { | 133 | { |
126 | u32 eng_intr_mask = gk20a_fifo_engine_interrupt_mask(g); | 134 | u32 eng_intr_mask = gk20a_fifo_engine_interrupt_mask(g); |
@@ -292,6 +300,21 @@ bool mc_gk20a_is_intr1_pending(struct gk20a *g, | |||
292 | return is_pending; | 300 | return is_pending; |
293 | } | 301 | } |
294 | 302 | ||
303 | void mc_gk20a_log_pending_intrs(struct gk20a *g) | ||
304 | { | ||
305 | u32 intr; | ||
306 | |||
307 | intr = g->ops.mc.intr_stall(g); | ||
308 | if (intr != 0U) { | ||
309 | nvgpu_info(g, "Pending stall intr0=0x%08x", intr); | ||
310 | } | ||
311 | |||
312 | intr = g->ops.mc.intr_nonstall(g); | ||
313 | if (intr != 0U) { | ||
314 | nvgpu_info(g, "Pending nonstall intr1=0x%08x", intr); | ||
315 | } | ||
316 | } | ||
317 | |||
295 | void mc_gk20a_handle_intr_nonstall(struct gk20a *g, u32 ops) | 318 | void mc_gk20a_handle_intr_nonstall(struct gk20a *g, u32 ops) |
296 | { | 319 | { |
297 | bool semaphore_wakeup, post_events; | 320 | bool semaphore_wakeup, post_events; |