diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-11-28 16:01:25 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-12-19 18:40:14 -0500 |
commit | 508ec183db0ca94d6d909475d44d02d580c49d9f (patch) | |
tree | 1df4e2e8cc3d68f41d3496975ee086c23bd8069b /drivers | |
parent | 9e46d3731e5ce555bdc46410220bc5a6d8db6067 (diff) |
gpu: nvgpu: Reboot when GPU disappears
Reboot the GPU when it disappears instead of just printing a warning
message.
Bug 1805082
Bug 1816516
Bug 1807277
Change-Id: Ifd23c7e6876d5ea86032a82b7181e31d54e877b5
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1260898
(cherry picked from commit 4fdc48c4e6dddf4299a49f387ac90404dd38950f)
Reviewed-on: http://git-master/r/1261917
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b921be7c..e314d6cd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <linux/kthread.h> | 39 | #include <linux/kthread.h> |
40 | #include <linux/platform/tegra/common.h> | 40 | #include <linux/platform/tegra/common.h> |
41 | #include <linux/reset.h> | 41 | #include <linux/reset.h> |
42 | 42 | #include <linux/reboot.h> | |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/version.h> | 44 | #include <linux/version.h> |
45 | 45 | ||
@@ -266,8 +266,11 @@ void __nvgpu_check_gpu_state(struct gk20a *g) | |||
266 | { | 266 | { |
267 | u32 boot_0 = readl(g->regs + mc_boot_0_r()); | 267 | u32 boot_0 = readl(g->regs + mc_boot_0_r()); |
268 | 268 | ||
269 | if (boot_0 == 0xffffffff) | 269 | if (boot_0 == 0xffffffff) { |
270 | pr_err("nvgpu: GPU has disappeared from bus!!\n"); | 270 | pr_err("nvgpu: GPU has disappeared from bus!!\n"); |
271 | pr_err("nvgpu: Rebooting system!!\n"); | ||
272 | kernel_restart(NULL); | ||
273 | } | ||
271 | } | 274 | } |
272 | 275 | ||
273 | static inline void sim_writel(struct gk20a *g, u32 r, u32 v) | 276 | static inline void sim_writel(struct gk20a *g, u32 r, u32 v) |