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/gp10b/mc_gp10b.h | |
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/gp10b/mc_gp10b.h')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/mc_gp10b.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mc_gp10b.h b/drivers/gpu/nvgpu/gp10b/mc_gp10b.h index 4e93235c..8c22de62 100644 --- a/drivers/gpu/nvgpu/gp10b/mc_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/mc_gp10b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -27,6 +27,7 @@ struct gk20a; | |||
27 | #define NVGPU_MC_INTR_STALLING 0U | 27 | #define NVGPU_MC_INTR_STALLING 0U |
28 | #define NVGPU_MC_INTR_NONSTALLING 1U | 28 | #define NVGPU_MC_INTR_NONSTALLING 1U |
29 | 29 | ||
30 | void mc_gp10b_intr_mask(struct gk20a *g); | ||
30 | void mc_gp10b_intr_enable(struct gk20a *g); | 31 | void mc_gp10b_intr_enable(struct gk20a *g); |
31 | void mc_gp10b_intr_unit_config(struct gk20a *g, bool enable, | 32 | void mc_gp10b_intr_unit_config(struct gk20a *g, bool enable, |
32 | bool is_stalling, u32 mask); | 33 | bool is_stalling, u32 mask); |
@@ -34,6 +35,7 @@ void mc_gp10b_isr_stall(struct gk20a *g); | |||
34 | bool mc_gp10b_is_intr1_pending(struct gk20a *g, | 35 | bool mc_gp10b_is_intr1_pending(struct gk20a *g, |
35 | enum nvgpu_unit unit, u32 mc_intr_1); | 36 | enum nvgpu_unit unit, u32 mc_intr_1); |
36 | 37 | ||
38 | void mc_gp10b_log_pending_intrs(struct gk20a *g); | ||
37 | u32 mc_gp10b_intr_stall(struct gk20a *g); | 39 | u32 mc_gp10b_intr_stall(struct gk20a *g); |
38 | void mc_gp10b_intr_stall_pause(struct gk20a *g); | 40 | void mc_gp10b_intr_stall_pause(struct gk20a *g); |
39 | void mc_gp10b_intr_stall_resume(struct gk20a *g); | 41 | void mc_gp10b_intr_stall_resume(struct gk20a *g); |